// tests/validators/runnable-checks.test.mjs // A check that can never run is caught when the brief or the plan is written, // not when the run is judged (voyage-lekerepo end-to-end trial, 2026-10-06, // report points 2, 3, 4 and 9): // - 11 of 13 brief success criteria were NOT RUN at review, and nothing in // /trekbrief warned; // - a plan whose `## Verification` held `git grep ...` passed the validator, // the plan gate and three critic rounds, then felled the run in Phase 7; // - the plan's `End-to-end:` field and Phase 7's end-to-end check did not // meet: Phase 7 only searched the criterion TEXT for "end to end"; // - a step's `Verify:` was prose with several commands, and nothing said // which one the executor runs. // The runner's own allowlist decides "can run" — one list, used early and late. import { test } from 'node:test'; import { strict as assert } from 'node:assert'; import { mkdtempSync, writeFileSync, rmSync } from 'node:fs'; import { join } from 'node:path'; import { tmpdir } from 'node:os'; import { validatePlanContent } from '../../lib/validators/plan-validator.mjs'; import { validateBriefContent } from '../../lib/validators/brief-validator.mjs'; import { allowedCommand, runnableCheck, endToEndCommands, runPlanVerification, } from '../../lib/verification/criteria-runner.mjs'; import { buildPlan } from '../helpers/plan-v18-builder.mjs'; const codes = (list) => list.map((e) => e.code); // --- the shared screen ------------------------------------------------------- test('runner: `/bin/bash tests/