fix(audit): repair the content auditor after the Astro migration (audit C2) #71
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!71
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/audit-c2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Audit C2, broken since the VitePress to Astro migration.
bun run --cwd audit auditread its trusted corpus frompackages/docs/src/reference/syntax, which no longer exists, so the corpus was empty and 420 of 423 snippets (its own good examples included) were flagged.Three causes, all in the audit workspace:
config.tspointed at the old docs tree (syntax pages, narrative tutorial/how-to dirs, public examples, the exclude dir). They now namepackages/docs/src/content/docs/{,fr/}docs/...andpackages/docs/public/examples. A page is resolved as.mdor.mdx.mdfiles, while many docs pages are.mdxnow (52 more snippets scanned: 434 -> 486)missingConfiguredPaths()is now checked at startup and the audit exits 1 listing what is missingResult: 80 of 486 snippets flagged (was 420 of 423), the trusted vocabulary is loaded (51 fences per language), and the tool's own self-test no longer flags its good examples (13 anomalies -> 9 honest coverage gaps).
audit/tests/config.test.ts(5 tests, run by the rootbun test) fails on the old configuration: paths exist, both languages yield trusted fences,.mdxis read, the self-test's good examples are not flagged. Checking it already caught one mistake of mine (extensions left in the page names).Left for a human, as the tool itself says: the doc gained a 21st mistake example (a
//comment in the middle of a step, 2026-08-16) that is not transcribed inself-test-cases.ts; and the newly visible findings (modules.mdx@useexcerpts, 9 self-test gaps) are triage items, not silenced. No changeset: the workspace is private. ci (1347 tests) passes.