Repository navigation
Conversation
Add a standalone `sequant ready <issue>` command that reproduces the maintainer's manual fresh-session A+ QA pass deterministically: drives an already-resolved issue's worktree through a full-weight `qa → loop → qa` pipeline and STOPS at the human merge gate — it never merges. - Engine: src/lib/workflow/ready-gate.ts (runReadyGate, DI-injectable phase runner). Command shell: src/commands/ready.ts. - Full-weight QA (AC-2): new ExecutionConfig.fullQa sets SEQUANT_FULL_QA=1 for the qa phase; qa/SKILL.md (×3) honors it to run the standalone branch- freshness / process-state pre-flight checks even under an orchestrator — catching the no-implementation / divergent-branch class (#318/#529/#570). - Gate policy (AC-3/AC-3a): ready.policy in settings (default "ac"), overridable via --policy. `ac` stops at no AC_NOT_MET and reports (not fixes) quality gaps; Non-Goal-touching findings are report-only. `a-plus` loops to READY_FOR_MERGE. Both bounded by --max-iterations, --budget token cap, and the LOOP_NO_DIFF stagnation guard. - #534 guard (AC-5): zero-diff worktree or null/unparseable verdict → NO_IMPLEMENTATION, never ready. - Never merges (AC-4): terminates in new `waiting_for_human_merge` status with a structured markdown/JSON gap report. - Tests: 29 deterministic cases (ready-gate.test.ts, ready.test.ts). - Docs (AC-7/AC-8): docs/reference/ready-command.md, docs/investigations/ready-gate-backtest.md, README, CHANGELOG.
9 tasks
`Verdict: ✅ READY_FOR_MERGE` parsed as null because the regex only allowed `**`/whitespace between `Verdict:` and the token — so a genuine QA pass was recorded as "QA completed without a parseable verdict" (live repro: `sequant run 687 --phases exec,qa`, where QA had already posted READY_FOR_MERGE and opened PR #688). Widen the gap to any run of non-alphanumeric chars (emoji, asterisks, whitespace) via a negated ASCII class — ReDoS-safe and no-misleading-character-class-clean, matching parseQaSummary. Also hardens `sequant ready`, whose #534 guard would otherwise misclassify an emoji-verdict pass as NO_IMPLEMENTATION. Adds regression tests.
…sequant-ready-issue-post-resolve-a-qa-gat # Conflicts: # CHANGELOG.md
This was referenced Jun 1, 2026
admarble
added a commit
that referenced
this pull request
Jul 30, 2026
…ng (#861) * fix(#850): parse bare-checkbox ACs under an Acceptance Criteria heading Every AC_PATTERNS entry required an ID prefix, so ordinary human-written issues (bare `- [ ]` items, no ID) parsed to zero ACs, silently blinding every TS-side AC consumer including the ready gate's Non-Goal classifier. parseAcceptanceCriteria is now section-aware (mirroring parseNonGoals): existing ID patterns run unchanged on every line, plus a bare-checkbox fallback that fires only under a case-insensitive `## Acceptance Criteria` heading, synthesizing stable AC-N IDs that skip explicit-marker collisions. Real matcha-maps issue bodies committed as hermetic fixtures: #686 (4), #703 (2, lowercase heading), #745 (6, existing ID path), #750 (0, negative guard resolving the AC-2 vs AC-3 contradiction the spec surfaced). Entire-Checkpoint: 87d4ea18cbb9 * fix(#850): pre-scan explicit AC IDs so bare-before-explicit ordering cannot drop an author's AC A bare checkbox listed before an explicit **AC-1:** under the same heading synthesized AC-1 first, and the explicit AC-1 was then silently dropped by the first-occurrence dedupe. Synthesis now skips IDs owned by explicit markers anywhere in the body, not just those seen so far. Mutation-verified: reverting the explicitIds guard fails exactly the new test 'skips IDs taken by explicit markers that appear after the bare item' (36 passed, 1 failed); restored, all 37 pass.
This was referenced Aug 13, 2026
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
sequant ready <issue>— a post-resolve A+ QA gate that reproduces the maintainer's manual fresh-session pass deterministically. It drives an already-resolved issue's worktree through a full-weightqa → loop → qapipeline, surfaces every gap in a structured report, and stops at the human merge gate — it never merges. Closes #683.What it does
Gate policy (
ready.policyin settings, default"ac";--policy ac|a-plus):ac(default) — stop once noAC_NOT_METremains; quality gaps reported, not auto-fixed; Non-Goal-touching findings are report-only.a-plus(opt-in) — loop towardREADY_FOR_MERGE, auto-fixing quality gaps.Both bounded by
--max-iterations, an optional--budgettoken cap, and theLOOP_NO_DIFFstagnation guard. A #534 regression guard ensures a zero-diff worktree or null verdict is never reported ready.Architecture
src/commands/ready.ts— command shell (option parsing, worktree resolution, state persistence, report rendering).src/lib/workflow/ready-gate.ts— reusable engine (runReadyGate, DI-injectable phase runner). A futuresequant run --ready-gatecan reuse it.ExecutionConfig.fullQa→SEQUANT_FULL_QA=1for theqaphase;qa/SKILL.md(×3 dirs) honors it.waiting_for_human_mergeissue status, wired through every exhaustiveIssueStatusconsumer.Tests
29 deterministic vitest cases (
ready-gate.test.ts,ready.test.ts): phase sequence, policy thresholds, all guard exits, #534 guards, Non-Goal report-only, exit-code mapping, report shape. Build (tsc) + lint (--max-warnings 0) green; skill dirs byte-identical.AC status (see QA comment)
8/9 ACs MET. AC-7 (backtest with measured recall/noise over 27 pre-fix commits) is a manual offline live-LLM run — its methodology, corpus, harness, and scoring rubric are committed (
docs/investigations/ready-gate-backtest.md); the measured numbers are produced on this branch per the issue's rollout-plan step 2, before public promotion. The command ships behind its experimental marker meanwhile.Verdict
NEEDS_VERIFICATION — code/docs complete and tested; AC-7 awaits the offline backtest (external/manual, not a code gap).
🤖 Generated with Claude Code