Repository navigation
State each declared attribute's words as its schema's enum - #3718
Merged
Merged
Conversation
Composing a vocabulary now writes $tones and $languages into the enum of each attribute marked x-tone or x-language (stamp_words), so the entry an agent reads lists the words. Validation reads that enum through the attribute schema, replacing the separate DECLARED_WORDS pass and its unknown-word finding, and `page instructions --use` lists any attribute's enum from the schema, replacing #3690's listing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 23, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The removed declared_word_errors check leaves older active pages unable to catch an unknown tone or language. compose_page_registry skips stamping when its composition equals the active revision's saved vocabulary; a revision captured before this change has no attribute enum. With that registry, fragment_errors accepts tone="dangre" (I reproduced this with an unstamped lf-column schema), so page check can pass while the intended tint silently fails. This changes a guarantee for pages at the current protocol. Bump $events.protocol so those pages are refused and re-vendored before validation or writes rely on the new enum.
…gistry A page vendored before the declared words moved into each attribute's enum carries a registry without them, and would pass an unknown tone or language. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 23, 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.
An attribute that names one of the layer's words, such as
lf-column'stoneorlf-code'slanguage, now carries those words as a standard JSON Schemaenumin the vocabulary a page composes. Before this, its schema said only{"type": "string"}. The words lived under$tonesand$languages, so an agent reading the entry went looking for them. Claude Code readspage/registry.jsondirectly, neverpage instructions, and spent a model call on that lookup in most replies.Composing the vocabulary (
registry.layer.stamp_composition, atpage initand over a page's own declarations) now writes each list into the attribute'senum. That isregistry.contract.stamp_words, beside$decisionsand$states. Source registries still declare onlyx-toneorx-language, so a new tag that takes a tone still needs only that key, and the lists stay the one home of the words.That leaves one mechanism where there were three:
enumthrough the attribute schema it already checks. The separateDECLARED_WORDSpass and itsunknown-wordfinding are deleted. An unknown tone now reads'success' is not one of ['ok', 'warn', 'danger'].page instructions --uselists the words of every attribute whose schema has anenum, read from the schema. That replaces List the words a declared attribute takes in page instructions #3690's listing from the layer's lists.This bumps the page protocol from 21 to 22. No page runtime reads the property schemas, but a page vendored before this change carries a registry without the
enum. A Leaf at the same number would then stop checking that page's tones and languages. The bump has the session holding such a page re-vendor it on its first command, and the stamped registry checks again.Measured with Claude Code waiting journeys, side by side on this branch's base
7c0aa359fand on the change, 7 completed runs per arm:The whole-reply drop is within the run-to-run spread at this sample size. The lookup is gone from most replies, and removing that lookup was the point. One Codex App Server journey and one Pi journey were also run to spot-check that both still see the words.
This is the coordinator's #48 follow-up to Max's decision #40 on the overnight report.