test(b5): SSIM masking red tests [F#14 F#15]#151
Merged
Conversation
11 RED tests covering SSIM status-bar masking (F#14) and auto-populate ssim_masks at record time (F#15). No production code — all failures point CodeAtlas to the exact API additions needed in simdrive/src/simdrive/recorder.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add DEVICE_STATUS_BAR_MASKS lookup table and _default_status_bar_mask() helper; extend _ssim_or_fallback() with device_name param for auto-masking; Recorder.finalize() auto-writes ssim_masks for recognised device classes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Red test coverage for two b4 dogfood findings from INIT-2026-549. No production code — all 11 tests fail with intentional assertion messages pointing CodeAtlas to the exact production change needed.
DEVICE_STATUS_BAR_MASKSdict exists with iPhone 17 Pro + iPhone 16 Pro entries,_default_status_bar_mask(device_name)helper returns a{x,y,w,h,label}dict,_ssim_or_fallbackacceptsdevice_namekwarg and auto-applies the mask, and unknown devices returnNone(graceful degradation).recording.yamlomitsssim_masksfor status bar so every replay sees clock change. AssertsRecorder.finalize()writesssim_maskswith onestatus_barentry for iPhone 17 Pro and iPhone 16 Pro, dimensions match device class, and unknown devices omit the key (notNoneor[]).4 supporting tests pass (existing API is correct): explicit mask restores SSIM, YAML ssim_masks are read by replay, unknown device gracefully omits masks.
Test plan
pytest -m "not live" simdrive/tests/test_b5_domain_d_ssim_masking.py— expect 11 FAILED (RED), 4 PASSED (supporting)pytest -m "not live"must remain green on the implementation PR🤖 Generated with Claude Code