fix(#4682): route stale verification to the verifier regeneration path (#4818)

* 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:
Tom Boucher
2026-09-17 02:23:03 -04:00
committed by GitHub
parent 651511d1e3
commit 2bfff17ff8
30 changed files with 123 additions and 27 deletions

View File

@@ -366,6 +366,8 @@ later conditions once one matches:
2b. **No filter is active, no blocked-plan skip occurred, and at least one filtered plan was skipped because `ready: false` (#4628)** — the phase is WAITING on incomplete predecessors, not finished: report it by name and exit before any completion state (`execute-phase/steps/ready-wave-gate.md`).
3. **No filter is active, and every filtered plan was filtered by `has_summary` alone** (no
blocked-plan skip occurred):
- **`VERIFY_STATUS == stale` (#4682)**: covered source changed after the verifier ran —
re-verify per `execute-phase/steps/stale-reverification.md`.
- **`VERIFY_STATUS == missing`**: the plans are all summarized but the run never reached the
tail gates. Report:
`"All {plan_count} plans are summarized but no VERIFICATION.md exists — resuming at the phase gates (#2868)."`

View File

@@ -0,0 +1,24 @@
Apply response_language to all user-facing prose — narration between tool calls, status updates, progress notes, and findings included; preserve code, paths, and identifiers.
<step name="stale_reverification">
Covered source files changed after the verifier last ran — the recorded digest no longer
matches, so the report cannot be trusted until the verifier re-runs (#4682). The plans are all
summarized: there is no wave work to do.
Report:
```
"Verification is stale — covered source changed after the verifier ran (#4682). Re-running the verifier for this phase."
```
SKIP `cross_ai_delegation`, `execute_waves` and `checkpoint_handling` — there is no wave work —
and continue directly at `aggregate_results` exactly as the `missing` route (#2868): the tail
steps re-run in their normal order (`aggregate_results` → `code_review_gate` →
`close_parent_artifacts` → `regression_gate` → `verify_phase_goal` → `update_roadmap`), and
`verify_phase_goal` re-dispatches the `gsd-verifier`, regenerating VERIFICATION.md and its
digest. This holds whether or not the phase was already marked complete — a stale report on a
marked phase is refreshed the same way. `verification.status`'s `next_command` routes here for
exactly this state.
Never silently proceed past a stale gate: if the re-run verifier still produces a stale report,
stop and present it (#4623 covers what the digest hashes).
</step>

View File

@@ -673,15 +673,23 @@ if [ "$VERIFICATION_STATUS_VALUE" = "human_needed" ]; then
fi
```
If `PHASE_VERIFICATION_STATUS` is `stale`, stop before phase advancement and present:
If `PHASE_VERIFICATION_STATUS` is `stale`, the covered source files changed after the verifier
last ran — re-run the VERIFIER, not this workflow (`/gsd:verify-work` never rewrites
VERIFICATION.md; its only write is the human_needed canonicalization, #4663). Spawn the
verifier for this phase exactly as execute-phase's `verify_phase_goal` step does (subagent
`gsd-verifier`; phase directory, goal, requirement IDs, and all SUMMARYs in
`<required_reading>`), then re-read `verification.status` and continue at the fresh/passed
case below. (#4682)
```
All UAT tests passed, but phase advancement is blocked until canonical verification is fresh.
Verification is stale: covered source files changed after the verifier last ran.
Blocking completion:
verification is stale
- `/gsd:verify-work {phase}` — re-run verification against the latest summaries
- Re-run the verifier for phase {phase} (dispatch `gsd-verifier` as in execute-phase's
verify_phase_goal step) to regenerate VERIFICATION.md with a fresh digest, then re-run
`/gsd:verify-work {phase}`
```
Otherwise, check the shared UAT-plus-verification completion predicate before transition: