Skip to content

feat(ai-service): define and export PII_MODEL_VERSION in scrubber and…#360

Merged
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
yunus-dev-codecrafter:feature/pii-model-versioning
Jul 17, 2026
Merged

feat(ai-service): define and export PII_MODEL_VERSION in scrubber and…#360
kilodesodiq-arch merged 1 commit into
ChainForgee:mainfrom
yunus-dev-codecrafter:feature/pii-model-versioning

Conversation

@yunus-dev-codecrafter

Copy link
Copy Markdown
Contributor

closes #268

Summary

Adds a pinned PII_MODEL_VERSION constant (1.0.0) to the PII scrubber and exposes it as a Prometheus pii_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_exported test reads the Prometheus registry directly (same pattern as test_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 -v

The pytest_terminal_summary hook in conftest.py prints the version banner in every test run's footer.

Screenshots

N/A

Checklist

  • Tests added or updated for new/changed behavior
  • Existing tests pass
  • No secrets, keys, or seed phrases committed
  • Follows the coding conventions in the relevant service README
  • PR is focused on a single concern

Copy link
Copy Markdown
Contributor

Awesome work on this! Thanks for the contribution 🚀 Merging now.

@kilodesodiq-arch
kilodesodiq-arch merged commit 7d493dd into ChainForgee:main Jul 17, 2026
7 checks passed
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.

Replace spacy Language.en baseline with on-device model version pinning

2 participants