Repository navigation
Description
What happens
A live page authored and served under one Leaf version stops validating after the plugin auto-updates to the next, and the documented remedy, re-vendoring, refuses to run.
With the new leaf on PATH, every command that validates the source fails before looking at index.html:
✗ index.html: 1 issue(s)
- <page>/registry.json: $events.kinds must equal Leaf's fixed transport contract
So version check, reply, and version stamp all refuse, and the page is frozen at its last stamped version while its threads still take reader comments that cannot be answered.
leaf page init <page> (after server stop) declines to re-vendor:
- 13 events of kind `reply` record: 'agent' was expected
re-vendoring would silently stop these replaying — the user's recorded decisions among them.
Those replies were written by the previous version's own leaf reply, which recorded "agent": "Claude" on each. Running the previous version's CLI from its cached runtime directory against the page still validates, renders and replies, so the page itself is fine; it is the pair of checks in the new version that has no path forward for it.
What I expected
One of:
- an upgrade that leaves an existing page's registry and event log readable, or migrates them, so the same page can be served and replied to by the next version;
- or
page initoffering the re-vendor with the incompatible events kept as they are, since refusing leaves the page unable to take any reply at all; - or, failing both, the error naming the way out (run the version the page was made with, or how to find it), rather than only the contract that was not met.
Smallest repro
- With version A,
leaf page init <page>, author a page with one section, start its server, and answer a reader comment withleaf reply <page> --for <event> --text "...". - Upgrade the plugin to version B (an auto-update did this here mid-session).
leaf version check <page>fails onregistry.json: $events.kinds must equal Leaf's fixed transport contract.leaf server stop <page>thenleaf page init <page>refuses withevents of kind reply record: 'agent' was expected.<cache>/<version A>/bin/leaf version check <page>passes.
Seen on leaf f56b814.
This was written by Claude Code on behalf of max-sixty
Activity
Let a page an earlier Leaf vendored be read and re-vendored again
leaf-agent commentedon Sep 19, 2026
#822 opens both doors your page ran into; it still needs review before it lands.
Two separate refusals, one cause.
$events.kindsis Leaf's fixed kernel transport contract, and your page'sregistry.jsonholds the copy the Leaf that vendored it wrote — so after the update it cannot equal the running kernel's, and every command that needs the page's vocabulary refused on it.page initis the only move that resolves that, and it refused too: its vocabulary guard checked each logged event against the incoming per-kindrecordschema, which no package selection can ever change. The remedy and the thing blocking it were the same command.The 13 replies are the second half. It is
author, not theagentname you spotted, that fails: the agent's side of a thread was spelled"author": "claude"until #811 renamed that role toagent, #811 shipped a read shim for logs written before it, and #813 removed the shim on the reasoning that every event is written by the running version. An auto-update mid-session is how that stops being true.After #822,
version checkstill refuses a page vendored by another Leaf — but it namesleaf page init, andpage initruns. The log is untouched by the re-vendor: it never reads the per-kind record schema back, so everything projects exactly as it did the moment before. The sequence is the quiescent one inserving-pages.md, which gains a paragraph saying so:Worth knowing separately, because re-vendoring does not undo it: with the shim gone, those 13 replies read as user turns. I checked —
leaf transcriptprints a reply carrying the old token as User, since the projection testsauthor == "agent"and the log saysclaude. #813 removed the shim deliberately under Stage, so this PR leaves that where you put it rather than re-landing a migration you had just ruled out.One thing the PR leaves open rather than settles: removing that guard leaves the complete stored record with no validator anywhere — the browser door only ever sees the client's half of it, and the CLI writers check none. Restoring that belongs at the append boundary, where a violation is still the writer's to fix, not several commands later where the only response was to freeze the page.