feat(ai-service): define and export PII_MODEL_VERSION in scrubber and…#360
Merged
kilodesodiq-arch merged 1 commit intoJul 17, 2026
Conversation
Contributor
|
Awesome work on this! Thanks for the contribution 🚀 Merging now. |
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 #268
Summary
Adds a pinned
PII_MODEL_VERSIONconstant (1.0.0) to the PII scrubber and exposes it as a Prometheuspii_model_version{version="..."}gauge. This ensures reproducibility — two machines scrubbing the same text will report the same model version, and consumers (metrics endpoints, regression harness) can track which version is in use.Testing
Ran the PII scrubber and regression test suite. The new
test_pii_model_version_exportedtest reads the Prometheus registry directly (same pattern astest_circuit_breaker.py) to verify the metric is exported with the correct version label.cd app/ai-service pytest tests/test_pii_scrubber.py tests/test_pii_regression.py -vThe
pytest_terminal_summaryhook inconftest.pyprints the version banner in every test run's footer.Screenshots
N/A
Checklist