Repository navigation
fix: make the native-anchor watch test inject real movement - #4976
Merged
Merged
Conversation
The important all rollback cancels the lower-tier case's normal inline margin. Its control stayed at x=350 before and after the fault; macOS correctly omitted it while Linux could pass on a spurious finding. Give the injected margin inline importance in that case and verify actual displacement in every case before judging the watch. The geometry assertion fails with the old injection and all six cases pass with the correction, including at 10x CPU throttling. This preserves #4503's intended independent-offset coverage without changing the watch or page behavior. Closes #4916
leaf-agent
added a commit
that referenced
this pull request
Nov 4, 2026
…5298) The shift watch missed `button#control`'s 130px margin move in `test_native_anchor_follows_owned_translation_but_not_an_independent_offset[lower-True]`. It read the important rollback `#tip {all:revert-layer!important}` as a normal declaration, because Chrome's CSSOM leaves a longhand set only by an important `all` with an empty `getPropertyPriority` and keeps the importance on `all`. That left `left:anchor(left)!important` alone in the important tier, so the watch treated the surface as natively anchored and credited the control's independent move to the anchor's equal 130px travel. The watch now takes a declaration's priority from `all` when the longhand reports none. It reads priority this way in all four places: rule tiers, important-only filtering, and both inline checks. The test setup also hid the miss on Linux. The guard styles were added after the page presented, and that restyle moved the control (by `[0, -21]` in `lower`, `[-350, -100]` in `wins`). The watch reports each moved node once per page, so on Linux that setup report satisfied `names_move(errors, "button#control")` before the fault ran. On macOS the setup move fell inside the presentation window, so only the real miss was left. That is why this case has failed in every scheduled macOS run since #4503 added it, including after #4976. The guards now sit in the document's own `<style>`, and the test asserts the watch reported nothing before the fault. Verification on Linux, Chrome 156: - With the restructured test and the old watch, `lower-True` fails with the same finding the macOS runs show: only `p#trigger` is named. It passes with the fix. - All six cases pass. - The 56 shift-watch tests matching anchor, rollback, layer or translation pass, both normally and at `--cpu-throttle 10`. The macOS job runs only on schedule or dispatch, so the next scheduled `test-macos` run is what confirms it there. The change touches only test instrumentation; Leaf's runtime and interface are unchanged. Closes #4916 — automated triage Co-authored-by: leaf-agent <[email protected]>
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.
The native-anchor watch regression added in #4503 did not inject movement in its
lower-Truecase:all: revert-layer !importantcancels the normal inline margin, leaving the control at x=350 before and after the supposed fault. The reported macOS failure therefore asserted a finding for a control that had not moved. Linux passed the old test despite the same stationary geometry.The injected margin now has inline importance in that case. Every case also asserts the control's actual displacement before checking the watch, preserving both owned anchor travel and independent-offset coverage. The watch and Leaf's interface are unchanged.
Validation: the new geometry assertion fails against the original injection (0px instead of 130px). All six cases pass with the correction, normally and at 10× CPU throttling; Ruff and diff checks pass. macOS verification will run through a manual
cidispatch on this branch; its result remains pending.Closes #4916 — automated triage