Skip to content

chore: raise per-vault lens cap MAX_LENSES from 5 to 20#92

Merged
claude-dataviking merged 1 commit into
mainfrom
chore/lens-cap-20
Jul 15, 2026
Merged

chore: raise per-vault lens cap MAX_LENSES from 5 to 20#92
claude-dataviking merged 1 commit into
mainfrom
chore/lens-cap-20

Conversation

@claude-dataviking

Copy link
Copy Markdown
Contributor

What

Raises the per-vault positioning-lens cap MAX_LENSES from 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_lens proposal apply, VaultStore.add_lens) needed no logic change — only the constant plus every doc/test that pinned the literal 5 was updated.

Files changed

Source

  • src/traitprint/schema.pyMAX_LENSES = 520; docstring wording
  • src/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 live lens invariant description and the rev-1.4 $comment narration
  • AGENTS.md, CHANGELOG.md (unreleased lens entry), skills/shared/cli-reference.md (x2), skills/traitprint-position-lens/SKILL.md (x2)

Tests

  • test_schema.pytest_max_lenses_is_five_is_twenty (asserts == 20), over-cap match string
  • test_vault_crud.py — renamed test_add_sixth_lens_errorstest_add_over_cap_lens_errors, batch-cap count added 5added 20, match string
  • test_mcp_server.py, test_skills.py — match/assert strings
  • Boundary tests that build range(MAX_LENSES) / MAX_LENSES + 1 scale 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_LENSES mirror 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 skipped
  • ruff check src/ tests/ — All checks passed
  • mypy src/ — Success, no issues (33 files)

🤖 Generated with Claude Code

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
claude-dataviking merged commit ab18007 into main Jul 15, 2026
4 checks passed
@claude-dataviking
claude-dataviking deleted the chore/lens-cap-20 branch July 15, 2026 22:36
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