diff --git a/AGENTS.go.md b/AGENTS.go.md index e4e98f1..7dd7f28 100644 --- a/AGENTS.go.md +++ b/AGENTS.go.md @@ -143,6 +143,26 @@ Domain errors are defined in `internal/domain//errors.go` as sentinel - Pass `ctx` everywhere. Cancellation respected. - No global mutexes for request data. Use per-request context. +## Before every push — MANDATORY + +Run all steps for `ai-compliance-sdk/` before pushing. CI runs the same checks and will fail if you skip this. + +```bash +cd ai-compliance-sdk + +# 1. Vet + lint +go vet ./... +golangci-lint run --timeout 5m ./... + +# 2. Tests +go test ./... + +# 3. Build +go build ./... +``` + +All steps must exit 0. Do not push if any step fails. + ## What you may NOT do - Touch DB schema/migrations. diff --git a/AGENTS.python.md b/AGENTS.python.md index 9fe715d..45f2f5c 100644 --- a/AGENTS.python.md +++ b/AGENTS.python.md @@ -135,6 +135,26 @@ from .schemas.consent import * # noqa: F401, F403 - Log via `structlog` with bound context (`tenant_id`, `request_id`). Never log secrets, PII, or full request bodies. - Audit-relevant actions go through the audit logger, not the application logger. +## Before every push — MANDATORY + +Run all three steps for every Python service you touched before pushing. CI runs the same checks and will fail if you skip this. + +```bash +cd # backend-compliance | document-crawler | dsms-gateway | compliance-tts-service + +# 1. Lint +ruff check . +mypy compliance/ # only for backend-compliance + +# 2. Tests +pytest -x + +# 3. Import sanity (catches NameError at collection time) +python -c "import compliance" # or the service's main module +``` + +All steps must exit 0. Do not push if any step fails. + ## What you may NOT do - Add a new Alembic migration. diff --git a/admin-compliance/lib/sdk/vendor-compliance/context.tsx b/admin-compliance/lib/sdk/vendor-compliance/context.tsx index 6ef2790..5d1554f 100644 --- a/admin-compliance/lib/sdk/vendor-compliance/context.tsx +++ b/admin-compliance/lib/sdk/vendor-compliance/context.tsx @@ -268,19 +268,4 @@ export function VendorComplianceProvider({ ) } -// ========================================== -// HOOK -// ========================================== - -export function useVendorCompliance(): VendorComplianceContextValue { - const context = useContext(VendorComplianceContext) - - if (!context) { - throw new Error( - 'useVendorCompliance must be used within a VendorComplianceProvider' - ) - } - - return context -} diff --git a/backend-compliance/compliance/db/models.py b/backend-compliance/compliance/db/models.py index eb53bdc..b2dc19e 100644 --- a/backend-compliance/compliance/db/models.py +++ b/backend-compliance/compliance/db/models.py @@ -25,6 +25,8 @@ DO NOT add new classes to this file. Add them to the appropriate aggregate module and re-export here. """ +import enum # noqa: F401 — used by inline enum classes below + # Order matters: later modules reference classes defined in earlier ones via # SQLAlchemy string relationships. Keep foundational aggregates first.