Repository navigation
Refresh public example preview manifest - #164
Conversation
leaf-agent
left a comment
There was a problem hiding this comment.
inputs_sha256 is correct for this branch's base (b4a5aeb), but main has moved to d755e18 ("Keep page chrome on the document coordinate plane"), which edited four digest inputs under skills/leaf/assets/runtime/. On the merge result the digest is a5fbd867a36f22f1d71d2e82a7eafb03cfeb4037eff1d7f04490cfff569a059c, not aa676dc2… — so the assertion this PR set out to fix still fails once this lands.
This PR's own ci run can't show that: test_site.py is pytest.mark.nightly and ci.yaml passes --run-nightly only on push, so a green check here says nothing about the digest. Note inline on the file for what I'd regenerate rather than hand-edit.
The same collision is queued behind #163, which touches skills/leaf/assets/runtime/ and examples/release-notes.html — both digest inputs. Whichever of the two lands second re-stales the manifest, so this regeneration is worth doing as the last step before merging rather than up front.
How I checked
digest(capture_input_files()) is a pure function of tracked file bytes, so I recomputed it against three trees with the same code scripts/example-previews.py uses:
| tree | computed digest | manifest says |
|---|---|---|
b4a5aeb (this branch's parent) |
aa676dc2… |
ae6f4b2d… |
8731acf (this PR's head) |
aa676dc2… |
aa676dc2… |
d755e18 / merge result |
a5fbd867… |
aa676dc2… |
So the fix was right when it was written; main moved underneath it. The four inputs d755e18 changed are skills/leaf/assets/runtime/chrome-style.js, geometry.js, living-margin.js, and composing/surface.js.
The nine recorded per-image sha256 values all match the checked-in JPEGs on this branch — that part of the manifest is consistent.
|
Dispatched for The collision the review above named has since landed: #163 merged as One thing is different this time. Every re-staling so far came from runtime code, which the recapture answers with the hash alone — this PR's diff is one line and no image bytes. Measured
The
No PR from this run: a recapture taken here would re-set the gallery in the runner's substituted faces, per #133. |
…#167) ## Problem The nightly `test` job failed on [run 33360981578](https://github.com/max-sixty/leaf/actions/runs/33360981578) (7f58225) with two failures. `test_the_public_catalog_is_a_visual_index_of_full_page_routes` failed on the preview digest, and that one is already fixed: #164 landed the refreshed manifest right after 7f58225, the test passes at main's head, and the nightly run on 77a8681 was green. `test_a_specimen_holds_a_wide_exhibit_inside_the_column` is a stale read rather than a layout regression, and it is still live. At the failing read every box on the page already measured the narrowed window — `#spec` 332px, the board's box 305px, `main` 380px — while `document.documentElement.scrollWidth` still answered 596, the width the document scrolled to before the window narrowed. So the assertion named the specimen's containment for something the specimen had already got right. Chromium publishes the document's own scrolling area in the rendering update *after* the one that dispatches `resize`, and `resized()` returned as soon as the event reached its listeners. Measured on the specimen page narrowed to 380px, with a fresh load per probe point so no read forces the layout the next one asks about — identical across three runs of the set: | read taken at | `documentElement.scrollWidth` | | --- | --- | | the resize handler | 596 | | a task behind the handler | 596 | | that update's animation frame | 596 | | the next update's animation frame | 596 | | a task behind that second frame | **380** | ## Solution `resized()` now waits one rendering turn once the resize event has reached its listeners, with `page.evaluate(ONE_FRAME)` — the module's own one-turn wait, the one `navigate` takes after the readiness stamp. It resolves in that turn's animation-frame callback, so the caller's next read is a round trip behind it, which is the first point the measurement above shows settled. Fixed in the shared helper rather than in the one test: `document.documentElement.scrollWidth` is read after a resize in five browser modules — `test_render_options.py`, `test_render_pages.py`, `test_render_controls.py`, `test_render_widgets.py`, `test_render_projection.py` — and all of them were reading at the same stale point. It costs one frame per `resized()` call. ## Testing <details><summary>Reproduction, bug-back, and suite</summary> - Reproduced on main at 77a8681: 5 failures in ~180 runs of the test as written, `-n0`, with the identical read (1 in the first 6). - The probe table above is the deterministic form of it: the stale value is reachable at four defined points and gone at the fifth, 3/3 per point. - After the change: 60/60 runs of `test_a_specimen_holds_a_wide_exhibit_inside_the_column` on `d7d9fc2`, the `ONE_FRAME` form; 30/30 on the first push's hand-rolled poll, which it replaced. - `uv run pytest tests --run-nightly -n 2` with this change on 77a8681, main's last green head: 1569 passed, 6 skipped. - The same suite on this branch's base (bba885a): 14 failed, 1558 passed, 6 skipped — the same fourteen, test for test, that main's own [ci run on bba885a](https://github.com/max-sixty/leaf/actions/runs/33364553456) reports. They are that commit's, not this change's, and `tend-ci-fix` is already running on them. `test_a_specimen_holds_a_wide_exhibit_inside_the_column` passed in that run. - `tests/test_site.py::test_the_public_catalog_is_a_visual_index_of_full_page_routes` passes at 77a8681, which is what confirms the digest half of the original run was #164's. It is red again at bba885a, on that commit's own preview inputs, and is one of the fourteen above. </details> --- Automated fix for [failed run](https://github.com/max-sixty/leaf/actions/runs/33360981578) --------- Co-authored-by: leaf-agent <[email protected]>
The complete nightly suite on
maincaught a stale public example-preview input digest after the preview-handoff and runtime changes were combined with #161. This branch now includes the later main updates from #163 as well, then regenerates throughscripts/example-previews.py; all nine preview images remain byte-for-byte unchanged.Validation on that merged tree: all 20 tests in
tests/test_site.pypass, followed by every pre-commit hook.