Repository navigation
feat(audit): every lexicon's checks carry catalog metadata (#1346) - #1362
Merged
Merged
Conversation
`auditCatalog()` supplies the per-check metadata `chant audit` reports — title, tier, fix kind, authority, category. `resolveAuditCatalog` merges whatever the plugins contribute and returns; a lexicon that omits the method contributes nothing, silently, so its findings surface with no metadata at all. fly and temporal omitted it. Their six post-synth checks — FLY010, FLY011, TMP001, TMP002, TMP010, TMP011 — have been reaching the report bare. Both now have catalogs, constructed directly rather than through `auditRule()` because five of the six read the chant model rather than the emitted output and so carry `yamlBased: false`. The drift guard meant to catch exactly this listed its own nine lexicon names. It missed fountain, which does contribute a catalog, and could not notice fly and temporal, which did not. It now enumerates `lexicons/`, so a thirteenth lexicon is covered on arrival rather than by someone remembering. Widening it surfaced a second thing: its "no stale entries" test treated only post-synth ids as real, which would have failed fountain for documenting FTN001, a lint rule. A catalog entry for a lint rule is not stale — a reader who hits it wants the same metadata — so the stale test now accepts any rule the lexicon ships, while the coverage test still requires every post-synth check. Requiring an entry for every lint rule in every lexicon would be a much larger claim than the audit makes. `chant dev check-lexicon` warns at tier 2 on a check with no entry: the lexicon builds and lints correctly without one, what suffers is a command's output. Core's cross-cutting ids (COR*, EXT*) are excluded from both, since they are not any lexicon's to catalog. `auditCatalog` had no authoring documentation at all; post-synth-checks.mdx now covers it. Refs #1340. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ
lex00
force-pushed
the
feat/audit-catalog-contract
branch
from
August 3, 2026 00:55
e288e1e to
9f75a4b
Compare
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.
Closes #1346. Part of #1340. Stacked on #1361.
The gap
auditCatalog()supplies the metadatachant auditreports — title, tier, fix kind, authority, category.resolveAuditCatalogmerges whatever plugins contribute and returns. A lexicon that omits the method contributes nothing, silently, so its findings surface bare.fly and temporal omitted it. Six checks have been reaching the report with no metadata:
The drift guard that exists to catch exactly this listed its own lexicon names:
Nine of twelve. It missed fountain, which does contribute a catalog, and could not notice fly and temporal, which did not.
The fix
auditRule(), because five of the six checks read the chant model rather than the emitted output and so carryyamlBased: false— the same reasoning as fountain's catalog.lexicons/. A thirteenth lexicon is covered on arrival rather than by someone remembering to add a string.check-lexicon, so an out-of-tree lexicon gets the same warning. Tier 2 rather than 1: the lexicon builds and lints correctly without a catalog; what suffers is one command's output.auditCataloghad zero hits acrossdocs/—post-synth-checks.mdxnow covers it, including theyamlBasedtrap and the core-id exclusion.One thing widening the guard surfaced
Its "no stale entries" test treated only post-synth ids as real, which would have failed fountain for documenting
FTN001— a lint rule. An entry for a lint rule is not stale; a reader who hits it wants the same metadata. So the stale test now accepts any rule the lexicon ships, while the coverage test still requires every post-synth check. Requiring an entry for every lint rule in every lexicon would be a much larger claim than the audit makes.Verification
🤖 Generated with Claude Code
https://claude.ai/code/session_01Jp6SP7ZiavhoEB1AFuwwoJ