Skip to content

Validate authored snippet source files - #1327

Draft
danielporterda wants to merge 1 commit into
snippet-validate-authored-pagefrom
snippet-validate-source-files
Draft

Validate authored snippet source files#1327
danielporterda wants to merge 1 commit into
snippet-validate-authored-pagefrom
snippet-validate-source-files

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds the filesystem validation service: loads the checked-in registry once, discovers only *.source.mdx files, reads each page, runs whole-page validation, and returns deterministically sorted diagnostics. Local refs remain opt-in for preview callers.

It does not expose command-line arguments or process exit behavior.

Why

Filesystem discovery/reading is separate from both the in-memory page contract and the public CLI.

Validation

  • python -m pytest tests/test_authored_snippet_file_validation.py tests/test_authored_snippet_page_validation.py tests/test_snippet_source_page_discovery.py tests/test_snippet_repository_registry.py (14 passed)
  • python -m ruff check scripts/snippets/file_validation.py tests/test_authored_snippet_file_validation.py
  • python -m mypy scripts/snippets/file_validation.py
  • git diff --check

Signed-off-by: danielporterda <daniel.porter@digitalasset.com>
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.

1 participant