Phase 0 — Verified System Baseline

Audit date: 2026-11-24
Baseline commit: 3b8dd47807ea27ee6a3a51beed7281e87f34b97d (main, origin/main, tag v1.0.0-rc.3)
Release boundary: stakeholder-ready local demonstration; not authorized for public deployment or real complaint data.

Evidence rules

The executable code, tests, migration, Compose topology, and rc.3 release/handoff documents are authoritative. The user-supplied CitizenKaren_PoC_Guide.pdf was text-extracted and visually reviewed as a supplemental source for the original PoC KPIs. Older vision and planning documents describe intended capabilities but do not prove implementation. “Complete” below means complete inside the explicitly simulated local-demo boundary unless stated otherwise.

The PoC guide defines four measurable runtime gates that materially affect this audit: submission latency below 500 ms with fewer than 5% errors at 50 concurrent users; eventual recovery from simulated FCC outages; audit/metrics generation for every submission; and Docker-based integration/E2E verification. The current automated suite does not prove the load or outage-recovery gates.

System baseline matrix

Capability Documented intent Implemented state Baseline status Primary evidence
Citizen web application Accessible React interface for directory, intake, tracking, and administration React 19 SPA with 28-destination directory, FCC and registry-driven demo forms, tracking, Command Center, and admin demo Complete for demo frontend/src/App.tsx; frontend/src/data/agencies.ts; frontend/src/pages/
API FastAPI JSON/REST and OpenAPI 3.1; architecture also mentions GraphQL FastAPI REST API and generated OpenAPI 3.1 contract; no GraphQL implementation Partial; REST complete, GraphQL documented-only backend/app/main.py; api/openapi.yaml; docs/SYSTEM_ARCHITECTURE.md
Complaint intake Consent-gated submission with immediate tracking ID Strict Pydantic model, consent version, honeypot, selected sensitive-number rejection, and 24-bit random tracking suffix Complete for demo; production access model missing backend/app/models.py:26; backend/app/main.py:193
Complaint tracking and deletion Durable status retrieval and local-copy deletion Status, events, evidence deletion, and payload redaction exist; possession of a tracking ID is the only control Partial and unsafe for production backend/app/main.py:294; backend/app/main.py:415; backend/app/db.py:241
Identity and RBAC JWT authentication, citizen ownership, and administrator access Self-issued demo JWTs; admin route checks role; status/mutation/evidence/deletion routes do not check identity or ownership Partial/demo only backend/app/auth.py; backend/app/main.py:282; backend/app/main.py:294
Agency directory Searchable official destinations 28 curated destinations with external official links Complete for demo frontend/src/data/agencies.ts
Plugin framework Manifest-owned schemas and submit/status/escalate contract; extensible agency modules Eight registered plugins: FCC mock/network mock plus seven deterministic local simulators Complete framework demo; no production connector backend/app/plugins/base.py; backend/app/plugins/registry.py
FCC integration Initial FCC complaint connector Local simulation or repository-owned mock HTTP service only Partial/demo only backend/app/plugins/fcc_plugin.py:73; infra/mock_fcc/app.py
Additional agencies Modular onboarding toward 50+ agencies Seven non-FCC simulations; remaining agencies are directory links only Documented-only/missing for production backend/app/plugins/mock_agencies.py; docs/BRD_TRD.md:16
Async processing Redis/Celery submission, retry, polling, escalation, and notification Submission and exponential retry execute; polling and escalation jobs only count candidates; email always targets a fixed demo recipient Partial/stubbed backend/app/tasks.py:44; backend/app/tasks.py:102; backend/app/tasks.py:113; backend/app/tasks.py:124
Source-of-truth database PostgreSQL with migrations and audit trail Postgres in Compose, SQLite fallback, SQLAlchemy models, and one Alembic migration; two stale SQL schemas remain Partial; demo persistence works backend/app/db.py; backend/alembic/versions/0001_postgres_source_of_truth.py; backend/schema.sql
Audit trail Append-only state-transition events Application code appends events, but database immutability and actor/access auditing are not enforced Partial backend/app/db.py:50; backend/app/db.py:277
Evidence Attachment handling, malware scanning, retention Up to 5 MB stored in the database; EICAR string check; retention timestamp recorded but no purge job Partial/stubbed backend/app/main.py:337; backend/app/db.py:62
KYC Risk-based identity verification Metadata and a response-only demo_stub endpoint Documented-only/stubbed backend/app/main.py:381; docs/KYC_LITE.md
Data governance Encryption, configurable retention, deletion, legal hold, access logging Local deletion exists; no managed encryption, retention enforcement, legal hold workflow, export, or access log Partial with major gaps docs/DATA_GOVERNANCE.md; backend/app/db.py:241
Observability JSON logs, Prometheus, OTel, Grafana, alerting Application JSON logger, bounded metrics, API/SQL traces, local Prometheus/Grafana, OTel debug exporter Partial; no production sink, alerts, or full service telemetry backend/app/logging_config.py; backend/app/metrics.py; infra/otel-collector.yml
Health management Liveness/readiness probes for critical components /health, /health/live, /health/ready; readiness checks only the database Partial backend/app/main.py:123; infra/docker-compose.yml:45
Accessibility and localization WCAG 2.1 AA plus English and Spanish Semantic UI, visible focus/reduced-motion styling, limited axe and keyboard smoke coverage; English strings are hard-coded Partial; Spanish and independent audit missing docs/ACCESSIBILITY.md; frontend/src/App.test.tsx; frontend/e2e/demo-smoke.spec.ts
Local topology Reverse proxy, application, Postgres, Redis, worker/scheduler, mock agency, telemetry, and mail capture One Compose file provisions those services and persistent volumes Complete for demo; not production-parity infra/docker-compose.yml
Cloud topology Kubernetes or equivalent, managed data, networking, TLS, secrets, HA No cloud target decision, IaC, deployment manifests, or secret-store integration Documented-only/missing docs/SYSTEM_ARCHITECTURE.md:37; repository inventory
CI PR lint, type, tests, coverage, build, E2E, dependency audit, docs, Compose validation GitHub Actions performs these checks; E2E mocks authentication/API and packaging only parses Compose Partial .github/workflows/ci.yml; frontend/e2e/demo-smoke.spec.ts
CD and release Registry publication, migrations, staged zero-downtime deployment, smoke tests, rollback No image publication, signing, staging/prod deployment, migration job, or rollback automation Missing .github/workflows/; repository inventory

