Skip to content

Stamp each vocabulary's decisions into the registry, and read them in the browser - #1275

Merged
max-sixty merged 2 commits into
mainfrom
consolidate-registry-decisions
Sep 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
consolidate-registry-decisions

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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

max-sixty and others added 2 commits September 26, 2026 21:45
… the browser

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.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit bfaf4a1 into main Sep 27, 2026
5 checks passed
@max-sixty
max-sixty deleted the consolidate-registry-decisions branch September 27, 2026 05:16
max-sixty added a commit that referenced this pull request Sep 28, 2026
…1351)

The declared marks (x-space, x-inline, x-exhibit, x-bound, x-reading-role) now have one table, `schema.DECLARED_MARKS`, which both painters read. Delivery paints a page's document from it, and the runtime paints a thread message from the same table, stamped into the vocabulary as `$marks`.

**Owner.** #1325 made delivery paint a page's marks, which left the vocabulary stated twice. Python's `revision_delivery.py` had `DECLARED_MARKS` and `AUTHORED_MARKS`, and derived each paint name as `data-lf-<key>`. The runtime's `presentation.js` had `MARKED_IN_MESSAGE`, the five mark entries of `PAGE_PAINT_ATTRIBUTE`, and a separate `data-bound` override line. Nothing had drifted yet. The keys belong to `EXTENSION_SCHEMA`, so the table sits beside it in `schema.py`. Each entry names its paint attribute, the authored attribute that overrides the tag's declaration (`data-width`, `data-bound`), and whether the mark holds in a message. Every mark does except x-space, because the room belongs to the document and a message renders in the panel.

**What changed**

- `registry.layer.stamp_composition` stamps `$decisions` and `$marks`. It replaces the two `stamp_decisions` calls in `page init`'s layer composition and a page's composition, which is the route #1275 took for `$decisions`. A declared `$marks` is overwritten.
- `mark_declared` iterates `DECLARED_MARKS`. The runtime's `markDeclared` iterates `registry.$marks` and skips the marks that don't hold in a message. The registry intake requires `$marks`.
- `PAGE_PAINT_ATTRIBUTE` loses its five mark entries and holds only the runtime's own paint. The replay signature's exclusion is now `isPagePaint(name)`, which accepts the runtime's paint or any `$marks` paint.
- `bounds.js` names `data-lf-bound` literally, as the theme's bound rule does. Its watch on arriving bounds (#1364) starts at boot, before any registry has loaded.
- Deleted: `DECLARED_MARKS`/`AUTHORED_MARKS` in delivery, `MARKED_IN_MESSAGE`, the runtime's `data-bound` special case, and `PAGE_PAINT_ATTRIBUTE`'s `inline`, `space`, `readingRole`, `bound` and `exhibit`.

**What still names the paint attributes.** `theme.css`, `layouts.css`, package themes, `render-checks/layout.js` and `bounds.js` read them by name. Those names are the stylesheet's contract, which `packages.md` documents for package authors. `structure.AUTHORED_ALLOCATIONS` names `data-width` and `data-bound` too. It holds a different fact: the values an author may write, checked by `page check`, and it includes `data-rail`, which is not a mark.

**Behaviour that moved.** None for a user. A served vocabulary without `$marks` now fails at intake, the same way one without `$decisions` does. `test_a_message_carries_the_marks_a_page_would_except_its_room` checks a message's marks through the served registry: exhibit, inline, an authored `data-bound`, and no room even for an authored `data-width`. It fails when `markDeclared` ignores the `message` flag. `test_replay_signatures_exclude_settlement_and_other_runtime_paint` now also checks that a mark's paint stays out of the replay signature.

**Phase profile.** No startup change. The registry fetch and its size are the same apart from the five-entry `$marks`, and delivery paints the same attributes it did before.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants