Repository navigation
Drop the startup probes' header-less registry fallback - #2428
Merged
Merged
Conversation
The runtime's two probes of a page's registry, startup recovery in `bootstrap.js` and `sourceMovedOn` in `layer-client.js`, read the delivery's layer from the `Leaf-Layer` header and, when it was absent, parsed the registry body for `$layer.generation`. That fallback came with #414, when edge-served shells lacked Leaf headers. Every host Leaf supports now stamps the header on what a probe fetches: the local server on `/registry.json` and sample routes (`http.py`, `_delivery_headers`), the Worker on page routes and released assets (`stampDelivery`), and `leaf page --export` never probes (its probe is empty and it boots through `offline-delivery.js`). Behavior change: a host that serves the tree without `Leaf-Layer` can no longer supervise startup. Its probe settles nothing, so a failed start waits rather than reloading onto a replaced layer. - Delete the body fallback in both probes. - Delete `test_a_failed_bootstrap_hears_a_static_registry_generation`, which held the header-less static host. - `write_live_shell`'s docstring now states that its host stamps the delivery headers, in place of saying a static host may serve the tree. - `tests/test_site.py`'s stand-in for the edge stamps `Leaf-Layer` and `Leaf-Release` on released assets, as the Worker does. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 11, 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.
The runtime's two probes of a page's registry, startup recovery in
bootstrap.jsandsourceMovedOninlayer-client.js, read thedelivery's layer from the
Leaf-Layerheader and, when it was absent,parsed the registry body for
$layer.generation. That fallback camewith #414, when edge-served shells lacked Leaf headers. Every host Leaf
supports now stamps the header on what a probe fetches: the local server
on
/registry.jsonand sample routes (http.py,_delivery_headers),the Worker on page routes and released assets (
stampDelivery), andleaf page --exportnever probes (its probe is empty and it bootsthrough
offline-delivery.js).Behavior change: a host that serves the tree without
Leaf-Layercan nolonger supervise startup. Its probe settles nothing, so a failed start
waits rather than reloading onto a replaced layer.
test_a_failed_bootstrap_hears_a_static_registry_generation,which held the header-less static host.
write_live_shell's docstring now states that its host stamps thedelivery headers, in place of saying a static host may serve the tree.
tests/test_site.py's stand-in for the edge stampsLeaf-LayerandLeaf-Releaseon released assets, as the Worker does.