| Entry point | pii-redaction-service/app/main.py | FastAPI app, lifespan (LanguageClient init), /health + /redact routes |
| Settings | pii-redaction-service/app/config.py | Pydantic Settings — all env vars (PII_ prefix) |
| Models | pii-redaction-service/app/models.py | RedactionRequest, RedactionSuccess, RedactionFailure |
| Language client | pii-redaction-service/app/language_client.py | Azure Language Service REST client (httpx, MI auth via DefaultAzureCredential) |
| Orchestrator | pii-redaction-service/app/orchestrator.py | Batching, concurrent dispatch (semaphore-bounded), rolling timeout budget enforcement |
| Logging config | pii-redaction-service/app/logging_config.py | Structured logging setup |
| Dockerfile | pii-redaction-service/Dockerfile | Multi-stage: uv builder → Python slim runtime |
| Dependencies | pii-redaction-service/pyproject.toml | uv-managed deps (fastapi, httpx, azure-identity, pydantic-settings) |
| Unit tests | pii-redaction-service/tests/ | pytest suite for API routes and orchestrator logic |
| GHA workflow | .github/workflows/.builds.yml | Reusable workflow → GHCR image via bcgov/action-builder-ghcr (matrix entry) |
| Terraform module | infra-ai-hub/modules/pii-redaction-service/ | Container App definition, RBAC (Cognitive Services User on Language Service) |
| Stack wiring | infra-ai-hub/stacks/pii-redaction/main.tf | Calls module with feature flag gate; outputs FQDN consumed by APIM stack |