test: add public API snapshot guard#166
Open
akmhatey-ai wants to merge 1 commit into
Open
Conversation
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.
Summary
Adds a public API snapshot guard for
chainweaver.__all__, exported class/function signatures, and exported Pydantic model fields. Prepared with AI assistance and verified locally.Changes
tests/public_api_snapshot.pyandtests/test_public_api_snapshot.py.tests/fixtures/public_api.json.tests/scripts/regen_public_api.pyfor intentional public API changes.Testing
ruff check chainweaver/ tests/ examples/)ruff format --check chainweaver/ tests/ examples/)python -m mypy chainweaver/ tests/)python -m pytest tests/ -v)Additional validation:
python tests/scripts/regen_public_api.pyran in 500.43 ms locally and produced a stable fixture hash on repeat regeneration.git diff --cached --checkgit diff --cached | gitleaks detect --pipe --redact --verbose --no-colorRelated Issues
Closes #140
Checklist
AGENTS.mdanddocs/agent-context/)Limitations: this intentionally does not snapshot docstrings, matching the issue scope.