fix(0.40.5): gates compute a real holdout delta (baseline/candidate were conflated)#101
Merged
Merged
Conversation
…ere conflated) CRITICAL: runImprovementLoop merged baseline + candidate judge scores into ONE map keyed by cellId. Baseline and candidate share cellIds (same holdout scenarios), so the baseline overwrote the candidate — both heldOutGate and defaultProductionGate then computed baseline == candidate, delta == 0, and a real improvement could NEVER ship. Surfaced by the gtm cycle (the second substrate gap the first real consumer caught). Fix: - GateContext gains `baselineJudgeScores` (separate from candidate `judgeScores`). - runImprovementLoop populates them distinctly (no merge). - heldOutGate + defaultProductionGate read candidate from `judgeScores` and baseline from `baselineJudgeScores` — a real delta. Tests: heldOutGate now asserts a real ship (delta 4.0) AND a real hold (delta 0) with separate maps — replacing the loose `['ship','hold']` assertion that masked the bug. Suite 1422/1422, build + lint clean. 0.40.4 → 0.40.5 (npm + python lockstep). Unblocks gated improvement everywhere.
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.
Second substrate gap caught by the gtm cycle.
runImprovementLoopmerged baseline + candidate judge scores into one cellId-keyed map; since they share cellIds, baseline overwrote candidate → delta always 0 → improvement could never ship.Fix:
GateContext.baselineJudgeScores(separate from candidatejudgeScores);runImprovementLooppopulates both distinctly;heldOutGate+defaultProductionGateread candidate vs baseline correctly. Tests assert a real ship (delta 4.0) + real hold (delta 0), replacing the loose assertion that masked it. 1422/1422. 0.40.4 → 0.40.5.