Repository navigation
Name a page's URL namespace and revision file name once - #1228
Merged
Merged
Conversation
`leaf status idle` and the Stop hook each decided which acknowledged user moves still block the agent, and only the hook knew the two moves another turn answers: one a Codex carrier queued for a later turn (#459), and a `turn` answer the open turn has finished, which a live carrier commits once the turn ends (#1080). So a turn that queued a batch could end but was refused `leaf status idle` over the same move. `activity.blocking_obligations(state, carried=)` is now the one rule, read by both; `session-lifetime.md` states it once. The prompt hook opens `activity.acknowledged_obligations`, the queued ones included, as before. The recorded `$layer.packages` a bare `leaf page init` re-vendors with is read through `registry.storage.layer_packages`, which `layer_metadata` also uses, rather than a copy of that rule with its own message. It reads only the packages, so a page whose other `$layer` fields are broken can still be re-vendored, which is the remedy `layer_metadata`'s errors name. `session._page_stamp` is renamed `_page_reading_or_none`: it wraps `page_reading`, and `presence._page_stamp` is a different stamp. Behaviour that moved: - `leaf status idle` accepts a page whose only owed move is queued for a later turn, and (with a live carrier) one whose turn answer the open turn has finished (`test_idle_and_the_stop_hook_hold_the_agent_to_the_same_moves`). - A malformed `$layer.packages` on re-init reports the registry reader's message. - `test_a_completed_stream_answers_its_event_even_when_the_reply_address_differs` asserts through `blocking_obligations`, including the dead-carrier case. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`page init` checked a re-vendor against the incoming layer with its own composition of the page's declarations and widgets, beside `registry.storage.read_page_registry`'s. Both now call `registry.storage.compose_candidate(page_dir, layer, widgets)`, and `widget_paths` lists a directory's widget modules for both. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`layer_packages` read registry.json through `read_registry_declarations`, which refuses a malformed entry, so a bare `leaf page init` could not replace the broken vendored registry it exists to repair. It now reads the file as JSON and applies only the packages rule. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The directories a page answers beneath its root were listed four times: `schema.py`'s served paths, `http.py`'s rooted-reference rebasing, the website adapter's route regex in `worker/server.py`, and the Worker's copy in `worker/src/routing.ts`, which a Python test held to the vendored files by parsing the TypeScript. Both Worker-side lists still routed `guidance/`, which no server has served since #380. - `schema.PAGE_ROUTE_DIRS` names the namespace's directories. The website adapter builds its route regex from it and `VENDORED_FILES`. - `scripts/site.py` writes both into the site manifest as `routes: {dirs, files}`, and the Worker's `pageRoute` and `releaseAssetRoute` route from the manifest, which it already loads and validates, instead of a hand-written regex. - `http.py`'s rooted-reference set is built from the same layer constants. It differs from the route set on purpose, and its comment says how: it leaves out the documents, whose addresses the server writes itself, and takes in the authored `page/` tree, served only beneath a revision. - `schema.REVISION_NAME` and `VERSION_NAME` are the revision and version file-name patterns that `files.py`, `http.py`'s two revision routes and `SERVED_PATH` each spelled out. Behaviour that moved: - `<page>/guidance/...` is no longer routed to a page by the Worker or the adapter; it falls through to static assets, where nothing lives. - The site manifest gains a required `routes` field; the Worker refuses a manifest without one. - `test_the_worker_routes_every_file_a_page_vendors` is deleted: the Worker no longer holds a copy of the list for it to check. `routing.test.ts` now asserts a `guidance/` path is not routed. 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
added a commit
that referenced
this pull request
Sep 27, 2026
…ition folds to one fixture (#1282) Three places where one fact was spelled on both sides of a runtime boundary. **The Worker's page directories.** #1228 moved a page's URL namespace into the site manifest, but the Worker still spelled which directories the session writes (`media`, `revisions`, `versions`), where a static miss falls back to the page's container. `schema.py` now names them `SESSION_ROUTE_DIRS`, `PAGE_ROUTE_DIRS` is `api` plus `BROWSER_DIRS` plus those, and `scripts/site.py` writes the manifest's `routes` as `{layer, session, files}`. `isPageSessionFileRequest` reads `routes.session`, and a Worker test adds a session directory to show it is read rather than known. `api` stays a fixed protocol prefix in the Worker, named once as `API_DIR`: the page server serves `/api/...` and the Worker handles `api/state`, `api/event` and `api/interaction` by name, so the manifest cannot rename it. **Position ordering.** `projection.py`'s `folded_positions` and `projection/model.js`'s `foldWidgetStates` each implement the position fold, and only their rank rules shared `tests/rank_cases.json`. The fixture now also holds fold cases (authored containers and standing moves, to each container's order), covering the fold's skip rules (a container or unit the markup lacks, an absorbed move) and ties broken by id. `test_interact_document.py` and `tests/runtime/board-order.test.mjs` both run them. **The unnamed agent's name.** `schema.UNCLAIMED_AGENT` is now `UNNAMED_AGENT`, the name for an agent nothing names: an unclaimed page's, and an agent-authored event's with no `agent`. The transcript reads it with `or` rather than spelling `"Agent"` through `.get`. The browser's five `|| "Agent"` fallbacks stay: three of them sit in functions an in-progress change is editing (`thread/messages.js`'s `messageReading`, `margin-projection.js`, `thread/thread-card.js`), so serving the name to them is a TODO entry. Behaviour that moved: the site manifest's `routes` shape, which the Worker and `scripts/site.py` change together. > _This was written by Claude Code on behalf of max-sixty_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[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.
The directories a page answers beneath its root were listed four times:
schema.py's served paths,http.py's rooted-reference rebasing, thewebsite adapter's route regex in
worker/server.py, and the Worker's copyin
worker/src/routing.ts, which a Python test held to the vendored filesby parsing the TypeScript. Both Worker-side lists still routed
guidance/,which no server has served since #380.
schema.PAGE_ROUTE_DIRSnames the namespace's directories. The websiteadapter builds its route regex from it and
VENDORED_FILES.scripts/site.pywrites both into the site manifest asroutes: {dirs, files}, and the Worker'spageRouteandreleaseAssetRouteroute from the manifest, which it already loads andvalidates, instead of a hand-written regex.
http.py's rooted-reference set is built from the same layer constants.It differs from the route set on purpose, and its comment says how: it
leaves out the documents, whose addresses the server writes itself, and
takes in the authored
page/tree, served only beneath a revision.schema.REVISION_NAMEandVERSION_NAMEare the revision and versionfile-name patterns that
files.py,http.py's two revision routes andSERVED_PATHeach spelled out.Behaviour that moved:
<page>/guidance/...is no longer routed to a page by the Worker or theadapter; it falls through to static assets, where nothing lives.
routesfield; the Worker refuses amanifest without one.
test_the_worker_routes_every_file_a_page_vendorsis deleted: the Workerno longer holds a copy of the list for it to check.
routing.test.tsnow asserts a
guidance/path is not routed.The worker TypeScript gate (
npm run typecheckandnpm testinworker/) passes locally;scripts/verify-site-local.shwas not run.🤖 Generated with Claude Code