Repository navigation
Description
Context
sequant ready <issue> shipped in #683 (PR #686) as the implementation + Layer-1 deterministic tests. Per the #683 rollout plan, it ships experimental — its loop-exit thresholds and the ac-vs-a-plus policy boundary are validated by unit tests, but its empirical recall/noise has not been measured. This issue tracks the remaining promotion path: produce the evidence, then graduate ready from experimental → documented default.
Not urgent — the command is already usable and inherently safe (defaults to conservative ac, never merges). This blocks promotion/advertising as a default, not use.
Scope
Layer 2 — Backtest against the 27-transcript corpus (offline)
Methodology, corpus, harness, and scoring rubric are already committed in docs/investigations/ready-gate-backtest.md. Execute it:
- For each of the 27 captured fresh-session QA cases, check out the pre-fix commit the fresh QA reviewed, run
sequant ready <issue> --policy {ac,a-plus} --json, and score whether the chain independently flagged the same defect class. - Measure recall on the 12-case real-bug set (MCP server: add progress notifications for sequant_run #421, arch: extract RunOrchestrator — decouple execution engine from CLI wiring #503, Prevent skill/CLI drift with phase vocabulary docs and optional smoke test #467, feat(qa): enforce 'Manual Test' ACs are executed or marked PENDING, never MET from code review #529, bug(hooks): pre-tool.sh regexes for destructive/deployment/reset/workflow commands also match inside quoted gh body content #570, refactor(run): split 3,459-line monolith into focused modules #318, QA skill: add small-diff fast path to skip sub-agents for trivial changes #465, Migrate subagent patterns to declarative .claude/agents/ definitions #484, fix(checkpoint): scope chain-mode checkpoint to feature paths, don't sweep dirty tree #528, feat(assess): emit minimal command flags — drop default --phases, prefer additive flags #554, feat(qa): add sibling-site scan prompt to first-pass /qa verdict checklist #573, feat(state): prevent concurrent sequant sessions from targeting the same issue #625) and false-positive/noise on the clean cases (chore: raise Node engine floor to >=22.12 (drop EOL Node 20), unblock commander 15 #677 + cleanly-merged sample). Report
acvsa-plusseparately. - Fill the
_pending_results table in the doc and commit.
Layer 3 — Forward shadow dogfood (≥10 live issues)
- On the next ≥10 real issues, run BOTH the manual fresh QA AND
sequant readyin shadow (no auto-merge). Compare: agreement, automated-only catches, human-only catches the bot missed. Track viasequant stats --label --sincecohort filters (feat(stats): add --label and --since filters for cohort measurement #640).
Promotion gate
- Graduate to documented default iff: Layer-2 real-bug recall ≥ 70% with acceptable noise, AND Layer-3 automated chain catches ≥ 80% of what the manual fresh QA catches across the cohort.
- If it underperforms: keep it opt-in/experimental and refine (e.g. verdict thresholds, loop scoping), rather than promoting.
Acceptance Criteria
- Layer-2 backtest executed;
docs/investigations/ready-gate-backtest.mdresults table filled with measured per-policy recall + noise (this is feat(cli):sequant ready <issue>— post-resolve A+ QA gate that drives an issue to merge-readiness #683's deferred AC-7). - Layer-3 shadow dogfood run on ≥10 live issues; cohort comparison recorded.
- Promotion decision made against the gate above and documented (promote → update README/docs to drop the experimental framing; or keep experimental with the refine list).
Non-goals
--from-pr <N>reverse resolution (separate feat(cli):sequant ready <issue>— post-resolve A+ QA gate that drives an issue to merge-readiness #683 follow-up).sequant run --ready-gateflag integration (separate feat(cli):sequant ready <issue>— post-resolve A+ QA gate that drives an issue to merge-readiness #683 follow-up; reuses therunReadyGateengine).
References
#683 (feature), PR #686, #608/#609 (gap signal-to-noise — the noise risk this measures), #534 (null-verdict guard), #640 (cohort stats).
Activity
test(#689): unit-test ready-backtest pure logic; guard CLI entrypoint
chore(#689): ready-gate backtest driver script (#691)
admarble commentedon Jun 1, 2026
Layer-2 backtest is blocked on a methodology redesign (found 2026-06-01)
Built the backtest driver (
scripts/analytics/ready-backtest.ts, PR #691) and tried to operationalize the--run. It surfaced that the documented harness ("git worktree add <pre-fix-sha>→ runready") can't produce valid recall — verified by git, before any live pass:readyruns full-weight QA (SEQUANT_FULL_QA=1, AC-2), which runs the stale-branch check. Corpus pre-fix commits are far behindmain(Prevent skill/CLI drift with phase vocabulary docs and optional smoke test #467 = 171, threshold 5) →STALE_BRANCHexit before review.git diff origin/main...<pre-fix>= 0 files — a detached pre-fix checkout has the bug-era code but not the change under review.Deeper cause: reconstructing the buggy diff the historical fresh QA reviewed is often impossible for squash-merged/deleted branches.
Two redesigns (the actual decision)
ready --base <sha>: replay fix-on-era-base; point QA's diff + stale checks at<sha>. Faithful, but a new CLI/QA primitive (skill ×3) + needs the historical buggy diff.main,git revert --no-commit <fix>to reintroduce the bug, runreadywith the default base. No new feature —behind main= 0, diff = the reintroduced bug, tests "does today's gate catch this class today." Caveats: revert may conflict after drift; fix(orchestrator): treat null QA verdict and zero-diff exec as failure, not success #534 empty-branch cases (feat(qa): enforce 'Manual Test' ACs are executed or marked PENDING, never MET from code review #529/bug(hooks): pre-tool.sh regexes for destructive/deployment/reset/workflow commands also match inside quoted gh body content #570) still need separate setup.Full write-up + trade-offs table in
docs/investigations/ready-gate-backtest.md(PR #692). Recommendation: B looks simpler and needs no new primitive — but it's a design call. Once chosen, AC-1 can proceed.docs(#689): Approach B also fails; recommend descoping backtest to La…
admarble commentedon Jun 1, 2026
Update — automated backtest abandoned as infeasible. Tested Approach B (revert-on-main) after A:
git revertof the #573 fix conflicts immediately onskills/qa/SKILL.md. Survey: 7/10 derivable corpus fixes touch high-churn files (qa/run/skills) → reverts conflict; the other 3 are docs commits with no defect to revert. So both replay approaches fail for an automated run.Recommendation: descope AC-1 (historical backtest) — the #534/policy/guard mechanics are already CI-pinned by
ready-gate.test.ts. Make AC-2 (Layer-3 forward shadow dogfood) the empirical validation path; the candidate diff exists by construction there, no archaeology. Full write-up in PR #692.docs(#689): backtest infeasible (both approaches fail) — recommend de…