feat(review): surface backtest-cleared loosening proposals in the tuning advisor#8177
Merged
Conversation
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 #8177 +/- ##
==========================================
+ Coverage 89.54% 89.58% +0.03%
==========================================
Files 97 100 +3
Lines 22622 22712 +90
Branches 3866 3889 +23
==========================================
+ Hits 20257 20346 +89
Misses 2187 2187
- Partials 178 179 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ing advisor (#8160) computeTuningRecommendations still emits loosening advice as prose with no payload -- and the #8121 loop that can now actually measure a loosening was invisible to the advisor. buildSatisfactionFloorLooseningRecs (pure) turns the loop's state into ranked TuningRecs: a backtest-cleared proposal surfaces as a good-severity rec carrying both split verdicts, sample sizes, and the precision movement inline, with the action line matched to the flag state; a recently applied loosening surfaces as info pointing at the #8161 status surface. HARD BOUNDARY, tested: these recs never carry an overridePayload -- that field is the tightening-only auto-apply channel, so the advisor's apply path provably cannot promote a loosening. loadSatisfactionFloorRecState (evaluate-ONLY, fail-safe) feeds it from the same corpus + current floor the applying tick would use, and runSelfTune appends the recs exactly once per pass on the first repo's iteration (deployment-global state, never once per repo -- pinned by a spy test). 100% line+branch coverage on the new pure module; state-read paths (override- adjusted floor, empty corpus, broken DB, flag-off advice) all pinned. Closes #8160.
JSONbored
force-pushed
the
feat/loosening-advisor-recs
branch
from
July 23, 2026 08:48
d957ab8 to
a50b863
Compare
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
buildSatisfactionFloorLooseningRecs(pure, 100% branch-covered) turns the loop's state into rankedTuningRecs — a backtest-cleared proposal surfaces as agood-severity rec carrying both split verdicts, sample sizes, and the precision movement inline, with the action line matched to the flag state; a recently applied loosening surfaces asinfopointing at the calibration: operator visibility for applied loosenings — live floor + history on the internal calibration surface #8161 status surface.overridePayload— that field is the tightening-only auto-apply channel, so the advisor's apply path provably cannot promote a loosening.loadSatisfactionFloorRecState(evaluate-ONLY, fail-safe) feeds it from the same corpus + current floor the applying tick would use;runSelfTuneappends the recs exactly once per pass on the first repo's iteration (deployment-global state — pinned by a spy test over a two-repo pass).Closes #8160
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:testnpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:ciran with 1,112 test files / 20,684 tests passing and exactly one failure: the pre-existing main breakage fixed in fix(ci): carry the no_tests_matched escape through every coverage/results upload step #8173 (merged). After rebasing onto that fix (which also absorbed feat(calibration): schedule the satisfaction-floor loosening tick with a one-shot apply alert #8175's append-conflict in the run module — both sides kept, all 20 merged-file tests green), the policy test re-ran green along with typecheck and every touched suite. New pure module at 100% line+branch; state-read paths (override-adjusted floor, empty corpus, broken DB, flag-off advice) all pinned.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.Advisor output is numbers, verdicts, and env-var/endpoint names only. The apply-channel separation (no payload, ever) is the load-bearing safety property and has its own test.
UI Evidence
Not applicable — no UI change.
Notes