Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions database/migrations/012_audit_event_type_idempotency.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- 012_audit_event_type_idempotency.sql: admit IDEMPOTENCY_CONFLICT writes.
-- apps/api/webhooks.py persists event_type='IDEMPOTENCY_CONFLICT' on webhook
-- idempotency conflicts, but 003's chk_audit_event_type allowlist omits it,
-- so live conflicts crash with CheckViolation. This upgrade is idempotent:
-- on fresh DBs 003 creates the old constraint and this file widens it; on
-- already-migrated DBs 003 is skipped by version tracking and this file
-- performs the same widening. No other constraint is touched.
DO $$ BEGIN
ALTER TABLE audit_logs DROP CONSTRAINT IF EXISTS chk_audit_event_type;
ALTER TABLE audit_logs ADD CONSTRAINT chk_audit_event_type CHECK (event_type IN ('pipeline_started','pipeline_completed','pipeline_failed','assertion_created','assertion_validated','action_proposed','action_approved','action_rejected','commentary_submitted','commentary_reviewed','user_login','export_downloaded','config_changed','anomaly_detected','data_quality_alert','row_inserted','row_updated','row_deleted','rls_violation_attempted','admin_cross_tenant_access','IDEMPOTENCY_CONFLICT'));
END $$;
10 changes: 10 additions & 0 deletions finance/llm/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""Quarantined: legacy ``finance.llm`` provider stack (REMOVED).

The provider modules (client, model_router, structured_generation,
response_validator, telemetry) were unreachable from all executable paths —
imported only by each other and dead-code tests — and have been deleted.

Live LLM access goes through ``shared.utils.llm_client`` (used by
``agents/`` and ``apps/``). Do NOT resurrect provider logic in this package;
extend the shared client instead.
"""
69 changes: 0 additions & 69 deletions finance/llm/client.py

This file was deleted.

88 changes: 0 additions & 88 deletions finance/llm/model_router.py

This file was deleted.

33 changes: 0 additions & 33 deletions finance/llm/response_validator.py

This file was deleted.

76 changes: 0 additions & 76 deletions finance/llm/structured_generation.py

This file was deleted.

72 changes: 0 additions & 72 deletions finance/llm/telemetry.py

This file was deleted.

Loading
Loading