Repository navigation
Stub all three fields the snapshot reads, not two of them - #9274
Merged
Merged
Conversation
Backend CI (Python 3.13) went red across several open PRs on assert (True, 'mlx_u...eds >=0.4.4)') == (True, 'mlx_u...ilable', None) and none of those PRs touch this code. _hardware_snapshot reads three fields; the test pinned all three while monkeypatching only two, so the third assertion held on whatever the real hardware module happened to be carrying. That was None until an mlx-vlm bump left a live '(needs >=0.4.4)' detail behind, and the whole thing tipped over. The failure then reads as a snapshot bug, which is the expensive part: it sends the next person into main.py's seqlock, which is fine. So the detail is stubbed too. And since stubbing it to None could equally hide a snapshot that had stopped reading it at all, the test now also pins a non-None detail and asserts it travels with its reason -- which is the property the test is named for. Mutation-tested both ways: a snapshot that returns None for the detail, and one that pairs a reason with a stale detail, are both caught. studio/backend: 100 passed.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
This was referenced Aug 19, 2026
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.
What broke
Backend CI (Python 3.13) went red across several open PRs on:
None of those PRs touch this code, and main was green at 07:19 and red by 07:45, so nothing in the repo changed either.
Why
_hardware_snapshot()reads three fields. The test pinned all three while monkeypatching only two:CHAT_ONLY_DETAILwas never stubbed, so the third element asserted whatever the real hardware module happened to be carrying. That wasNoneuntil an mlx-vlm bump left a live(needs >=0.4.4)detail behind.The expensive part is not the red run, it is where it points: the failure reads as a snapshot bug and sends the next person into
main.py's seqlock, which is fine.The fix
Stub the third field too.
Stubbing it to
Nonealone would swap one under-specification for another -- it would equally pass against a snapshot that had stopped reading the detail at all. So the test now also pins a non-None detail and asserts it travels with its reason, which is the property the test is named for.Verification
Mutation-tested against
main.py, both directions:studio/backend: 100 passed.