Repository navigation
lint: reject unknown vault.toml keys with BVM004 - #5
Merged
Merged
Conversation
An unknown key -- including a plausible one like receipts_dir -- was accepted silently at PASS/exit 0. In a conformance checker, silence on unrecognized input is the failure mode worth closing: the author reads PASS as the setting having taken effect, when nothing read the key. New diagnostic BVM004 fires per unknown top-level key, naming the key and the closed declared set (schema, name, method_version). SPEC.md section 3 now states MUST NOT contain any other key, so rejection is a documented contract rather than an unstated default -- the issue's forward-compatibility escape-hatch alternative is thereby declined explicitly: a later series bumps schema and method_version instead. Registered in codes.py, schemas/diagnostics.json (diagnostic parity), and docs/linter-reference.md. Tests cover the receipts_dir adoption trap from the issue and that the declared keys alone stay clean. Full repository verify PASS; 70 tests, 10 subtests.
This was referenced Aug 28, 2026
SaMullinsJr
added a commit
that referenced
this pull request
Aug 28, 2026
Collects everything since v0.2.0: BVM004 unknown-key rejection (#5), the four validator hardenings + BVM-01 (#6), CI action bumps. v0.3.0 rejects vaults v0.2.0 passed; the CHANGELOG names each case. Method version 0.1.1: SPEC.md section 3 gained one normative sentence (vault.toml carries no undeclared keys). Same 0.1.x series; templates and the tutorial vault declare 0.1.1; the parity gate welds all eight surfaces (release 0.3.0, method 0.1.1, both PASS). The three version-parity tests hardcoded the literal current method version in their mutations, so this first in-series bump broke them -- they mutated nothing and asserted about the unmutated file. Rewritten as regex mutations over the version field with a subn count assert, so they keep testing drift after any future bump.
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.
Fixes #2.
bvm-lintnow rejects unknownvault.tomlkeys instead of silently accepting them atPASS/exit 0. This is the issue's option 1, the smaller change.BVM004, one finding per unknown top-level key, naming the key and the closed set (schema,name,method_version).SPEC.md§3 now says the file MUST NOT contain any other key, so the rejection is a documented contract. This also answers the issue's third alternative explicitly: unknown keys are not a forward-compatibility escape hatch here; a later method series arrives through aschema/method_versionbump with its own checker contract.codes.py,schemas/diagnostics.json(diagnostic parity gate), anddocs/linter-reference.md.receipts_dir = "MY_RECEIPTS"adoption trap from the issue now yieldsBVM004; a conformantvault.tomlstays clean../verify_repo.shreturns REPOSITORY VERIFY PASS (50 codes in diagnostic parity);make testpasses 70 tests + 10 subtests.No CHANGELOG entry per repo convention: fix commits do not touch it, the release PR collects them.