Skip to content

Set a root workspace's copy at the page's width in either posture - #659

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-34719169306
Sep 13, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-34719169306

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

The scheduled ci nightly run 34719169306 on d2c2a29 came back 2 failed, 2559 passed. test_revision_changes_follow_authored_text_into_declared_shadow_trees was already repaired by #648, which merged 19 minutes after the run started. This is the other one.

Cause

tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidence read the two desktop captures at 1042 px where it wants 1278. A copy of a root workspace is set at the page's width, and that box is stated in html.lf-copy body > main:has(...) — but only its height and block padding were. The width, max-width, margin and offset came from the screen rule above it, which is qualified on [data-lf-reading-posture="bounded"]. So a copy taken while the root fit answered flow fell back to main's ordinary box: the prose column, less whatever the right strip claims. With the 240 px rail CI measured on that page, that column leaves the evidence host 1044 px, and lf-shot's min(100%, var(--lf-vr-capture-width)) clamps a 1280 px capture to 1042.

Which posture the copy is set in was a race. Entering copy mode reveals every case and drops the workspace to height: auto, which resizes the body, which is exactly what makes the root fit observer re-answer on the next frame. The test read the widths in the window before that frame landed. On this sandbox the read wins and the page still reports bounded; under the nightly's load it does not.

Fix

State the whole copy box on the root context, where it already belonged: a copy holds no window, so its width follows from the element being the root workspace and not from the posture the live page happened to be drawn in. The copy is now the same page-width workspace whichever posture the fit lands on, and no longer a reading of a race.

The test now also reads the widths again once the fit has answered, so the reading it pins is the settled one rather than one the page passes through.

Verification

Docker is unavailable in this sandbox, so scripts/linux-suite.sh could not supply CI's fonts. Instead the rail claim CI measured was stood up directly on the page, which reproduces the failing number to within the rail's own width:

--rail on main copy widths, before copy widths, after
unset (this sandbox) [388, 388, 388, 388, 1221, 1221] after settle [388, 388, 388, 388, 1278, 1278]
240px (CI's reading) [388, 388, 388, 388, 1040, 1040] [388, 388, 388, 388, 1278, 1278]

Reverting only the CSS fails the test's new settled assertion, so the regression cannot come back silently.

Suites run on this branch: tests/test_render_projection.py, tests/test_render_gate.py, tests/test_render_export.py, tests/test_render_widgets.py, tests/test_render_options.py, tests/test_render_conversations.py, tests/test_render_drafts.py, tests/test_render_visual_review_journey.py and tests/test_site.py under --run-nightly, plus the everyday suite and pre-commit on the changed files.

Failures this sandbox cannot run, checked against unmodified main

Seven failures across those runs are the sandbox rather than the change; each was reproduced at main in the same directory, or is mechanically out of the diff's reach.

  • Everyday suite: test_staged_writes_honor_umask_without_copying_a_replaced_symlink_mode, test_the_stated_host_wildcard_serves_both_families, test_app_server_observer_connects_over_a_private_unix_socket, test_codex_launch_owns_one_private_app_server — read-only /tmp, the sandbox umask, and no IPv6, which is the set Name the everyday-suite cases an agent sandbox cannot run #628 is naming.
  • test_render_export.py::test_the_example_preview_command_exports_a_file_that_opens_on_its_own and test_exporting_an_example_leaves_the_live_preview_untouched — "export needs a browser, and none launched"; the sandbox cannot start the installed Chrome these two drive.
  • test_render_conversations.py::test_resolve_acknowledges_the_press_and_recovers_a_refusal failed twice under -n2, on a different parameter and with a different symptom each time, and passed on the third run. ASK_PAGE has no workspace and never enters copy mode, so neither selector in the diff can reach it. The same selection passed four times at main, once in this same directory.

Copy mode's main box for a root workspace was stated only for the bounded posture, so a copy taken while the root fit answered flow was set in the prose column with the margin strip subtracted. Entering copy mode resizes the body, which is what makes the fit answer, so the copy width depended on which of the two landed first.
@max-sixty
max-sixty merged commit b9d3380 into main Sep 13, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/ci-34719169306 branch September 13, 2026 03:42
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