SleepPSG: sync RecipeConfig.shipped with #987's awake row (main is red) - #997
Merged
Conversation
#987 changed SleepStagerV2's awake transition row; #991's port-equivalence guard landed before it and correctly failed on main: RecipeConfig.shipped no longer reproduces SleepStagerV2 — 195 of 12377 epoch labels differ. This is the guard working, not a defect in it. #991 merged AFTER #987 was opened, so #987's own green CI never ran the SleepPSG job — its branch predates the tool. MERGEABLE CLEAN only ever meant no textual conflict, and there was none: the two files never touch. The coupling is semantic, which is exactly the kind a test has to catch because review will not. RecipePort's own comment already called this out — the awake row "is the one line that legitimately differs between branches" and RecipeConfig.shipped "must always describe SleepStagerV2 AS COMPILED on this branch". So the fix is the single line it predicted, and Variants.pr987 needs no edit: it reads the shipped row and offers whichever one is not there, so the #987 ablation keeps working from the other side.
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.
main is failing
Swift Packages CI / tools (SleepPSG)after #987. This is the one-line fix.What happened
#987 changed
SleepStagerV2's awake transition row. #991's port-equivalence guard — merged before it — caught the divergence immediately:This is the guard doing precisely what it was built for, on its first real occasion, and it named both the cause and the file to fix. Without it the tool would have gone on printing confident numbers about a recipe that no longer existed — which is the failure mode #991's description called out.
Why it slipped through
#991 merged after #987 was opened, so #987's branch predates the tool and its 13/13 green never included a
tools (SleepPSG)job.MERGEABLE CLEANonly ever meant no textual conflict, and there genuinely was none — the two files never touch. The coupling is semantic, which is exactly the kind review does not catch and a test does.Worth noting for future merges: a green PR check plus a clean merge state does not imply main stays green when a guard has landed in between.
The fix
One line, and
RecipePort.swift's own comment predicted it:Variants.pr987needs no edit. It reads the shipped row and offers whichever one is absent:so the #987 ablation keeps working from the other side, comparing post-#987 against pre-#987 instead of the reverse.
Verification
Port row and
SleepStagerV2.swift:205now agree character-for-character:["deep": 0.0, "rem": 0.0, "light": 0.10, "awake": 0.90].swiftc -parseclean. The real check istools (SleepPSG)on this PR — it replays all 55 corpus nights against the compiled stager, so it passes only if the port genuinely reproduces it again.