Skip to content

fix(schema): catch vault-v1 proposal kind enum up to revision 1.4 (add_lens/update_lens)#95

Merged
claude-dataviking merged 1 commit into
mainfrom
fix/schema-proposal-lens-kinds
Jul 15, 2026
Merged

fix(schema): catch vault-v1 proposal kind enum up to revision 1.4 (add_lens/update_lens)#95
claude-dataviking merged 1 commit into
mainfrom
fix/schema-proposal-lens-kinds

Conversation

@claude-dataviking

Copy link
Copy Markdown
Contributor

What

Contract-truth fix: add_lens/update_lens shipped with the revision-1.4 positioning-lens feature (traitprint.proposals PROPOSAL_KINDS, the proposals CLI, traitprint proposals contract) but were never added to docs/schema/vault-v1/vault-v1.schema.json's $defs/proposal kind 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, the kind property 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 TestSchemaProposalEnums in tests/test_doc_truth.py pins the schema's kind and status enums to PROPOSAL_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.py behavior; it only makes the schema document what local validation already does. The separately-queued cloud fix (adding lens kinds to the hosted vault_propose allowlist) is unaffected.

Gates

  • pytest -q: 1030 passed, 3 skipped
  • ruff check src/ tests/: clean
  • mypy src/: clean

🤖 Generated with Claude Code

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
claude-dataviking merged commit d3a58de into main Jul 15, 2026
4 checks passed
@claude-dataviking
claude-dataviking deleted the fix/schema-proposal-lens-kinds branch July 15, 2026 23:18
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