Initial commit — Performance West telecom compliance platform

Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
justin 2026-04-27 06:54:22 -05:00
commit f8cd37ac8c
1823 changed files with 145167 additions and 0 deletions

View file

@ -0,0 +1,20 @@
-- 039: Add defer_until + idempotency markers to canada_crtc_orders
--
-- defer_until: timestamp until which the worker should not run this order's pipeline.
-- Used by the standard-vs-expedited delay system.
--
-- binder_emailed_at / binder_compiled_at / binder_uploaded_at: idempotency markers
-- for Steps 7-9 so the pipeline can resume after a defer without re-doing work
-- (preventing duplicate client emails).
ALTER TABLE canada_crtc_orders
ADD COLUMN IF NOT EXISTS defer_until TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS automation_note TEXT,
ADD COLUMN IF NOT EXISTS binder_compiled_at TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS binder_uploaded_at TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS binder_emailed_at TIMESTAMPTZ;
-- Index for the deferred order poller
CREATE INDEX IF NOT EXISTS idx_crtc_orders_deferred
ON canada_crtc_orders (defer_until)
WHERE automation_status = 'Deferred' AND defer_until IS NOT NULL;