Skip to content

fix(#964): orchestrated sequant run posts the fresh qa verdict, not just a stale one - #965

Merged
admarble merged 3 commits into
mainfrom
feature/964-bug-run-orchestrated-sequant-run-phases-qa-re-
Aug 25, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/964-bug-run-orchestrated-sequant-run-phases-qa-re-

Conversation

@admarble

@admarble admarble commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • qa/SKILL.md §9 promised "the orchestrator handles aggregated summary" under SEQUANT_ORCHESTRATOR, but batch-executor.ts (the engine behind bare sequant run) never posted anything after a standard qa phase. A re-run computing a fresh, different verdict left the stale prior comment as the only externally-visible signal.
  • runIssueWithLogging's phase loop now posts a compact comment (verdict, AC coverage, gaps/suggestions, and a <!-- SEQUANT_QA_VERDICT: {...} --> marker) right after a standard qa phase succeeds with a parseable verdict. Best-effort/non-fatal, mirroring the feat(qa/loop/ready): structured gap findings — finite taxonomy with required evidence, replacing the lossy prose-scrape gap channel #937 ready-gate postReport contract. Does not touch sequant ready's own terminal-only reporting.
  • qa/SKILL.md §9 updated (all three mirrors) to name the real mechanism, now pinned by a scoped gate test (qa-verdict-comment-skill.test.ts).
  • The sibling promises in exec/SKILL.md §6 and test/SKILL.md §3.2 — same unbacked "orchestrator handles summary" wording — are reworded to say what actually happens (no per-phase comment under sequant run; progress/results surface through the run summary and PR body) rather than gaining runtime posting of their own.

Test plan

  • npm run build — passes
  • npm run lint — passes (0 errors)
  • npm test — full suite green (273 files, 5633 passed, 1 expected fail, 2 skipped)
  • 4 unit tests in batch-executor.test.ts covering AC-1 through AC-4, including the verbatim issue repro (AC-2)
  • 6 gate tests in qa-verdict-comment-skill.test.ts pinning §9's wording across all three mirrors (AC-5)

Pre-PR AC Verification

AC Description Status Evidence
AC-1 Posts verdict + AC coverage + SEQUANT_QA_VERDICT marker after successful qa phase ✅ Implemented batch-executor.ts postQaVerdictComment/buildQaVerdictComment; test AC-1: posts a comment...
AC-2 Regression test: two sequential runs with different verdicts each post ✅ Implemented Test AC-2 (regression, verbatim repro): a re-run computing a fresh, different verdict posts again
AC-3 Comment-post failure is non-fatal ✅ Implemented postQaVerdictComment's try/catch; test AC-3: a comment-post failure is non-fatal
AC-4 No post on failed/capped/unparseable-verdict phases ✅ Implemented Gated on result.success && result.verdict; test AC-4: does not post when...
AC-5 qa/SKILL.md §9 wording synced across 3 mirrors ✅ Implemented Gate test qa-verdict-comment-skill.test.ts asserts the §9 region names batch-executor.ts + SEQUANT_QA_VERDICT in all 3 mirrors and the old promise is gone; check-skill-sync.ts 44/44

Mutation Verification

Mutation-verified: AC-5 — reverted §9's orchestrated-mode bullet in .claude/skills/qa/SKILL.md to the old "orchestrator handles aggregated summary" wording; qa-verdict-comment-skill.test.ts failed (exactly the .claude/skills case, on toContain("batch-executor.ts"), 1 failed / 5 passed); restored.

Pre-PR Confidence Check

  • Weakest part: No dedup of identical verdicts across re-runs (deliberate, per spec Open Question 1) — a re-run with an unchanged verdict posts a duplicate comment. The marker's commit field gives a future dedup pass an anchor.
  • Coverage gaps: types.ts's new postComment? field is a types-only test seam, exercised indirectly by every batch-executor.test.ts test that passes it. The exec/test SKILL.md truth-ups have no gate test of their own — they remove a false promise rather than establish a contract, and the three-dir sync check covers mirror drift.

CLI Wiring Check

N/A — no RunOptions/CLI interface changes. IssueExecutionContext.postComment is an internal test seam, not user-facing.

Closes #964

🤖 Generated with Claude Code

…ust a stale one

batch-executor.ts never backed qa/SKILL.md's promise that "the orchestrator
handles aggregated summary" - a bare `sequant run --phases qa` re-run that
computed a different verdict than the last-posted comment left the stale one
as the only externally-visible signal.

Post a compact comment (verdict, AC coverage, gaps/suggestions, and a
SEQUANT_QA_VERDICT marker) right after a standard qa phase succeeds with a
parseable verdict. Best-effort and non-fatal, mirroring the #937 ready-gate
postReport contract; does not touch the ready-gate's own terminal-only
reporting path.
…t sibling promises

Adds a scoped gate test (qa-verdict-comment-skill.test.ts) pinning §9's
orchestrated-mode wording to the real mechanism — batch-executor.ts posting
the SEQUANT_QA_VERDICT comment — in all three mirrors, with assertions
scoped to the delimited §9 region per the #830 rule. Also asserts the old
unbacked "orchestrator handles aggregated summary" promise stays gone.

Reworders exec/SKILL.md §6 and test/SKILL.md §3.2, which carried the same
unbacked promise for their own channels: those docs now say no per-phase
comment is posted under sequant run (progress/results surface via the run
summary and PR body) instead of promising orchestrator posting that does
not exist.
@admarble
admarble merged commit 53cde14 into main Aug 25, 2026
9 checks passed
@admarble
admarble deleted the feature/964-bug-run-orchestrated-sequant-run-phases-qa-re- branch August 25, 2026 05:34
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.

bug(run): orchestrated 'sequant run --phases qa' re-run computes a fresh verdict but never posts it, contradicting the stale comment left visible

1 participant