Repository navigation
chore(#689): ready-gate backtest driver script - #691
Merged
Merged
Conversation
Adds scripts/analytics/ready-backtest.ts — the repeatable plumbing for the Layer-2 backtest (#683 AC-7). Reads the 12-case real-bug corpus + clean control, auto-derives each pre-fix SHA (parent of the `(#N)` squash-merge), sets up an issue-number-named worktree so `sequant ready` can discover it, runs both policies, captures JSON to .sequant/backtest/, and emits a recall/noise table. Makes the three methodology decisions explicit rather than hiding them: - --current-skills (default ON) overlays current main skills onto old code, so the measurement tests TODAY's gate against the old bug. - pre-fix SHA derivation is confidence-flagged; low-confidence matches (#503/#528/#625/#677 currently) require a manual `sha` override before their results are trusted — surfaces the #625-class git-grep false positive rather than silently mis-deriving. - HIT/MISS is heuristic; the committed recall number is a human read of the captured JSON. Default is --dry-run (no live passes). Does NOT close #689 — the offline --run and the Layer-3 dogfood remain operator work. Entire-Checkpoint: 1c9e97b44e21
Extract the pure SHA-confidence classifier (classifyShaConfidence) out of the git-calling resolvePreFixSha and export score, so both are unit-testable without live git/ready (matches the scripts/analytics/*.test.ts convention). Guard main() behind the standard isMain check so importing the module in tests doesn't execute the CLI. 11 cases: high/low confidence (incl. the #625-class "mentions (#N) but not scoped" false positive, multi-match ambiguity, wrong-issue scope, override short-circuit, no-match) + HIT/MISS/? scoring. Dry-run behavior unchanged. Entire-Checkpoint: 22a45d560d30
3 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 the repeatable backtest driver for the
sequant readyLayer-2 measurement — the tooling half of #689 (which tracks #683's deferred AC-7). Makes the eventual offline run a single command instead of a hand-rolled per-case ritual.scripts/analytics/ready-backtest.ts:(#<issue>)squash-merge.sequant readydiscovers it viagit worktree list).readyunder both policies, captures JSON to.sequant/backtest/, emits a recall/noise table.Three methodology decisions, made explicit (not hidden)
--current-skills(default ON) overlays currentmainskill dirs onto the old product code, so the measurement answers "does today's gate catch this old bug," not "did the old skill."(#N)grep is the feat(state): prevent concurrent sequant sessions from targeting the same issue #625-class false-positive zone, so non-scoped/multi-match derivations are marked LOW-CONFIDENCE and require a manualshaoverride before they're trusted. Dry-run currently flags arch: extract RunOrchestrator — decouple execution engine from CLI wiring #503, fix(checkpoint): scope chain-mode checkpoint to feature paths, don't sweep dirty tree #528, feat(state): prevent concurrent sequant sessions from targeting the same issue #625, chore: raise Node engine floor to >=22.12 (drop EOL Node 20), unblock commander 15 #677.Safety / scope
--dry-run— no livereadypasses (those are slow + token cost; run offline with--run).npm run build+npm run lint(src/bin gate) green; consistent with existingscripts/analytics/*.ts.sequant readyfrom experimental: Layer-2 backtest + Layer-3 shadow dogfood, meet promotion gate (#683 follow-up) #689. The offline--run(Layer 2) and the ≥10-issue shadow dogfood (Layer 3) remain operator work; this just removes the plumbing toil.🤖 Generated with Claude Code