Skip to content

feat(#1688): every phase dispatch gets the needs-human Evidence block — exec ran the env-file command in the #1655 smoke - #1690

Merged
admarble merged 4 commits into
mainfrom
feature/1688-feat-run-every-phase-dispatch-gets-the-needs-human
Nov 16, 2026
Merged

admarble merged 4 commits into
mainfrom
feature/1688-feat-run-every-phase-dispatch-gets-the-needs-human

Conversation

@admarble

@admarble admarble commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

I reworked the branch to the owner's option A. The needs-human block is now built in one place, executePhase in src/lib/workflow/phase-executor.ts, for spec, exec, qa and loop, on every path: the phase loop, --ready-gate and sequant ready. No caller wraps the config any more. Build, lint and every affected test pass, and the branch is pushed (feature/1688-feat-run-every-phase-dispatch-gets-the-needs-human, head 86c5b0456). I opened no PR: under the orchestrator, it updates #1690 from this summary.

What changed

  • One site. executePhase joins the block into the prompt. dispatchNeedsHumanAcs reads the issue's state record. A tracked issue with no AC record is registered from its body, but a dry run only reads and writes nothing. An issue with no state record is classified from its body, fetched once per process, and nothing is written to state. A failed read or fetch means no block and no exception.
  • Wraps removed. The wraps in dispatchLoopPhase, runReadyGateForIssue and src/commands/ready.ts are gone. withEvidenceReachContext is deleted rather than moved, because joinEvidenceReachContext in evidence-reach.ts covers it. The dedupe guard is gone, and so are ready.ts's helper and the stateManager argument feat(qa): the ready gate's qa passes get #1652's do-not-run block (--ready-gate and sequant ready) #1681 had added only for the wrap.
  • classifyIssueEvidence stays. The phase loop still calls it for qa, so the run log's per-AC reach field and the summary are unchanged.
  • Tests. The five assertions that checked the wrapped config now check the dispatched prompt in evidence-reach-dispatch.test.ts:
    • ready-gate.evidence-reach.test.ts is deleted; its assertions moved.
    • "adds no block to a non-qa phase" is deleted.
    • The batch-executor.evidence-reach.test.ts cases were renamed so their titles match the new behaviour, and they now assert that qa is dispatched without the wrap.
    • New cases cover the real (non-dry) dispatch: a tracked issue with no AC record is registered; a dry run writes nothing; a fetch failure gives no block; the body is fetched once.
  • CHANGELOG. The feat(run): every phase dispatch gets the needs-human Evidence block — exec ran the env-file command in the #1655 smoke #1688 entry is rewritten for the single site.

Pre-PR AC verification

AC Status Evidence
AC-1 ✅ npx vitest run src/lib/workflow/evidence-reach-dispatch.test.ts: 16 passed. Covers spec, exec, qa and loop, plus the no-block case, the loop join, and both ready entry points.
AC-2 ✅ -t "no state record": 5 passed, 0 failed. Covers a direct dispatch, --ready-gate, sequant ready, a failed fetch, and the single fetch.
AC-3 ✅ Running evidence-reach.test.ts with the dispatch test file: 0 failed. The grep for withEvidenceReachContext( returns 0, and the name no longer appears anywhere in src.

Mutation-verified: AC-1 — executePhase passes config.promptContext to getPhasePrompt instead of the joined context; 10 cases in evidence-reach-dispatch.test.ts failed; restored.
Mutation-verified: AC-2 — dispatchNeedsHumanAcs returns an empty list instead of classifying the body for an issue with no state record; all 4 "no state record" cases that need a body failed; restored. Both markers parse with parseMutationMarkers.

Checks

  • npm run build and npm run lint pass, with no warnings.
  • Affected tests: `npx vitest run --changed origi

Fixes #1688

QA verdict: AC_MET_BUT_NOT_A_PLUS — acceptance criteria met, but not A+. The run broke to this PR for review rather than entering the quality loop; see the QA review comment for improvement notes.

Runner verification (2026-11-16)

I ran each AC's Evidence command verbatim in the worktree at 86c5b04. AC-3 is the version amended on 2026-11-16, option A.

  • AC-1: evidence-reach-dispatch.test.ts, 16 passed, 0 failed.
  • AC-2: -t "no state record", 5 passed (11 skipped), 0 failed.
  • AC-3: evidence-reach.test.ts and evidence-reach-dispatch.test.ts, 37 passed, 0 failed, and the withEvidenceReachContext( count over batch-executor.ts and ready.ts is 0.

No withEvidenceReachContext reference is left under src/. The block is joined only in executePhase.

Follow-ups


🤖 Generated by sequant run

… — joined in executePhase for spec, exec, qa and loop; sequant ready classifies an untracked issue from its body

Entire-Checkpoint: 5a0b96f570b6
…lper (max-lines-per-function)

Entire-Checkpoint: 5a0b96f570b6
@admarble

Copy link
Copy Markdown
Contributor Author

Read first

Computed from the diff, the issue's Evidence: clauses and git log. Nothing here is written by a model.

Residue

  • CHANGELOG.md (+1 −0): no AC's evidence names it — git diff --numstat origin/main...HEAD -- CHANGELOG.md
  • src/commands/ready.ts (+41 −12): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/commands/ready.ts
  • src/lib/evidence-reach.ts (+44 −3): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/evidence-reach.ts
  • src/lib/workflow/batch-executor.ts (+25 −14): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/batch-executor.ts
  • src/lib/workflow/phase-executor.ts (+45 −1): no AC's evidence names it — git diff --numstat origin/main...HEAD -- src/lib/workflow/phase-executor.ts
  • CHANGELOG.md is hot: 3 fix commits in 28 days — git log --since=28.days --format=%s origin/main -- CHANGELOG.md | grep -cE '^fix(\(|:|!)'

Tests

  • src/lib/workflow/evidence-reach-dispatch.test.ts: mock; mutation record: AC-1 — grep -nE 'vi\.mock|jest\.mock|SKILL\.md' src/lib/workflow/evidence-reach-dispatch.test.ts, gh pr view 1690 --json body

Explained

  • src/lib/workflow/evidence-reach-dispatch.test.ts — AC-1, AC-2

AC verdict: the SEQUANT_QA_VERDICT comment on #1688.

@admarble

Copy link
Copy Markdown
Contributor Author

Owner chose option A for AC-3 (see #1688). This branch is being reworked from B to A by a re-run of exec and qa.

…tePhase; the #1652/#1681 wraps, the dedupe guard and the ready helper go, and an untracked issue is classified from its body at the dispatch

Entire-Checkpoint: f1da236b15dc
@admarble
admarble merged commit 1de9dd5 into main Nov 16, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(run): every phase dispatch gets the needs-human Evidence block — exec ran the env-file command in the #1655 smoke

1 participant