feat(calibration): per-repo loosening loop — repos earn overrides on their own evidence#8264
Merged
Merged
Conversation
…their own evidence (#8217) Epic #8211 track B capstone: on the same calibration tick, each live knob's per-repo pass evaluates every repo whose OWN labeled slice clears the knob's sample floors (computeRepoCorpusDensity — same split, same minimums) from the repo's CURRENT resolved value, and applies to the repo-scoped key under the identical discipline as the global loop: smallest candidate step, visible improved + held-out non-regressed on the REPO slice, hard minimum, double flag gating, one error-level alert per applied step (ev stays per-knob, repo in the body — the Sentry-fingerprint discipline). Sparse repos inherit global untouched. Bounded work per tick: at most 10 eligible repos in deterministic order with a rotating system_flags cursor, so a large-fleet future never turns the tick into a stampede. Fail-safe per repo AND per tick, including non-Error throws. 100% line+branch on the module. Closes #8217
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 #8264 +/- ##
==========================================
- Coverage 92.15% 91.63% -0.53%
==========================================
Files 786 786
Lines 78814 78860 +46
Branches 23790 23800 +10
==========================================
- Hits 72630 72261 -369
- Misses 5062 5524 +462
+ Partials 1122 1075 -47
Flags with carried forward coverage won't be shown. Click here to find out more.
|
JSONbored
added a commit
that referenced
this pull request
Jul 23, 2026
orb-v3.3.0 shipped stable, so the beta cutter is idle until the manifest's declared target moves forward. The calibration-expansion epic's merges since (per-repo loosening #8264, reviewer votes #8265, tightening #8267, AMS loop #8270, counterfactual replay #8271) are feats — the inferred bump is minor, so the next automated snapshot targets orb-v3.4.0-beta.1.
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 #8217.
Adds the per-repo apply path on top of #8216's override precedence: repos whose own signal history is dense enough now earn repo-scoped overrides from their own evidence, instead of inheriting only the global knob.
runPerRepoKnobLoosening(env, knob): slices the trailing 90-day corpus by repo (sliceCorpusByRepo, contributor calibration: pure per-repo corpus slicing + density stats #8215), checks per-repo density eligibility (computeRepoCorpusDensity), and evaluatesevaluateKnobLooseningon each eligible repo's own slice with the knob's unchanged split discipline.PER_REPO_LOOSENING_MAX_REPOS_PER_TICK(10) repos, resumed via a rotatingper_repo_loosening_cursor:<knobId>system flag, so a large install never starves the dispatch tick.<overrideFlagKey>:repo:<owner/repo>) that calibration: per-repo knob overrides — storage scheme, resolution seam, and full settings wiring #8216'sgetKnobOverrideForRepoalready consumes, with the same non-best-effort write + one structured alert per applied step,metadata.scope: "repo".loadKnobStatusnow reportsrepoOverridesso the knobs endpoint shows every earned repo override beside the global state.Validation
npm run test:cigreen (TEST_CI_EXIT=0), plusnpm audit --audit-level=moderate.tsc --incremental falseclean and the affected suites (knob-loosening-run,job-dispatch) pass 31/31.