Repository navigation
Note why the feature gallery's margin Undo can stay hidden under load - #1508
Conversation
The two feature-gallery nightly tests that flake on main (the margin's real actions, and a choice kept through its proposal's undo) show a real defect: under CPU load, rejecting `bg-insert` can leave its Undo row hidden. The note records the stuck-style symptom, the 48-copy throttled harness and its numbers, what each switch ruled out, the `#refreshMargin` lead, the static snapshot that did not reproduce it, and the next step toward a Chromium report or a Leaf fix. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The reproduction command under “How it was measured” runs tests/test_scratch_stuck.py, but the note says that file was not committed and it is absent from this PR. A reader cannot rerun the 48-copy probe or validate the reported rates and switches from the recorded command. Please retain the small harness, or include a self-contained command that recreates it, so this investigation remains reproducible; root AGENTS.md says a note keeps the finding and the command that reproduces it.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
left a comment
There was a problem hiding this comment.
The saved reproduction command exits with a pytest teardown error, so it does not currently give a passing rerun of the measurement. In a one-copy run, the probe wrote its JSON result but the browser fixture reported unchanged write: style on both probed elements. The inline suggestion uses the harness's observational-write wrapper; the same one-copy run passed with it.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Tests that pin accidental restrictions can teach future agents to preserve them. This applies the user's 23 accepted scopes from a deep audit of the suite, removing or narrowing those assertions while retaining useful behavioral guarantees. Production behavior is unchanged. The changes release fixed margin capacities, layout and timing policies, truncation rules, description-only artifact identity, and refusals of otherwise valid content. The margin journeys now prove complete ordered Page Map access and actual spill reachability without requiring six inline entries or a fixed number of fixture peers. Tests still hold invalid-input safety, rendering readiness, meaningful labels, layout stability, optimistic actions, and final-answer semantics. Review restored useful assertions where the original proposals went too far, including declared-language validation, passage ownership/readiness, and filename layout geometry. Five proposals were kept; the image-difference item was left to its existing owner. Validation before integrating main: 1,471 everyday Python tests, seven affected margin browser cases, and independent code and desktop/phone review. On the integrated tree, all-file pre-commit, 190 runtime tests, the semantic-progress test, and independent integration review pass. The margin rerun passes eight cases and reproduces the gallery's hidden Undo defect at 700px before this PR's changed assertions; the existing [investigation](#1508) and [repair owner](#1506) cover it. CI runs the landing gates and changed nightly cases on the integrated tree. The first integrated CI attempt reports 1,545 passed, 3 skipped, and one failure in the same gallery Undo journey at 1440px, before the changed Page Map assertions. The automated second attempt also fails that journey, at 700px with an invisible Undo control. The automated reviewer approved the exact head. The existing reachability repair remains with its owner, and this PR retains the test that exposes it. The user requested merging these reviewed test changes with that pre-existing CI failure outstanding. > _This was written by Codex on behalf of max-sixty_
…1506) The gallery's insertion Reject/Undo can leave controls hidden even though their target is on screen. Two problems were reproduced on main: margin layout permanently cached an unavailable anchor by element identity, and the gallery's suggestion can retain stale style or zero-size geometry under load. Margin layout now reads anchor availability on each pass, so lifting an author's anchor scope restores the existing row. The gallery tests also follow Undo to its current row and wait for admitted gestures and scheduled layout. The initiating gallery style/geometry failure remains unresolved. The user invoked `/fix-ci`, whose documented fallback permits a reasoned `xfail` for a stuck failure verified on main. The four-width suggestion Reject/Undo journey continues to run with `strict=False`, limited to assertion and Playwright timeout failures; setup exceptions remain red. Draft save, reload, and Page Map reaction checks run in a separate unmarked four-width case. `notes/margin-stuck-style.md` retains the reproduction and evidence, including failure without test watchers and the limits of the browser-version comparison. Refs #1505 and #1508. The scope-restoration regression fails before the runtime change and passes afterward. Four related browser cases pass; a resting-page probe found no spontaneous layout loop over 30 frames. Fresh gallery runs reproduced the invisible insertion Undo at 1200px and 700px and later XPASSed, confirming the intermittent failure remains exercised. All four unmarked draft and Page Map cases, 190 runtime tests, and pre-commit pass. A served startup comparison loaded 202 requests in both arms and transferred 3,956,786 versus 3,956,589 encoded bytes by presentation, with no added requests or bytes. > _This was written by Codex on behalf of max-sixty_ --------- Co-authored-by: leaf-agent <[email protected]> Co-authored-by: Maximilian Roos <[email protected]> Co-authored-by: Maximilian Roos <[email protected]>
The two feature-gallery nightly tests that flake on main show a real defect: under CPU load, rejecting the gallery's suggested insertion can leave its margin Undo hidden beside a passage that is on screen, and an Undo can leave Accept and Reject hidden the same way. The tests stay as they are, unmarked.
notes/margin-stuck-style.mdrecords the investigation so far:getComputedStyleignores inline writes onspan#bg-insert-lineuntil its parent's style changes), so the layout's anchor name never applies and the row is parked;#refreshMarginafter the click cleared it once);🤖 Generated with Claude Code