Repository navigation
Validate a page's registry and vendored sheets only where they differ from the active revision - #1227
Merged
Merged
Conversation
… from the active revision A fresh server's first read of a page spent ~300ms in activation re-checking an unchanged index.html, and ~280ms of that re-validated inputs the active revision already carries: the vendored registry through jsonschema's metaschema, twice (once as the layer, again as the composition a page with no declarations leaves equal to it), a syntax pass over the 425KB vendored theme.css and shadow.css, and a second theme parse for the column width. The author's own page took ~5ms. A revision is written only after `check_source` passes, so its registry and sheets were validated when it activated. `compose_page_registry` now takes the vocabulary already validated and skips validation when the composition equals it; `read_page_registry` passes the active revision's. The source check lints a vendored sheet only where its bytes differ from the active revision's captured copy, and parses the theme for the column only when the page states a width. Hand edits and re-vendors still differ, so they are still checked. `load_registry` keeps the one check the running Leaf can disagree with, the kernel's event contract. `SourceCheck.column` is gone: `version check` computes the column it prints. Cold activation on a preview page: 305–380ms before, 36–42ms after. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
previously approved these changes
Sep 26, 2026
# Conflicts: # skills/leaf/scripts/leaf/registry/storage.py
leaf-agent
approved these changes
Sep 26, 2026
max-sixty
added a commit
that referenced
this pull request
Sep 27, 2026
… the browser (#1275) Which x-state verb decides a widget, and which member tags each of its outcomes takes off the page, were derived from the registry twice: Python's `deciding_verb` and `retirement_slots`, and the runtime's `decidingVerb`, `settlementSlots`, the retired-slot selector walk in `passages.js`, and the owner walk in `version.js`'s diff-opaque selector. Composition now writes the relation into the vocabulary as `$decisions` (owner tag -> `{verb, retires: {outcome: [member tags]}}`), from `registry.state.stamp_decisions`. `page init`'s layer composition stamps it after validation, and a page's composition stamps it again over the page's own declarations. The browser requires it at intake and reads it through `registry.js`'s `decisionFor`; the four JS walks are gone. Python keeps calling `deciding_verb` and `retirement_slots`, which the stamp is derived from, because validation asks them of declarations nothing has stamped yet. A page whose composition equals its active revision's vocabulary still skips validation (#1227): the vendored layer carries the stamp, so the comparison holds unless the page's declarations add to the relation, which revalidates and restamps. The verb writer default (`agent` where declared, else `user`) stays resolved at intake on each side, now held to one fixture, `tests/verb_writer_cases.json`, that `verb_writer` and `adoptRegistry` both read. Stamping it would change the author contract, whose schema admits only `writer: "agent"`, and would make every page that declares its own verb differ from its validated vocabulary, so #1227's shortcut would never hold for it. Behaviour that moved: a served vocabulary without `$decisions` now fails startup with the other required `$` facts. > _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.
A fresh server's first read of a page spent ~300ms in activation re-checking an unchanged
index.html. About 280ms of that re-validated inputs the active revision already carries:theme.css(425KB) andshadow.css;The author's own page took ~5ms.
A revision is written only after
check_sourcepasses, so its registry and sheets were validated when it activated. With this change:compose_page_registrytakes the vocabulary already validated and skips validation when the composition equals it.read_page_registrypasses the active revision's.load_registrykeeps the one check the running Leaf can disagree with: the kernel's event contract, which a page vendored by an earlier Leaf may carry in an older form.SourceCheck.columnis gone:version checkcomputes the column it prints.Cold
activate_sourceon a preview page (fresh process, unchanged source): 305–380ms before, 36–42ms after. A new test pins that a fresh process reading an unchanged page validates neither the registry nor the vendored sheets, and that an editedshadow.cssis still linted; reverting either skip turns it red.🤖 Generated with Claude Code