Skip to content

fix(#1245): status, PR-body QA note and MCP result use the first qa verdict — a looped AC_NOT_MET→NEEDS_VERIFICATION records ready_for_merge - #1294

Merged
admarble merged 4 commits into
mainfrom
feature/1245-fix-run-status-pr-body-qa-note-and-mcp-result-use-
Oct 4, 2026
Merged

admarble merged 4 commits into
mainfrom
feature/1245-fix-run-status-pr-body-qa-note-and-mcp-result-use-

Conversation

@admarble

@admarble admarble commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every reader of "the QA verdict" now uses the latest QA attempt, not the first. A looped AC_NOT_MET → NEEDS_VERIFICATION run now records awaiting_verification, where it used to record ready_for_merge. The PR-body note and the MCP result also carry the latest verdict.

  • A new leaf module, src/lib/workflow/latest-phase.ts, holds latestWhere and a generic latestPhaseResult. batch-executor.ts re-exports the accessor feat(qa): enforce the follow-up ledger — every deferred item resolves to filed/fixed/dropped; sibling scans search the defect class #1249 added, so the mcp/tools and commands code doesn't import the orchestrator.
  • Three stale first-match readers are fixed:
    • the terminal status in batch-executor.ts
    • the qaVerdict passed to the post-QA PR update
    • buildStructuredResponse in src/mcp/tools/run.ts
  • The hand-rolled reverse scans now use latestWhere: deriveFailureCategory and both scans in run-display.ts.
  • The optional iteration field is not added, as the spec recommended.

Runner verification (2026-10-03)

  • Tests:
    • npx vitest run over batch-executor.test.ts, ready-gate-run.test.ts, src/mcp/tools/run.test.ts, latest-phase.test.ts and src/commands: 46 files, 921 tests passed.
    • tsc --noEmit is clean.
  • Reversion checks. I put each fixed site back to .find() in turn, and in each case the AC's new test failed. Each site was restored afterwards.
    • The status site failed a looped qa AC_NOT_MET then NEEDS_VERIFICATION records awaiting_verification (#1245 AC-1).
    • The PR-note site failed hands createPR the latest qa verdict after a quality loop (#1245 AC-2).
    • The MCP site failed reports the latest qa entry when a quality loop recorded two (#1245 AC-3).
  • Why this body was rewritten: the body this run opened was the placeholder, because exec wrote no ## Summary heading. That is tracked in fix(run): PR body falls back to the placeholder when exec writes no "## Summary" heading, dropping exec's mutation markers and AC table #1297.

Fixes #1245

QA verdict: NEEDS_VERIFICATION — acceptance criteria met, pending external verification (e.g. CI or a manual test). See the QA review comment.


🤖 Generated by sequant run

@admarble
admarble merged commit 058ff7d into main Oct 4, 2026
7 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.

fix(run): status, PR-body QA note and MCP result use the first qa verdict — a looped AC_NOT_MET→NEEDS_VERIFICATION records ready_for_merge

1 participant