refactor(simplify): one plan read in red proof, one list marker, one put-back rule [skip-docs]

/simplify over ed6699d..HEAD (closing review of the remediation):
- red-proof reads and parses the step once (planStep) for the test list and
  tests_only; normTest goes, plan-schema exports normPlanPath, also used by
  plan-scope-sweep.
- plan-schema builds LIST_ITEM and the 1.9 File: line from one LIST_MARKER;
  the below-1.9 File: regex ends in a lookahead instead of slicing back one.
- the workflow script hoists tripletOf and puts back through dedupByTriplet.
- coordinator-contract keeps the rank in its JSDoc only; engine-findings
  drops a redundant String().
- tests: reuse knownIssues, trekplan19Block, step1Fields, one red-proof cli
  helper with childEnv, one payload-pair builder; drop a test the decision-20
  definition test covers.

No behaviour change. Suite 2462 (2460/0/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-10-13 19:47:08 +02:00
commit bcf3adbba7
Signed by: ktg
SSH key fingerprint: SHA256:JakMjO6FTBBzN0Bhfj9saOoEjaFxlSdYuZQQpM/lF9Q
11 changed files with 90 additions and 127 deletions

View file

@ -234,6 +234,7 @@ test('1.9: the red proof\'s tests_only reads Files by the grammar (CLI, temp git
// no test. Below 1.9 the step check is read as before (decision 16).
const planTestFirst19 = (version, line) =>
buildPlan({ version, steps: [{ testFirstRaw: line }, { endToEnd: 'bash tests/e2e.sh' }] });
const step1Fields = (text) => schema.parseStepFields(text.split('### Step 1:')[1].split('### Step 2:')[0]);
test('1.9: a Test first whose File: stands mid-line names no test - PLAN_STEP_NO_TEST_FIRST under --strict, a warning under --soft', () => {
for (const line of [
@ -242,7 +243,7 @@ test('1.9: a Test first whose File: stands mid-line names no test - PLAN_STEP_NO
]) {
const text = planTestFirst19('1.9', line);
assert.ok(text.includes(`${line}\n`), 'the builder writes the raw File line');
assert.deepEqual(schema.testFirstFiles(schema.parseStepFields(text.split('### Step 1:')[1].split('### Step 2:')[0]), '1.9'), [],
assert.deepEqual(schema.testFirstFiles(step1Fields(text), '1.9'), [],
'the executor reads no test file here');
const r = validatePlanContent(text, { strict: true });
assert.equal(r.valid, false, `${line}: ${errCodes(r).join(',')}`);
@ -274,7 +275,6 @@ test('below 1.9: the step check reads a mid-line File: as before', () => {
// `File:` line names its test (reviews b4fa1927, 4b6460e5) ----
const WRAPPED = '`tests/a.test.mjs`,\n `src/a.mjs`';
const step1Fields = (text) => schema.parseStepFields(text.split('### Step 1:')[1].split('### Step 2:')[0]);
test('1.9: a Files list wrapped after a comma names both files and no issue', () => {
const r = entryPaths(WRAPPED);