chore: raise per-vault lens cap MAX_LENSES from 5 to 20#92
Merged
Conversation
Bumps the per-vault positioning-lens cap from 5 to 20. The runtime validators (VaultSchema load, add_lens proposal apply, VaultStore.add_lens) already interpolate MAX_LENSES into their error messages, so only the constant plus the docs/tests that pinned the literal 5 needed touching. Cross-repo contract change: the PYTHON side. traitprint-cloud enforces its own MAX_LENSES mirror and bumps it in a sibling PR. 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 22:35
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
Raises the per-vault positioning-lens cap
MAX_LENSESfrom 5 to 20 (src/traitprint/schema.py).The runtime validators already interpolate the constant into their error messages, so the enforcement points (VaultSchema load,
add_lensproposal apply,VaultStore.add_lens) needed no logic change — only the constant plus every doc/test that pinned the literal5was updated.Files changed
Source
src/traitprint/schema.py—MAX_LENSES = 5→20; docstring wordingsrc/traitprint/vault.py,src/traitprint/proposals.py,src/traitprint/mcp_server.py— docstring/prompt wording ("5-lens cap" → "20-lens cap")Docs / schema
docs/schema/lens-v1/README.md,docs/schema/vault-v1/README.md(x2)docs/schema/vault-v1/vault-v1.schema.json— the livelensinvariant description and the rev-1.4$commentnarrationAGENTS.md,CHANGELOG.md(unreleased lens entry),skills/shared/cli-reference.md(x2),skills/traitprint-position-lens/SKILL.md(x2)Tests
test_schema.py—test_max_lenses_is_five→_is_twenty(asserts== 20), over-cap match stringtest_vault_crud.py— renamedtest_add_sixth_lens_errors→test_add_over_cap_lens_errors, batch-cap countadded 5→added 20, match stringtest_mcp_server.py,test_skills.py— match/assert stringsrange(MAX_LENSES)/MAX_LENSES + 1scale automatically via the constant.No schema contract-revision bump: this changes a validation bound, not the on-disk key structure, so 6–20-lens vaults remain structurally valid rev-1.4 vaults.
Cross-repo parity note
This is the Python side of a cross-repo contract change. traitprint-cloud enforces its own
MAX_LENSESmirror and bumps it in a sibling PR. Until both merge, a vault holding 6–20 lenses will not round-trip between the local product and cloud (cloud still rejects >5). Acceptable for the current beta.Gates
.venv/bin/pytest -q— 1028 passed, 3 skippedruff check src/ tests/— All checks passedmypy src/— Success, no issues (33 files)🤖 Generated with Claude Code