Repository navigation
Give the page one readiness reading, and wait on it from every Python reader - #1250
Merged
Merged
Conversation
… reader Four Python readers waited on different subsets of the runtime's readiness facts. The suite's `BOTH_STAMPS` required upgrade, an applied stamp, presentation, the coordinator's current reading, settled rendering and deferred arrivals (#913 and #1145 added the last two, but only there). The render gate's `wait_for_presentation` waited on data version, log coverage and current presentation, with neither arrival nor rendering. `scripts/example-previews.py` and `record-demo.py` checked the three body stamps alone, and `record-demo.py`'s stills waited on upgrade and a count of `action` lines in `events.jsonl`, with no presentation, where the gate counts the reading's served coverage (#1235). `pageReadiness` in `runtime/presentation.js` now names the first fact a page has yet to state, in the order a page reaches them: `upgraded`, then `data` and `log` against an `/api/state` reading the caller holds, then `presented`, `arrived` and `rendering`. It returns null once the page is ready. The entry script exposes it as `lfReadiness`, replacing `lfCurrentPresentationReady` and `lfPageArrived`; `lfRenderingSettled` stays for waits after input. `leaf.render_checks.wait_until_ready(page, state=None)` is the one Python wait. It raises `PageNotReady` naming the stage, and every reader uses it: the suite (`open_page`, `navigate`, `restarting`, the arrivals case and each direct wait), the gate's scheme pass and page-code run, the catalog stills, and the demo recording. The stills now wait against the server's reading, so they count served coverage. Behaviour that moved: - `leaf version check` now also waits for deferred arrivals and settled rendering before it reads a page, and reports either stage by name. A failure at either still keeps the projection findings, as `pageSettled` did. - The gate requires the applied stamp even when the reading covers no records; before, it skipped the log stage then. - The page-code run reads `/api/state` straight after navigation, not after the upgrade stamp, since the readiness wait includes upgrade. - The catalog stills and demo frames are shot after deferred arrivals land and rendering settles, not at first presentation. - A timed-out wait names its stage in the runtime's own words, and reports a page that cannot answer within 5s as `answering`. The render-check probes `initiallyPresented`, `currentPresented`, `dataApplied` and `logApplied` are gone, along with `validationPresentationReady` and `pageArrived`. The tests that read them now assert the readiness stage, or the coordinator's `applicationPresented` directly. A new gate test holds a page's first state answer and checks that the wait fails at `log` with that wording, then passes once the answer lands. The scheme pass keeps its `upgraded` probe as a barrier before the visual-provider check, which must run before presentation can hang on an invalid inventory. `scripts/verify_site.py` and the MCP app still wait on `data-lf-presented` alone. That is the interaction boundary a host shows the frame at, and it stays their fact. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Sep 26, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 27, 2026
The concept survey's drifted duplicates now each have one owner (#1214–#1221, #1223, #1228, #1231, #1235, #1244, #1245, #1247, #1250, #1251, #1254, #1260), so the survey note never lands. What it found and nobody has taken becomes `TODO.md` entries: - **Shared definitions** (new section under Next): re-addressing resource references in one pass instead of `http.py`'s regex scopers and three head composers; `tests/render_harness.py` `told()` beside `pageReadiness`'s `data` and `log` stages (#1250), which answer the same question; Python still naming a thread's identity a root (`thread_roots`, `FrozenThreadReading.roots`) now that the runtime keys threads on the served `id` (#1260). - **Requests**: the existing "Decide whether requests earn their weight" entry now says kept requests need one owner for seat availability, which four runtime modules restate. - **Implementation candidates**: the unresolved-gesture ledger as one state machine, deferred until a change has to touch it, since nothing there has drifted and it is the hottest race path. The survey's small undrifted items and its list of deliberate splits are dropped: none has drifted, and the splits are intended. 🤖 Generated with [Claude Code](https://claude.com/claude-code) > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
Sep 27, 2026
The nightly navigation test installed a browser clock at zero, let it advance, then asked Playwright to pause at zero. The paging test now pauses beyond the clock's current time. It uses controlled time to inspect the brief interval before the hint map settles after native PageDown; the resize test only needs the final visible result and now waits for that without a clock. The run's other failure was a demo recording timeout while waiting for a margin thread. [PR #1250](#1250) subsequently changed the recording to wait for complete page readiness; the demo test passed locally on current main with the installed Playwright browser. Verification: the two focused navigation tests pass locally. The prior run also passed `test_demo_recording_drives_the_browser_journey` locally. A delayed clock setup reproduced Playwright's `Cannot fast-forward to the past` error before this change. --------- Co-authored-by: leaf-agent <[email protected]>
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.
Four Python readers waited on different subsets of the runtime's readiness facts.
The suite's
BOTH_STAMPSrequired upgrade, an applied stamp, presentation, thecoordinator's current reading, settled rendering and deferred arrivals (#913 and
#1145 added the last two, but only there). The render gate's
wait_for_presentationwaited on data version, log coverage and currentpresentation, with neither arrival nor rendering.
scripts/example-previews.pyand
record-demo.pychecked the three body stamps alone, andrecord-demo.py'sstills waited on upgrade and a count of
actionlines inevents.jsonl, with nopresentation, where the gate counts the reading's served coverage (#1235).
pageReadinessinruntime/presentation.jsnow names the first fact a page hasyet to state, in the order a page reaches them:
upgraded, thendataandlogagainst an
/api/statereading the caller holds, thenpresented,arrivedandrendering. It returns null once the page is ready. The entry script exposes itas
lfReadiness, replacinglfCurrentPresentationReadyandlfPageArrived;lfRenderingSettledstays for waits after input.leaf.render_checks.wait_until_ready(page, state=None)is the one Python wait. It raises
PageNotReadynaming the stage, and everyreader uses it: the suite (
open_page,navigate,restarting, the arrivalscase and each direct wait), the gate's scheme pass and page-code run, the catalog
stills, and the demo recording. The stills now wait against the server's reading,
so they count served coverage.
Behaviour that moved:
leaf version checknow also waits for deferred arrivals and settledrendering before it reads a page, and reports either stage by name. A failure
at either still keeps the projection findings, as
pageSettleddid.before, it skipped the log stage then.
/api/statestraight after navigation, not after theupgrade stamp, since the readiness wait includes upgrade.
rendering settles, not at first presentation.
that cannot answer within 5s as
answering.The render-check probes
initiallyPresented,currentPresented,dataAppliedand
logAppliedare gone, along withvalidationPresentationReadyandpageArrived. The tests that read them now assert the readiness stage, or thecoordinator's
applicationPresenteddirectly. A new gate test holds a page'sfirst state answer and checks that the wait fails at
logwith that wording,then passes once the answer lands. The scheme pass keeps its
upgradedprobe asa barrier before the visual-provider check, which must run before presentation
can hang on an invalid inventory.
scripts/verify_site.pyand the MCP app still wait ondata-lf-presentedalone.That is the interaction boundary a host shows the frame at, and it stays their
fact.
🤖 Generated with Claude Code