Repository navigation
Give five restated facts one owner each - #1319
Merged
Merged
Conversation
Five small concepts had a second copy beside their owner. Each copy now reads the owner, and the copy is deleted. - The Worker's `frame-ancestors` header. `structure.FRAME_ANCESTORS_CSP` owns the policy. The Worker spelled it again in `staticAssetResponse`; the site manifest now carries it (`frame_ancestors`), the Worker validates it at its edge with the rest of the manifest, and adds what it says. - A document's version number. `lf-version`, which `delivery_identity` writes on every delivery of a stamped revision, owns it. `document-identity.js` also parsed it out of `/versions/vN.html` when the marker was absent, which no delivery reached; the fallback and `VERSION_PATH` are deleted. The version comparison fetched `versionUrl(base)`, a second derivation of the address the state's version entry already carries at the page root, which is what the version menu's travel reads; it now fetches that `url`, so it also resolves from a `revisions/` address. The MCP app snapshot now stamps the active version like every other delivery. - The stream-activity writers. `leaf.codex` owns `set_stream_activity` and `clear_stream_activity`, but `codex_adapter` and the website host bound them by name, so two test files each kept a helper that patched both bindings. Both callers now call through `codex`, and one helper in `interact_support` patches that one binding. - The page-directory inventory. `test_interact_layer` held its own copy of `PAGE_STATE_FILES` and `PAGE_OWNED_DIRS` under a test named for the storage contract. It now reads `page-storage.md`'s "Files" and holds the product to it, which found `interactions.jsonl` documented as Leaf's but missing from the inventory: an initialized page now owns it, so a package path aliased to it is refused. `INTERACTIONS_FILE` moves to `schema` so the inventory can name it. - The layer's sheet order. The face test ordered every bundled package alphabetically while claiming `composed_sheets`' order; it now walks a composed example's layer (`SHIPPED_PACKAGES`) by `layer.ROOT_SHEETS`, the per-root order `composed_sheets` itself reads. `interact_support.wait_for` takes a callable `failure`, for a poll whose message needs state read at the timeout, and four hand-rolled polls in `test_interact_session` and `test_render_export` use it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
leaf-agent
approved these changes
Sep 27, 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.
Five small concepts had a second copy beside their owner. Each copy now reads the owner, and the copy is deleted.
frame-ancestorsheader.structure.FRAME_ANCESTORS_CSPowns the policy. The Worker spelled it again instaticAssetResponse; the site manifest now carries it (frame_ancestors), the Worker validates it at its edge with the rest of the manifest, and adds what it says.lf-version, whichdelivery_identitywrites on every delivery of a stamped revision, owns it.document-identity.jsalso parsed it out of/versions/vN.htmlwhen the marker was absent, which no delivery reached; the fallback andVERSION_PATHare deleted. The version comparison fetchedversionUrl(base), a second derivation of the address the state's version entry already carries at the page root (the one the version menu's travel reads); it now fetches thaturl, so it also resolves from arevisions/address. The MCP app snapshot now stamps the active version like every other delivery.leaf.codexownsset_stream_activityandclear_stream_activity, butcodex_adapterand the website host bound them by name, so two test files each kept a helper that patched both bindings. Both callers now call throughcodex, and one helper ininteract_supportpatches that one binding.test_interact_layerheld its own copy ofPAGE_STATE_FILESandPAGE_OWNED_DIRSunder a test named for the storage contract. It now readspage-storage.md's "Files" and holds the product to it. That foundinteractions.jsonldocumented as Leaf's but missing from the inventory: an initialized page now owns it, so a package path aliased to it is refused.INTERACTIONS_FILEmoves toschemaso the inventory can name it.composed_sheets' order; it now walks a composed example's layer (SHIPPED_PACKAGES) bylayer.ROOT_SHEETS, the per-root ordercomposed_sheetsitself reads.interact_support.wait_fortakes a callablefailure, for a poll whose message needs state read at the timeout, and four hand-rolled polls intest_interact_sessionandtest_render_exportuse it.Deleted:
VERSION_PATH,versionUrl, the URL fallback indocument-identity.js, the Worker's policy literal, bothtake_stream_activitycopies,EXPECTED_PAGE_STATE_FILES,EXPECTED_PAGE_DIRECTORIES, and two inventory tests folded into one.Not in this change:
verify_site._stampedstill splits the served reading on its last.. The reading'sfiles.presenceform is composed inserved_state/service.pypage_stateandpage_snapshot.capture_page_snapshotas well as the news stream, and a live branch (status-state-machine) is rewriting those exact lines, so the owner for that form waits for it.🤖 Generated with Claude Code