Skip to content

Note why the feature gallery's margin Undo can stay hidden under load - #1508

Merged
max-sixty merged 3 commits into
mainfrom
agent-ac559427b1778ee2b
Oct 1, 2026
Merged

max-sixty merged 3 commits into
mainfrom
agent-ac559427b1778ee2b

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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.md records the investigation so far:

  • the symptom: the passage's style stops updating (getComputedStyle ignores inline writes on span#bg-insert-line until its parent's style changes), so the layout's anchor name never applies and the row is parked;
  • the throttled 48-copy harness, its command and its numbers (stuck in 6–15 of 48 on main; the flake predates Hold a reopening and a new thread in an on-screen seat behind the row they would move #1493, per a bisect on CI);
  • what each switch ruled out, and the one lead (skipping the suggestion's whole #refreshMargin after the click cleared it once);
  • the static snapshot of the page, replaying the reject's DOM mutations, which did not reproduce it;
  • the next step: log every runtime call touching the suggestion between the click and the first stuck probe, and cut it down to a page without Leaf that sticks.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

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 leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread notes/margin-stuck-style.md Resolved
@max-sixty
max-sixty merged commit bb0fa92 into main Oct 1, 2026
7 of 8 checks passed
@max-sixty
max-sixty deleted the agent-ac559427b1778ee2b branch October 1, 2026 12:18
max-sixty added a commit that referenced this pull request Oct 2, 2026
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_
max-sixty added a commit that referenced this pull request Oct 2, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants