fix: preserve region stability across theme drift#153
Merged
Conversation
abrichr
marked this pull request as ready for review
July 19, 2026 02:55
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
REGION_STABLEoutcome evidence armed across light/dark palette changesRoot cause
The v1.16.1 benchmark substituted a new parameterized note under
?drift=theme.The save succeeded and the independent final-state oracle confirmed the exact
note, patient, and encounter type, but the final saved-region pHash crossed its
fixed-position threshold because the region contained both the new text and
the palette change.
Measured on the exact reproducer:
0.143,structural edge template
0.860, pHash distance320.245The structural acceptance threshold is
0.80; the original grayscale check,sealed/local search boundary, and pHash remain in place. The postcondition is
not removed and its pHash tolerance is not relaxed.
Verification
112 passed:tests/test_vision.py tests/test_replayer.py tests/test_drift_oracle.py tests/test_postcondition_fuzz.py tests/test_seal_template_crops.py3/3pass with theindependent effect oracle and zero model calls
region_stableandtext_presentfail2 passedruntime/replayer.py: passartifact
Final local artifact hashes:
2dec0ba2e4640dcd1b33e0f7a9ce3f4d0d2fc1ee2db30331adde786f4b437a82bd4fff313a2134ce9b0c6acdd80d4ed2e6c2bd155a24ebf817e68e05e6494aa9Coordination
Draft #152 also edits
runtime/replayer.py, but its only nearby hunk inserts_attended_transition_observationbefore_structural_changed; it does notmodify the postcondition evaluator. Semantic overlap is none. Merge this small
fix first, then rebase #152 to resolve the file-level ordering cleanly.
Related evaluation: OpenAdaptAI/openadapt-evals#270.