Repository navigation
Name the everyday-suite cases an agent sandbox cannot run - #628
Closed
leaf-agent wants to merge 1 commit into
Closed
leaf-agent wants to merge 1 commit into
leaf-agent wants to merge 1 commit into
Conversation
This was referenced Sep 12, 2026
max-sixty
pushed a commit
that referenced
this pull request
Sep 12, 2026
… give it (#632) ## One window, two allocations `test_published_workspaces_keep_their_allocation_under_site_context[live-progress]` failed in the nightly run ([34678426457](https://github.com/max-sixty/leaf/actions/runs/34678426457)) reading `flow` where the published example is meant to hold its bounded desk. It reproduces here at the size the test drives, and the cause is not the site note's height on Linux fonts — it is that the same window allocates two different ways depending on which window the reader came from. `fitRootReadingElement` decides posture by comparing the available box against the minimum the root reports, and that minimum is a reading of the root's own live layout. In flow the root stands in the reading measure — 720px inside a 1200px window — while bounded would give it the full 1152px. Furniture that wraps is taller in the narrow one, so a root in flow reports a minimum for a layout the bounded posture would never have. Measured on the published Live Progress page at 1200×900: | Arrived from | Furniture read | Minimum height | Available | Posture | | --- | --- | --- | --- | --- | | a 1100-tall window | 200.3px at 1152 wide | 760.3 | 793 | `bounded` | | loading at 900 | 245.2px at 720 wide | 805.2 | 793 | `flow` | Flow is self-confirming: every reading taken from it is the flow reading again, so the reader who lands there cannot resize out of it. The available *width* in the same function is already computed as the box bounded would allocate — `body` width less `main`'s padding, not the measure column the root currently occupies — so the height term was the one reading that still described the posture in force rather than the one under decision. ## The reading is taken in the box under decision `readMinimumAt` holds the root at that width while the minimum is read, and restores it in the same task, so nothing paints between. That leaves the whole subtree — a root's own furniture and any nested pane's — laid out at the bounded width for the reading, rather than each `minimumSize` implementation having to correct for its current posture. It also holds the root's current height across the reading. Furniture that grows shorter at the wider width shortens the document, and Chromium clamps a scrolled reader's position to the page it measured rather than the one it restores: without the height held, a reader scrolled to the end of a flow page is moved 200px back up its page on the next layout signal. The added work is one forced layout per posture decision, on the pages that carry a root workspace only; `choosePosture` already forced one through `minimumSize`'s own `getComputedStyle` and box reads. The work before presentation is unchanged, read from `scripts/verify-site-local.sh` on this PR's [`test` job](https://github.com/max-sixty/leaf/actions/runs/34688543416) against [main's](https://github.com/max-sixty/leaf/actions/runs/34680715180): | Route | Base, by presentation | This change | | --- | --- | --- | | `/` | 12 JS / 217 KiB, 16 code / 406 KiB, 23 total / 868 KiB | identical | | `/examples/triage-board/` | 11 JS / 191 KiB, 15 code / 380 KiB, 19 total / 383 KiB | 19 total / 384 KiB | | `/examples/feature-gallery/versions/v1.html` | 30 JS / 384 KiB, 34 code / 572 KiB, 40 total / 720 KiB | identical | No request count moves anywhere, and the one kilobyte is document bytes rather than a resource. Elapsed times move in both directions between the two runs and are diagnostic only. ## Verification - `tests/test_render_widgets.py::test_a_root_posture_is_the_window_it_stands_in_and_not_the_one_it_came_from` walks a sweep of window heights down from a tall window and opens each of them fresh, and holds the two routes to the same answer. Its fixture wraps by geometry rather than by text — four fixed badges that stand on one row in a bounded allocation and two in the reading measure — so the divergence does not depend on a platform's font metrics, and a positive control fails the test if they ever stop wrapping. Against the runtime reverted it reports `{500: 'flow', 600: 'flow'}` where the walk down reports `bounded`. - `tests/test_render_widgets.py::test_reading_a_root_minimum_leaves_the_reader_where_they_had_scrolled_to` holds the clamp above. With the height pin removed it reads back 2603 where the reader left 2803. - `uv run pytest tests/test_site.py --run-nightly` — 45 passed, including the failing node. - `uv run pytest tests/test_render_widgets.py --run-nightly` — 155 passed. - `uv run pytest tests/test_render_gate.py --run-nightly` — 101 passed. - `uv run pytest tests` — 1028 passed, with the four failures #628 documents as unrunnable in an agent sandbox (IPv6 wildcard, read-only `/tmp` ×2, umask). - `uv run pre-commit run --files …` — passed. - `scripts/verify-site-local.sh` did not run: the sandbox has no access to the Docker daemon Wrangler needs for the page container. CI's `test` job runs it on this PR. ## The run's other failure is #631's `test_page_fixture_renders[notification-playground]` failed in the same run on `the runtime never injected its banner`. That is #629's startup stall, and #631 is open with the diagnosis and fix — request interception coming down inside the module burst. It reproduced here once in one full `test_render_gate.py` run (on a different node and viewport, `[dark] … at 1200x900`) and cleared on the next, which is the rate #631 measures. Nothing in this change touches it. --------- Co-authored-by: leaf-agent <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Sep 13, 2026
The scheduled [`ci` nightly run 34719169306](https://github.com/max-sixty/leaf/actions/runs/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(...)`](https://github.com/max-sixty/leaf/blob/360a9c87f50357f3f0771501ca413ad5a5f73fab/skills/leaf/packages/default/theme.css#L153) — 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](https://github.com/max-sixty/leaf/blob/360a9c87f50357f3f0771501ca413ad5a5f73fab/skills/leaf/assets/runtime/reading-layout.js#L229) 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. <details><summary>Failures this sandbox cannot run, checked against unmodified <code>main</code></summary> 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 #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. </details> Co-authored-by: leaf-agent <[email protected]>
This was referenced Sep 13, 2026
Owner
|
will try fixing the underlying issue |
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.
tests/CLAUDE.mdtells a reader that a container without IPv6 cannot run the two stated-host wildcard cases. Three more of the everyday suite fail the same way in an agent sandbox and nothing says so, so every session that runsuv run pytest teststhere re-derives from scratch whether four reds are its own change's fault. This adds those three to the sentence that already does that job.The three, each reproduced on an unmodified
mainin this sweep's own sandbox in 2.5 seconds:test_staged_writes_honor_umask_without_copying_a_replaced_symlink_modeopen()underumask(0o077)lands0o664, both under$TMPDIRand inside the checkout. The test asserts0o600and reads back0o664.test_app_server_observer_connects_over_a_private_unix_sockettempfile.TemporaryDirectory(..., dir="/tmp"), and the sandbox mounts/tmpread-only outside its allowlist.test_codex_launch_owns_one_private_app_serverdir="/tmp", but reached through the product:cmd_codex_launchhardcodes it.The third is the one worth a second look, and the reason the added prose names its mechanism rather than filing it with the other two.
leaf codex launchexitsOSError(30, 'Read-only file system')wherever/tmpis not writable, becausecodex.pyplaces the App Server socket there unconditionally. That is a limit of the product on a hardened host, not of the test, and what to do about it is a decision about the 108-bytesun_pathceiling that this sweep should not make — so the text says where the failure stands and leaves the call open. Recorded with the evidence on #186.Evidence and gate assessment
Three independent sessions hit this group in the 2026-09-11 → 2026-09-12 window, each re-deriving it:
tend-nightly34678598273 — "The everyday suite showed 4 failures here — IPv6 wildcard binding, read-only/tmp, and umask — all reproduced on the unmodified tree in this sandbox, andtests/CLAUDE.mdnames the IPv6 pair as unrunnable in a container." Only the IPv6 pair had an entry to point at.tend-ci-fix34598144471 — tenRead-only file systemhits in its session log while verifying Keep a copy's generated label with the control it names, and realign two nightly readings #583.Gate 1 — High: a consistent pattern across three sessions, and structural rather than stochastic. There is no decision point;
/tmpis read-only and the umask is overridden by construction, so every session that runs the everyday suite in a sandbox gets the same reds.Gate 2 — targeted fix at the normal threshold: prose extending the sentence that already carries this exact content for the IPv6 pair, in the file that owns test setup.
Gate 3 — wasted compute, so the remedy has to be nearly free. It is: a statement of fact beside an existing one, leaving behind no gate, no logic and no failure mode of its own. Nothing worse than waste has happened yet — both sessions above reproduced on the unmodified tree and correctly judged the failures environment-owned. The reason the note is worth having anyway is that
running-tend's Review test selection makes a selected failure withhold approval, so an undocumented environment red inside a review selection is a warranted approval withheld; that has not been observed, and is motivation rather than recorded cost.