fix(schema): catch vault-v1 proposal kind enum up to revision 1.4 (add_lens/update_lens)#95
Merged
Merged
Conversation
The add_lens/update_lens proposal kinds shipped with the revision-1.4 positioning-lens feature (traitprint.proposals PROPOSAL_KINDS, the proposals CLI, `proposals contract`) but were never added to the contract schema's $defs/proposal kind enum, so external validators consuming vault-v1.schema.json directly rejected lens proposals the CLI accepts. Documenting shipped behavior only — no validation semantics change and no new contract revision (recorded as a correction to the 1.4 record, per the schema's existing "Revision 1.4:" annotation convention): - vault-v1.schema.json: add add_lens/update_lens to the kind enum with a Revision 1.4 description note; amend the $comment's 1.4 sentence. - docs/schema/vault-v1/README.md: amend the 1.4 revision-history entry. - tests/test_doc_truth.py: new TestSchemaProposalEnums pins the schema's kind and status enums to PROPOSAL_KINDS/PROPOSAL_STATUSES so the two surfaces can never drift again. - CHANGELOG.md: Fixed entry under [Unreleased]. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-dataviking
requested review from
openclaw-dv and
the-data-viking
as code owners
July 15, 2026 23:17
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.
What
Contract-truth fix:
add_lens/update_lensshipped with the revision-1.4 positioning-lens feature (traitprint.proposalsPROPOSAL_KINDS, the proposals CLI,traitprint proposals contract) but were never added todocs/schema/vault-v1/vault-v1.schema.json's$defs/proposalkind enum — so external validators consuming the JSON Schema directly rejected lens proposals the CLI accepts. Found as a side observation during the lens-capability audit (see #94).How it's recorded
This documents already-shipped behavior — no validation semantics change and no new contract revision. The schema's enum had never been amended before (it was written once in the initial v1 commit), so there was no prior enum-addition precedent; the convention that does exist is the "Revision N:" annotation style, so this is recorded as a correction to the 1.4 record:
vault-v1.schema.json: enum gains the two kinds, thekindproperty gains a "Revision 1.4: ... caught up in a later correction" description, and the$comment's 1.4 sentence is amended.docs/schema/vault-v1/README.md: the 1.4 revision-history entry is amended the same way.CHANGELOG.md: Fixed entry under [Unreleased].Drift guard
No test pinned the schema's proposal enums to the code — exactly how this slipped. New
TestSchemaProposalEnumsintests/test_doc_truth.pypins the schema's kind and status enums toPROPOSAL_KINDS/PROPOSAL_STATUSES, so shipping a new proposal kind without updating the contract schema now fails CI.Cloud note (per CLAUDE.md "don't drift from cloud"): this changes no
proposals.pybehavior; it only makes the schema document what local validation already does. The separately-queued cloud fix (adding lens kinds to the hostedvault_proposeallowlist) is unaffected.Gates
pytest -q: 1030 passed, 3 skippedruff check src/ tests/: cleanmypy src/: clean🤖 Generated with Claude Code