Skip to content

feat(#1246): a PR from a run QA has not reviewed says "QA has not run"; MCP stops offering spec,exec to skip QA - #1298

Merged
admarble merged 4 commits into
mainfrom
feature/1246-decision-run-a-sequant-run-where-no-qa-ran-still-e
Oct 4, 2026
Merged

admarble merged 4 commits into
mainfrom
feature/1246-decision-run-a-sequant-run-where-no-qa-ran-still-e

Conversation

@admarble

@admarble admarble commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A PR from a sequant run that QA has not reviewed now carries one line in its body: > **QA has not run** — phases run: spec, exec. This PR has not been reviewed by sequant's QA phase; run \sequant run N --phases qa` before merging.`
  • How "QA has run" is decided (src/lib/workflow/batch-executor.ts, in openOrUpdatePR): QA reviewed the latest exec. Either this run has a qa result after its last exec, or this run ran no exec and the issue's state records a completed qa from an earlier run. It reuses the state read that was already there for the exec summary. It adds no git or gh call, so the ordered child_process mocks still line up.
  • Rendering (src/lib/workflow/worktree-manager.ts): the line goes where the QA verdict note goes. A ready-gate report wins over a verdict note, which wins over the line, so a body never has both the line and a verdict note. Any QA verdict removes the line, including READY_FOR_MERGE, which has no note.
  • MCP (src/mcp/tools/run.ts): the phases description now says a run without qa still opens a PR, marked as not reviewed by QA. The "to skip QA" example is gone.
  • There is no draft PR and no change to the PR-creation gate. CHANGELOG has an ### Added entry.
AC Status Evidence
AC-1 ✅ Done Body tests in worktree-manager.build-pr-body.test.ts; run tests in batch-executor.test.ts cover a spec,exec run, an earlier completed qa (no line), and an earlier failed qa (line shown)
AC-2 ✅ Done Tests check the body sent on the after-exec call and on the post-QA call for READY_FOR_MERGE and AC_MET_BUT_NOT_A_PLUS, a qa-only re-run on the same PR (the #1198 pattern), and a ready-gate report
AC-3 ✅ Done After QA, the body equals today's buildAutomatedPRBody output exactly. createPR has no draft flag.
AC-4 ✅ Done New test in run.test.ts: the description no longer matches /to skip QA/ and does say the PR is marked as not reviewed

Mutation-verified: AC-1 — deleted the qaNotRunNote push in buildAutomatedPRBody; worktree-manager.build-pr-body.test.ts AC-1 case failed; restored.

Mutation-verified: AC-2 — computed qaNotRun ignoring this run's qa result; batch-executor.test.ts AC_MET_BUT_NOT_A_PLUS case failed; restored.

Mutation-verified: AC-4 — restored the 'spec,exec' to skip QA description; run.test.ts #1246 AC-4 case failed; restored.

I ran two more mutations that each failed exactly their own test: removing the verdict check failed the body-level READY_FOR_MERGE case, and ignoring the earlier qa recorded on state failed the earlier-run case. All three markers above came back valid from parseMutationMarkers.

Checks:

  • npx tsc --noEmit, npm run build and npm run lint all passed.
  • The three AC test files passed: 281 tests.
  • The tautology detector reported no problems.
  • I did not run the full npm test; the runner context says to leave that to CI.

Runner fix (d1b8201): spec Open Question 1

The first version counted any qa in the run, or any completed qa in state. That left two PRs that look reviewed although their latest code never went through QA:

  • a quality-loop iteration's after-exec update ([exec, qa, loop, exec]) that crashes before its qa;
  • --phases exec on an issue QA reviewed earlier.

The rule is now "QA reviewed the latest exec", and the AC-1 text on the issue was amended to match. The phases named leave out the internal loop marker.

Fixes #1246

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.


🤖 Generated by sequant run

…teration's or an exec re-run's update shows the note

Spec Open Question 1: a qa result counts only when it follows the run's last exec, and a qa an earlier run completed counts only when this run ran no exec. The loop marker is left out of the phases named.

Entire-Checkpoint: 9aa616e964e4
@admarble admarble changed the title feat(#1246): decision(run): a sequant run where no qa ran still ends with a PR — draft+note, require qa, or unchanged (blocked by #1247) feat(#1246): a PR from a run QA has not reviewed says "QA has not run"; MCP stops offering spec,exec to skip QA Oct 4, 2026
@admarble
admarble merged commit 2f8dc07 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.

decision(run): a sequant run where no qa ran still ends with a PR — draft+note, require qa, or unchanged (blocked by #1247)

1 participant