* test(#4682): add failing-first coverage for stale verification routing * fix(#4682): route stale verification to the verifier regeneration path The stale routing entry sent users to /gsd-verify-work — but verify-work never rewrites VERIFICATION.md (its only write is the human_needed canonicalization), so following the advice re-ran UAT, reached the same stale check, and looped. init's projector and execute-phase's generic next_command presentation both mirror this entry, so the dead end appeared on three surfaces. The stale entry now routes to execute-phase, and execute-phase's all-plans-complete resume tree gains a stale arm (as a steps/ part, keeping the spine under its frozen ADR-857 ceiling) mirroring the missing route: skip cross_ai_delegation/execute_waves/checkpoint_handling, continue at aggregate_results, and let verify_phase_goal re-dispatch the gsd-verifier — regenerating VERIFICATION.md and its digest, marked phase or not. The non-stale fall-through. Staleness detection, the digest format (#4623), every other routing entry, and the #3684 resume arms are untouched. Emitted-Drift-Ack-Growth: verify-work.md — stale stop rewritten to dispatch the verifier and re-check (#4682) Emitted-Drift-Ack-Growth: execute-phase.md — VERIFY_STATUS == stale resume arm added to condition 3 (#4682) * test(#4682): register the stale-reverification part and align projected commands The new steps/ part must be registered in the inventory manifest and the per-runtime golden install trees (regen:derived); the projected stale next_command is /gsd-execute-phase <phase> (formatGsdSlash prefixes the runtime surface), the human_needed bare-report probe keeps routing to verify-work (unchanged semantics), and init-manager's recommended action follows the new command. * test(#4682): prefix the remaining stale routing assertions with the runtime surface Nine stale next_command assertions and the human_needed bare-report probe still carried the unprefixed or flipped forms from the earlier line-number edit; all now assert the shipped /gsd-execute-phase <phase> projection, with the human_needed probe reverted to its unchanged verify-work routing. * test(#4682): align the last stale projection assertions with the execute-phase route * docs(#4682): backfill changeset PR number * test(#4682): refresh the compact-content baseline after the rebase The rebase onto the #4670 squash brought verify-work.md's bounded reconciliation text into this branch; the committed compact-content baseline now reflects the post-rebase split sizes. Local --check is clean; the previous bench drift (+243) was the baseline, not the diff. * fix(#4682): carry the response_language directive in the stale-reverification part The new steps/ part is its own coverage unit for lint-response-language-coverage; it takes the shared canonical directive line like its sibling execute-phase parts. --------- Co-authored-by: sim <sim@local>
This commit is contained in:
@@ -401,7 +401,15 @@ describe('verification-status', () => {
|
||||
const result = readVerificationStatus(dir, { phaseCleanCommitTimesMs: () => new Map() });
|
||||
assert.equal(result.status, 'stale');
|
||||
assert.match(result.next_action, /stale/i);
|
||||
assert.equal(result.next_command, '/gsd-verify-work 01');
|
||||
// #4682: stale means covered source changed after the verifier ran — the
|
||||
// only remedy is re-running the verifier. execute-phase resumes at the
|
||||
// verification gates and re-runs it (its resume tree routes a stale
|
||||
// report to re-verification); /gsd-verify-work never rewrote the report,
|
||||
// so routing there was an advice loop.
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 01');
|
||||
assert.doesNotMatch(result.next_command, /verify-work/);
|
||||
assert.match(result.next_action, /verifier/i,
|
||||
'the stale action must name the verifier re-run as the remedy');
|
||||
} finally {
|
||||
cleanup(baseDir);
|
||||
}
|
||||
@@ -444,7 +452,7 @@ describe('verification-status', () => {
|
||||
// git times unavailable → mtime-fallback path (#2348).
|
||||
const result = readVerificationStatus(dir, { phaseCleanCommitTimesMs: () => new Map() });
|
||||
assert.equal(result.status, 'stale');
|
||||
assert.equal(result.next_command, '/gsd-verify-work 01');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 01');
|
||||
} finally {
|
||||
cleanup(baseDir);
|
||||
}
|
||||
@@ -526,7 +534,7 @@ describe('verification-status', () => {
|
||||
|
||||
const result = readVerificationStatus(dir, { phaseCleanCommitTimesMs });
|
||||
assert.equal(result.status, 'stale');
|
||||
assert.equal(result.next_command, '/gsd-verify-work 02');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 02');
|
||||
} finally {
|
||||
cleanup(baseDir);
|
||||
}
|
||||
@@ -591,7 +599,7 @@ describe('verification-status', () => {
|
||||
'stale',
|
||||
'a dirty summary edited after the verification must stale it via mtime, not be shadowed by an equal/earlier commit time',
|
||||
);
|
||||
assert.equal(result.next_command, '/gsd-verify-work 02');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 02');
|
||||
} finally {
|
||||
cleanup(baseDir);
|
||||
}
|
||||
@@ -708,7 +716,7 @@ describe('verification-status', () => {
|
||||
'stale',
|
||||
'summary committed after the verification must read stale on the real git clock, and the dash-named file must resolve through the `--` pathspec guard',
|
||||
);
|
||||
assert.equal(result.next_command, '/gsd-verify-work 01');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 01');
|
||||
} finally {
|
||||
cleanup(repo);
|
||||
}
|
||||
@@ -756,7 +764,7 @@ describe('verification-status', () => {
|
||||
'stale',
|
||||
'a committed-then-edited (dirty) summary must read stale via mtime, not be shadowed by its now-stale commit time',
|
||||
);
|
||||
assert.equal(result.next_command, '/gsd-verify-work 01');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 01');
|
||||
} finally {
|
||||
cleanup(repo);
|
||||
}
|
||||
@@ -1396,7 +1404,7 @@ describe('#4187: status surface recognizes a bare VERIFICATION.md', () => {
|
||||
|
||||
const result = readVerificationStatus(dir, { phaseCleanCommitTimesMs: () => new Map() });
|
||||
assert.equal(result.status, 'stale', 'a bare report must be staleness-checked like a dashed one');
|
||||
assert.equal(result.next_command, '/gsd-verify-work 99');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 99');
|
||||
});
|
||||
|
||||
test('#4187 unit (findStaleVerificationSummary): staleness is computed against the bare report', (t) => {
|
||||
@@ -1446,7 +1454,7 @@ describe('#4142: opts.convention threads through findStaleVerificationSummary',
|
||||
'stale',
|
||||
'opts.convention must reach the legacy staleness seam so phase 03 is compared to 03-VERIFICATION.md',
|
||||
);
|
||||
assert.equal(result.next_command, '/gsd-verify-work');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2025,7 +2033,7 @@ describe('#4155: readVerificationStatus — fingerprint supersedes legacy mtime
|
||||
|
||||
const result = readVerificationStatus(dir, { phaseCleanCommitTimesMs: () => new Map() });
|
||||
assert.equal(result.status, 'stale');
|
||||
assert.equal(result.next_command, '/gsd-verify-work 01');
|
||||
assert.equal(result.next_command, '/gsd-execute-phase 01');
|
||||
});
|
||||
|
||||
// Ponytail #4155 review finding: "disappeared" and "escapes confinement"
|
||||
@@ -2825,7 +2833,7 @@ for (const { id, prefix } of RUNTIMES) {
|
||||
makeStale();
|
||||
const result = read(id, NO_GIT);
|
||||
assert.equal(result.status, 'stale');
|
||||
assert.equal(result.next_command, `${prefix}verify-work 01`);
|
||||
assert.equal(result.next_command, `${prefix}execute-phase 01`);
|
||||
});
|
||||
|
||||
test('passed has no next step and stays empty, not a bare prefix', () => {
|
||||
|
||||
Reference in New Issue
Block a user