Skip to content

Select the shadow fixture package explicitly - #648

Merged
max-sixty merged 1 commit into
mainfrom
codex/ideas-page-full-height
Sep 12, 2026
Merged

max-sixty merged 1 commit into
mainfrom
codex/ideas-page-full-height

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Select the test-authored ./.leaf package explicitly so the declared-shadow revision fixture follows the package cutover from #642.

Validated with all 119 revision-projection tests.

This was written by Codex on behalf of max-sixty

@max-sixty
max-sixty merged commit dd18bf0 into main Sep 12, 2026
7 checks passed
@max-sixty
max-sixty deleted the codex/ideas-page-full-height branch September 12, 2026 21:28
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]>
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