Current technology stack

Layer Implemented technology/version Notes
Frontend React 19.2.8, TypeScript 6.0.3, Vite 8.2.2, React Router 7.18.2 Node >=24; CI uses Node 24; image builder uses Node 26
Edge/runtime nginx 1.31-alpine SPA, same-origin /api reverse proxy, security headers; runtime Dockerfile does not declare a non-root user
API Python 3.14, FastAPI 0.141.1, Uvicorn 0.52.4, Pydantic 2.13.4 Synchronous SQLAlchemy access inside FastAPI handlers
Data PostgreSQL 18.3-alpine; SQLAlchemy 2.0.48; psycopg 3.3.3; Alembic 1.18.4 SQLite fallback for focused local tests/development
Async Redis 8.6-alpine, Celery 5.6.2 Redis is broker and result backend
Observability prometheus-client 0.26.0, OpenTelemetry 1.40.0, Prometheus 3.10.0, Grafana 12.4.1, Collector 0.148.0 Local-only debug trace export
Test/tooling pytest 9.1.1, Ruff 0.16.4, mypy 1.19.1, Vitest 4.1.11, Playwright 1.62.1, jest-axe 11.0.0 Backend coverage threshold is 90%
Documentation MkDocs 1.6.1 Strict build configured

Environment and delivery baseline

