feat(selftune): fold the REGRESSED-verdict track record into the self-tune tick's rec list - #8788
Merged
Merged
Conversation
…-tune tick's rec list (#8763) scripts/backtest-track-record.ts computed the rollup #8105's Phase-2 gating decision needs, but had zero non-manual callers — a human had to remember to run it against prod. The self-tune tick already appends report-only rec lines (the #8227 reliability-curve precedent), so the same rollup now rides along: - loadBacktestTrackRecord (selftune-wire.ts) reads the same three persisted event types the CLI queries (threshold run imported for real; the two scripts-side literals hand-mirrored with sync comments, matching the CLI's own posture in the other direction), extracts metadata.comparison, and aggregates via the shared engine computeRegressedVerdictTrackRecord. Fail-open per event type — a poisoned read degrades to fewer comparisons, never breaks the tick. - buildTrackRecordRecs (loosening-recs.ts) renders it as one payload-less rec: zero runs → no line (no steady-state noise); any regressed run → info severity; all-clean → good. The CLI stays the deep-dive view.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | 3bc5ada | Commit Preview URL Branch Preview URL |
Jul 26 2026, 05:54 AM |
2 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8788 +/- ##
==========================================
- Coverage 93.81% 92.26% -1.55%
==========================================
Files 797 797
Lines 79540 79556 +16
Branches 24108 24112 +4
==========================================
- Hits 74618 73401 -1217
- Misses 3556 5090 +1534
+ Partials 1366 1065 -301
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
Closes an OPEN feedback loop from adversarial-audit epic #8757:
scripts/backtest-track-record.tscomputes the REGRESSED-verdict rollup that #8105's Phase-2 merge-gating decision needs, but nothing scheduled it — a human had to remember to run the CLI against prod. The self-tune tick already appends report-only rec lines (buildKnobReliabilityRecs, #8227), so the rollup now rides the same channel.Changes
src/review/selftune-wire.ts—loadBacktestTrackRecord(env): reads the same three persisted event types the CLI queries (THRESHOLD_BACKTEST_EVENT_TYPEimported for real from its Worker-side writer; the logic + counterfactual literals hand-mirrored with kept-in-sync comments, matching the CLI's own posture toward Worker modules in the other direction), extractsmetadata.comparison, aggregates via the shared enginecomputeRegressedVerdictTrackRecord. Fail-open per event type. Wired intorunSelfTune's once-per-pass rec block.src/review/loosening-recs.ts—buildTrackRecordRecs: one payload-less rec line; zero runs → no line (steady-state silence), regressed > 0 →info, all-clean →good. The apply path can never promote it (nooverridePayload), same as every builder in that file.Test plan
npm run typecheck— cleanselftune-wiring/loosening-recs/selftune-readback, including: cross-event-type aggregation with a comparison-less row skipped, empty steady state, poisoned-read fail-open, and all four builder rendering armsCloses #8763