Repository navigation
Rebuild the vendored Pierre diff bundle at @pierre/diffs 1.4.3 - #881
Merged
Merged
Conversation
`@pierre/diffs` moves from 1.4.2 to 1.4.3, one upstream patch release, found by the weekly `scripts/vendor.py --pins` sweep — the browser dependencies' versions live in `scripts/vendor.py`'s PINS table rather than a manifest, so dependabot cannot watch them. The pin moves and `scripts/vendor.py pierre` rebuilds `skills/leaf/packages/diff/vendor/pierre-diffs.esm.js` and its licence notice. Pierre reaches npm's resolver for transitive dependencies, so per `scripts/CLAUDE.md` its diff is read as an upstream patch rather than as reproducible bytes. Upstream's only behavioural change on Leaf's path is in `attachResolvedLanguages`: registering a language name the returned Shiki grammar declares as neither its name nor an alias now throws instead of silently attaching nothing. Every name in the registry's `$languages.names` is a canonical Shiki grammar name, so the check passes; it would now be loud rather than quiet if one were not. Shiki stays at 4.4.3, its own newest release. Pierre and Shiki have to move together when their compatibility requires it, and no Shiki move is available or needed here. Co-authored-by: leaf-agent <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Sep 21, 2026
`ci` on `main` went red at f3de402 (#881): [`lint` and `test` passed and the complete suite in `nightly` failed on seven cases](https://github.com/max-sixty/leaf/actions/runs/35616173899). Six are #884's, unchanged from [the run before it](https://github.com/max-sixty/leaf/actions/runs/35615354769) and still open there. The seventh is this one, and it is not #881's: that commit moves the Pierre diff bundle and its pin, and the binding-badge fixture draws no diff. `test_ask_binding_badges_do_not_cover_their_key_line` failed with the shape #876 repaired — the badge the test scrolls one pixel into the shortcut bar's band still worn, count 2 rather than 1, stable across all fourteen polls. ## What the wait could not see Stillness is half a reading. A page that has not begun an effect is indistinguishable from one that finished it when the only evidence is the scroll number holding still, which `tests/CLAUDE.md` already states under **A wait consumes a fact the system states**. [`goToAskNow`](https://github.com/max-sixty/leaf/blob/cf0c6cf185346c5e68a392b176578c4d1f4d0466/skills/leaf/assets/runtime/asks/view.js#L1115) awaits `materializeAsk` and one or two `reveal`s before it issues any travel, so `scroll_settled` called straight after the press can count its three still frames on a page the walk has not moved yet. The test then measures its geometry where the walk began, issues its own `scrollTo` from there, and the travel lands on top of it — the badge back above the bar, legitimately kept, for the rest of the assertion's timeout. #876 changed the unit and not the ordering, and the measurement says it addressed the smaller window. On the ask walk here the glide pause is nought to one frame and holds at nought under `Emulation.setCPUThrottlingRate`, because the compositor starts the glide on the frame after the instant move whatever the main thread is doing. The window that grows under load is the asynchronous gesture before the travel is issued at all, which is main-thread work; no count of frames bounds it, so raising the count would have been the next wording rather than the fix. ## What this changes The walk arrives and then travels, in that order and in one task — [`arriveAt`](https://github.com/max-sixty/leaf/blob/cf0c6cf185346c5e68a392b176578c4d1f4d0466/skills/leaf/assets/runtime/asks/view.js#L936) focuses, `scrollToElement` follows with no await between — so the arrival is a fact the stillness can be read behind. Each press in this test now waits on its ask's focus before `scroll_settled`. That is the rule the rest of the suite already keeps. This was the only one of the suite's 38 `scroll_settled` call sites that read stillness with nothing stated before it: every other waits on a moved scroll number, a painted `data-lf-ask`, a URL, `to_be_in_viewport`, or the focus. So the durable half of the change is in the helper's own contract and in `tests/CLAUDE.md`, which said the helper "waits for a scroller to have arrived" — a promise it cannot keep — and now says it waits for one to have stopped and is asked behind the fact that it started. The frames-versus-milliseconds reasoning #876 established stays; what it is for is now named as the glide, not the gesture. ## Verification The mechanism reproduces on demand: with the stillness wait allowed to answer early (`frames=0`), the page ends at the travel's own position rather than the test's, with the badge worn and the count stable at 2 — the run's failure exactly. The two windows were measured separately on the ask walk at throttling rates 1, 2, 4 and 10; the glide pause reads 0 frames at every rate and the press-to-travel window is the one that carries the slack. `tests/test_render_widgets.py --run-nightly` is 179 passed, `npm run test:runtime` 28 passed, and `pre-commit run --all-files` clean. The everyday suite is 1195 passed beside six cases that fail in this sandbox and fail identically at the merge base — an `AF_UNIX` socket it refuses, a umask it does not grant, and a Node bundle step it cannot run. ## What this does not do The six Web Awesome cases stay with #884; nothing here touches them, and `nightly` stays red until that merges. `scroll_settled` keeps its signature: the ambiguity it carries is not one the helper can settle from outside the page — a gesture that legitimately moves nothing looks the same as one that has not started — so the caller consuming a stated fact is the fix rather than a way around it. <details><summary>The failing cases and where each was read</summary> From [the `nightly` job at f3de402](https://github.com/max-sixty/leaf/actions/runs/35616173899): ``` FAILED tests/test_render_widgets.py::test_ask_binding_badges_do_not_cover_their_key_line Locator expected to have count '1' / Actual value: 2 14 × locator resolved to 2 elements # this change FAILED tests/test_site.py::test_the_published_notification_example_runs_its_authored_module@site FAILED tests/test_site.py::test_published_visual_evidence_loads_from_its_page@site FAILED tests/test_render_controls.py::test_every_base_corpus_tab_stop_has_a_visible_focus_indicator FAILED tests/test_render_controls.py::test_every_ring_the_layer_draws_is_shown_whole_somewhere_in_the_corpus FAILED tests/test_render_projection.py::test_visual_review_gallery_gives_a_laptop_to_the_evidence FAILED tests/test_render_margin.py::test_agent_status_leaves_the_margin_transcript_where_the_reader_scrolled_it # the six in #884 ``` `test_render_export.py::test_a_copy_speaks_reader_origin_after_live_map_is_removed`, the seventh in the 725fca7 run, passed here — consistent with #884 reading it as a latent race rather than #878's. The badge test passed 18 consecutive local runs before this change, including ten under six busy cores, so the window is not one an idle machine reaches. What reproduces it is letting the wait answer early, which is what the loaded runner does. </details> Co-authored-by: leaf-agent <[email protected]>
This was referenced Sep 22, 2026
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.
@pierre/diffsmoves from 1.4.2 to 1.4.3, one upstream patch release, found by the weeklyscripts/vendor.py --pinssweep — the browser dependencies' versions live inscripts/vendor.py's PINS table rather than a manifest, so dependabot cannot watch them. The pin moves andscripts/vendor.py pierrerebuildsskills/leaf/packages/diff/vendor/pierre-diffs.esm.jsand its licence notice. Pierre reaches npm's resolver for transitive dependencies, so perscripts/CLAUDE.mdits diff is read as an upstream patch rather than as reproducible bytes.The rebuilt bundle differs from 1.4.2 in exactly one span of 382 bytes, inside
attachResolvedLanguages: registering a language name now throws when no returned Shiki grammar declares it as its own name or an alias, and throws again when the load leaves the name unresolvable. Nothing in the bundle reaches that function. Leaf's entry exports onlyparsePatchFilesandpreloadDiffHTML, andpreloadDiffHTMLresolves a language through thebundledLanguagesmapvendor.pywrites intoshiki-leaf.mjs, so esbuild emitsattachResolvedLanguageswithout a call site — its minified identifier occurs once in the bundle, at its own definition, as do the grammar map andareLanguagesLoadeddeclared beside it. The bump therefore carries no reachable behavioural change, and a registry language that is not a canonical Shiki grammar name still fails where it always has: at bundle time, on the generatedimport("@shikijs/langs/<name>"). Shiki stays at 4.4.3, its own newest release; no Shiki move is available or needed for this one.This bundle is payload of the
diffpackage, so it reaches only a page that selectsdiff.What moved upstream, and what was run
Between the two release tarballs, 15 non-sourcemap files differ.
parsePatchFilesand thessrentry Leaf imports are not among them; the changed files are theFile/FileDiffcomponents (a new protectedsetPlaceholderHeight), the editor and worker modules, and the two highlighter language modules carrying the check above.Every other package in
pierre-diffs.LICENSES.txtholds the version it had at 1.4.2 — the@pierre/diffsheading is the file's only changed line — so npm's resolver returned the same transitive tree and the bundle diff is upstream's own.Run on this branch:
uv run pytest tests— 1195 passed. Five cases fail in the agent sandbox and fail identically at the merge basebbdd9afb: they need anAF_UNIXsocket the sandbox refuses, or a umask the sandbox does not grant.uv run pytestover thediff,patch,code,language, andhighlightselection acrosstest_render_widgets.py,test_render_anchors.py,test_render_navigation.py,test_render_projection.py,test_render_startup.py,test_render_export.py, andtest_render_gate.py— 44 passed.npm run test:runtime— 28 passed.scripts/preview.py pr-walkthroughin Chrome at 1200×900: bothlf-diffinstances paint, with Rust token colouring and word-level intra-line tints, and the console is clean.