feat(calibration): consume the ai_review_close_confidence override and flip the knob to live#8197
Merged
Merged
Conversation
…d flip the knob to live The #8176 gate-authority change, mirroring the satisfaction floor's consumption discipline exactly: - One bounds-validated resolution point: getKnobOverride reads the knob's system_flags row only when its own wrangler var (AI_REVIEW_CLOSE_CONFIDENCE_AUTOTUNE_ENABLED, false by default) is ON, and refuses anything not strictly below the shipped 0.93 or under the 0.85 hard minimum. gateCheckPolicy threads it as the LAST-resort default — an explicit per-repo gate.aiReview.closeConfidence setting always wins. - Generic apply machinery (knob-loosening-run.ts): the satisfaction run/status/tick generalized over the registry entry rather than duplicated. The satisfaction floor keeps its legacy module and event shape; the shared cron tick now runs every OTHER live knob, double-gated per knob. Report-only refusal stays enforced in the write path itself. - Registry entries carry their apply plumbing (override flag key, event type, autotune var), pinned against the legacy constants by invariant tests; the close-confidence knob flips to applyMode live. - Operator surface: GET /v1/internal/calibration/knobs renders every live knob's flag state, shipped/live/override values, and applied history through one projector that reads both proposal spellings. Closes #8176
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8197 +/- ##
=======================================
Coverage 92.07% 92.07%
=======================================
Files 771 772 +1
Lines 77942 78008 +66
Branches 23545 23566 +21
=======================================
+ Hits 71767 71828 +61
Misses 5062 5062
- Partials 1113 1118 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
What
The #8176 gate-authority change: the second registry knob gets its consumption plumbing and flips
report_only→live, mirroring the satisfaction floor's discipline exactly.How
getKnobOverridereads the knob'ssystem_flagsrow only when its own wrangler var (AI_REVIEW_CLOSE_CONFIDENCE_AUTOTUNE_ENABLED, false by default — the deploy is behavior-identical until an operator opts in) is ON, and refuses anything not strictly below the shipped 0.93 or under the 0.85 hard minimum.gateCheckPolicythreads it as the LAST-resort default at all four call sites — an explicit per-repogate.aiReview.closeConfidencesetting always wins; the advisory twins are untouched.knob-loosening-run.ts): the satisfaction run/status/tick generalized over the registry entry. The satisfaction floor keeps its legacy module and event shape (itscurrentFloor/proposedFloormetadata is a load-bearing operator contract); the shared cron tick now runs every OTHER live knob, double-gated per knob, one-shot alert per applied step. Report-only refusal is enforced in the write path itself, whatever the evaluator claims.GET /v1/internal/calibration/knobs— the calibration: operator visibility for applied loosenings — live floor + history on the internal calibration surface #8161 status generalized: per-live-knob flag state, shipped/live/override values, applied history with both split verdicts, one projector reading both proposal spellings.Validation
Full
npm run test:cigreen locally (1115 test files passed; the only 3 failures in that run were main's pre-#8192 docs breakage, since merged and re-verified green on the rebase). 100% line+branch coverage on every touchedsrcrange, including the defense-in-depth refusals, forced write rejections, and the non-Error alert-formatter arm.Closes #8176