Area Present Production-parity assessment
Environment template Root .env.example Incomplete schema; no type/range validation or fail-fast production profile
Containers Backend, frontend, and mock-FCC Dockerfiles Backend/mock run non-root but are single-stage; frontend build is multi-stage but runtime user is not declared; images are tag-pinned, not digest-pinned
Compose infra/docker-compose.yml Good demo topology and health ordering; static credentials, public host ports, no explicit isolation profiles, resource limits, read-only filesystems, or production override
Persistence Named Postgres, Redis, Prometheus, Grafana volumes No backup, restore, encryption, or recovery automation
CI .github/workflows/ci.yml PR checks exist; no SAST, secret scan, image build/scan, Postgres/Redis integration suite, SBOM, provenance, or deployment gate
Dependency updates Dependabot for npm, pip, Actions, and selected Docker paths Current locks still fail live npm and Python advisory scans
IaC None Cloud architecture and local/cloud parity cannot be validated

API inventory and protection state

API group Routes State
System GET /health, /health/live, /health/ready, /metrics Implemented; readiness is DB-only; metrics are unauthenticated
Plugin catalog GET /api/plugins, /api/plugins/{agency}/schema Implemented for eight demo plugins
Demo identity GET /api/auth/demo-users, POST /api/auth/demo/{role} Implemented and enabled by default unless explicitly disabled
Complaints create, list, status, retry, escalate, delete Implemented; only list filtering and admin operations use token context; object-level authorization is absent
Evidence POST /api/complaints/{tracking_id}/evidence Implemented demo storage/scanner; no owner authorization
KYC GET /api/kyc/check/{agency} Response-only stub
Administration GET /api/admin/operations Demo admin role enforced in code, but OpenAPI declares no security scheme

Documentation reconciliation

Documented claim Verified reality Required disposition
VISION.md says “FCC live,” “IRS started,” “Grafana Cloud integrated,” and “MVP stack complete” All agency submissions are simulated; traces terminate at a local debug exporter Correct before any stakeholder or production use
AGENCY_PLUGIN_GUIDE.md describes matches()/forward(), complaints.py, PLUGIN_INSTANCES, and test_plugin_registry.py Runtime contract is async submit()/status()/escalate() plus a manifest; referenced files do not exist Rewrite against the registry implementation
SYSTEM_ARCHITECTURE.md lists GraphQL, Next.js, per-plugin containers, Kubernetes, encryption, access controls, and retention as components These are absent or only future boundaries Mark as target-state or remove unapproved requirements
ACCESSIBILITY.md requires Spanish and no hard-coded English Current application is English-only with hard-coded strings Retain as a production gap; do not claim compliance
DATA_GOVERNANCE.md says scheduled purge jobs enforce retention No purge task exists Correct claim and implement before real data
HANDOFF.md says GitHub Actions intentionally run only after merge or manually Workflow now runs on pull requests to main Correct the handoff

Phase 0 verification record

Gate Result on 2026-11-24
git fetch origin main and SHA comparison Pass; local main equals origin/main
Ruff and format check Pass
mypy Pass; 18 source files
pytest and coverage Pass; 34 tests, 94.42%
ESLint, Vitest, TypeScript/Vite build Pass; 7 tests
Playwright smoke Pass; 2 tests, but API/auth are mocked and only Chromium desktop is exercised
docker compose ... config --quiet Pass
mkdocs build --strict Pass
npm audit --audit-level=high Fail; 16 advisories, 5 high
pip-audit -r backend/requirements.txt Fail; 17 advisories across PyJWT and OpenTelemetry API
Remote Docker engine Pass on hamlet-server (10.168.1.215): Docker 29.10.0, Compose 5.7.2, 800 GB free on Docker storage
Custom image build Pass for frontend, backend, worker, scheduler, seed, and mock FCC images from the audited commit
Core container topology Pass: frontend, backend, Postgres, Redis, worker, scheduler, mock FCC, MailHog, and OTel Collector healthy; seed exited 0 after creating eight cases
Containerized workflow Pass: nginx proxy -> FastAPI -> Postgres -> Redis/Celery -> mock FCC transitioned a synthetic case from received to submitted, wrote three events, and captured one email
Prometheus/Grafana Pass with a temporary 19090:9090 Prometheus host-port override; API and Prometheus scrape targets were up and Grafana 12.4.1 reported a healthy database
Unmodified full Compose topology on hamlet-server Fail: host TCP 9090 is already occupied; fixed Compose host ports prevent a clean unmodified start on this shared Docker host

Phase 0 establishes a reliable audit baseline. It does not establish a production-ready runtime.