Skip to content

Code snippet source safety diagnostics - #1317

Draft
danielporterda wants to merge 1 commit into
snippet-source-attribute-diagnosticsfrom
snippet-source-safety-diagnostics
Draft

Code snippet source safety diagnostics#1317
danielporterda wants to merge 1 commit into
snippet-source-attribute-diagnosticsfrom
snippet-source-safety-diagnostics

Conversation

@danielporterda

@danielporterda danielporterda commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

What changed

Maps resolved-source safety failures to stable diagnostics: SNIP009 for an unregistered repository and SNIP010 for an unsafe path.

This PR only assigns codes and preserves spans/messages; it does not change either safety rule.

Why

Repository and path safety diagnostics are independently reviewable from source-attribute diagnostics and local-ref remediation.

Validation

  • python -m pytest tests/test_snippet_source_safety_diagnostics.py tests/test_snippet_source_safety_validation.py (5 passed)
  • python -m ruff check scripts/snippets/diagnostics.py tests/test_snippet_source_safety_diagnostics.py
  • python -m mypy scripts/snippets/diagnostics.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