Skip to content

fix(#1233): a successful run without qa leaves the issue in_progress, not ready_for_merge - #1239

Merged
admarble merged 6 commits into
mainfrom
feature/1233-bug-state-a-successful-spec-only-run-marks-the-iss
Sep 30, 2026
Merged

admarble merged 6 commits into
mainfrom
feature/1233-bug-state-a-successful-spec-only-run-marks-the-iss

Conversation

@admarble

@admarble admarble commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A successful sequant run N --phases spec (or --phases exec) marked #N ready_for_merge, so the next sequant run N --phases exec was skipped as "already ready_for_merge" unless you passed --force, which also force-takes the issue lock.

  • batch-executor.ts: the terminal statuses (ready_for_merge, awaiting_verification) now require that a qa phase actually ran in this run (phaseResults), not just that the run succeeded. Otherwise a successful run records in_progress. The ready-gate branch is unchanged.
  • Consumer audit: the chain checkpoint-failure warning quotes the recorded status. It used to always say "a re-run will skip it", which is now false for in_progress. It branches on the same isCompletedIssueStatus predicate the skip guard uses: a completed status is skipped, anything else is not (the chain resumes at its first unfinished link). The comment above it is updated to match.
  • Documented, conservative: a --resume run that skips an already-completed qa also records in_progress, because status reflects what ran in this run. On main such a run was marked ready without reading the earlier verdict, even a failing one. A --phases qa run restores the terminal status. This is covered by a test.
  • CHANGELOG ### Fixed entry.

AC verification

AC Status Evidence
AC-1 ✅ npx vitest run src/lib/workflow/batch-executor.test.ts: a spec-only run and a spec+exec run record in_progress and never ready_for_merge / awaiting_verification; so does a --resume run that skipped qa
AC-2 ✅ npx vitest run src/lib/workflow/run-orchestrator.test.ts: drives the real RunOrchestrator.run() in a temp repo. With the issue in_progress, --phases exec runs it (no --force). Control: with ready_for_merge it prints "already ready_for_merge — skipping" and doesn't run
AC-3 ✅ The existing batch-executor status tests (#972 awaiting_verification, ready_for_merge on a READY verdict, the #837 gate cases) stay green

Mutation-verified: AC-1 — reverted success && ranQa to success; src/lib/workflow/batch-executor.test.ts > #1233: a successful run without qa leaves the issue non-terminal > sets status to in_progress after a spec-only run, not ready_for_merge failed, along with the spec+exec, --resume and in-progress-warning cases (4 failed / 105 passed); restored.

Mutation-verified: the warning — forced reRunConsequence to the completed-status wording; src/lib/workflow/batch-executor.test.ts > #1233: the chain checkpoint-failure warning names the right re-run outcome > says a re-run won't skip it when no qa ran (in_progress) failed (1 failed / 107 passed); restored. (That mutation ran before the test was renamed from "says a re-run resumes the link…"; the assertions are unchanged except the wording.)

Runner verification (tracker #1236)

  • First QA: AC_NOT_MET. Exec had changed only batch-executor.ts and its test. The runner added the AC-2 orchestrator test and the warning fix, and wrote the CHANGELOG entry.
  • QA re-run: AC_MET_BUT_NOT_A_PLUS. It flagged the missing mutation record (now above), a stale checkpoint comment, the warning's "resumes at this link" wording and the untested resume case. All four are fixed in a8a632f2 / dfc4b089.
  • Forced QA re-run on dfc4b089: NEEDS_VERIFICATION, 3/3 ACs. Its remaining gaps were CI still pending and a comment above the checkpoint where two sentences had been joined, so "therefore" followed the wrong status. The comment was fixed in 659ecf1a.
  • CI round (659ecf1a red, fixed in 2ede8959): two feat(run): --ready-gate — run the post-QA ready gate inside sequant run (automates the any-gaps/fix-gaps second look, stops at human merge) #817 tests in ready-gate-run.test.ts expected ready_for_merge from an exec-only fixture, which is exactly the behaviour this PR changes. The gate runs after the normal phases, so a standard run includes qa. Those two tests now run exec, qa, the fixture mock returns the phase it was called with, and the assertions are unchanged. After that, every test file mentioning ready_for_merge or runIssueWithLogging (25 files, 918 tests) passes.
  • Targeted suites: batch-executor, run-orchestrator, non-chain-skip-guard, completed-status, chain-resume.integration, abort-logging.integration, plus the two tests that scan batch-executor.ts's source (qa-verdict-comment-skill, run-options-dead-surface). All pass. tsc, npm run lint and prettier are clean.
  • Not changed here: an exec-only sequant run still opens a PR even though no qa ran. That behaviour already exists and bug(state): a successful spec-only run marks the issue ready_for_merge, so a later --phases exec skips it #1233 doesn't touch it.

Closes #1233
Refs #1236

🤖 Generated with Claude Code

…, changelog

QA AC_NOT_MET fix_now findings: no test drove --phases exec after a spec-only run (added, with a ready_for_merge control through the real run()); the chain checkpoint warning said 'a re-run will skip it' even when the recorded status is now in_progress (branches on isCompletedIssueStatus); missing CHANGELOG entry. The resume case is documented in code.

Entire-Checkpoint: 8550ff1d113a
…match chain-resume

Re-QA gaps: the comment above the checkpoint still said a completed status was always written; the warning claimed the chain resumes 'at this link' (it resumes at its first unfinished link); the documented resume case had no test.

Entire-Checkpoint: 7d4e3556148d
@admarble admarble changed the title fix(#1233): bug(state): a successful spec-only run marks the issue ready_for_merge, so a later --phases exec skips it fix(#1233): a successful run without qa leaves the issue in_progress, not ready_for_merge Sep 30, 2026
CI red on 659ecf1: two ready-gate-run tests expected ready_for_merge from an exec-only fixture, the exact behaviour #1233 changes. The gate runs after the normal phases, so a standard run includes qa; the fixture mock is now phase-aware.

Entire-Checkpoint: f7d0e86a3b3e
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(state): a successful spec-only run marks the issue ready_for_merge, so a later --phases exec skips it

1 participant