feat(calibration): pure per-repo corpus slicing and labeled-density stats - #8234
Closed
kai392 wants to merge 1 commit into
Closed
feat(calibration): pure per-repo corpus slicing and labeled-density stats#8234kai392 wants to merge 1 commit into
kai392 wants to merge 1 commit into
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 #8234 +/- ##
==========================================
- Coverage 92.10% 92.10% -0.01%
==========================================
Files 776 777 +1
Lines 78328 78348 +20
Branches 23668 23672 +4
==========================================
+ Hits 72147 72163 +16
Misses 5062 5062
- Partials 1119 1123 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Contributor
Author
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
packages/loopover-engine/src/calibration/repo-corpus.ts(Epic: calibration expansion — self-correcting configuration and measured judgment #8211 track B's first building block) with two pure functions besidebuildBacktestCorpus, per the epic's file-per-concern discipline:sliceCorpusByRepo(cases)— deterministicMap<repoFullName, BacktestCase[]>keyed by everything beforetargetKey's last#(so an embedded#in a repo name never truncates it); unparseable keys (no#, or nothing before it) are dropped, never guessed; per-slice case order and first-appearance repo order preserved.computeRepoCorpusDensity(cases, minVisible, minHeldOut, heldOutFraction, splitSeed)— per-repo{cases, confirmed, reversed, eligible}whereeligiblere-runs the deterministic seeded split on that repo's OWN slice and requires both sides to clear the floors — the exact never-on-noise barevaluateKnobLoosening/evaluateKnobDriftapply globally.Closes #8215
Test plan
test/unit/repo-corpus-engine.test.ts(vitest, importing the engine source — the root mirror suite per the engine blind-spot rule): multi-repo slicing with order preservation; embedded-#repo keying; unparseable-key drops; empty corpus; density floors above/below (including a held-out-side-only miss); split determinism per slice; the no-corpus-content invariantpackages/loopover-engine/test/repo-corpus.test.ts(node:test vs dist): barrel re-export + slicing/density round-tripnpm run typecheckgreen