ValiFit Constitutional Charter
Public Bias Audit (Stream-Only)
The principle
Every quarter, ValiFit runs the same statistical bias audit any regulator would run — composite scores correlated against Census ACS protected-class indicators — but we never store the protected-class data. We pull it fresh from the public Census API at audit time, compute correlations in memory, persist only the result matrix, and discard the raw data.
The commitment
Two non-negotiable rules govern this charter: (1) we self-audit at the same scale any regulator or fair-housing organization would audit us — internal bias audit is not optional; (2) we NEVER persist protected-class data. Storing race/ethnicity/familial-status/disability indicators creates a target that contradicts our FHA-safe posture and creates subpoena + breach exposure. The reconciling pattern: stream-only audit. At audit time, /api/cron/bias-audit fetches the relevant ACS tables (B02001 race, B03003 Hispanic, B01001 sex/age, B18101 disability) directly from api.census.gov over HTTPS, joins them in memory to our composite scores from municipalities_canonical, computes Pearson + Spearman correlations, and writes ONLY the resulting numerical matrix to valifit.bias_audits. The raw ACS data is discarded when the request handler exits. The persisted record is aggregate statistics, not protected-class records. This is the same compliance pattern HMDA examiners use: pull public data, run analysis, retain only the analytical result.
Why this matters
Storing protected-class data is a target. We refuse to be one. But shipping product without internal bias monitoring is regulatory negligence — the static-scan tests prevent BAD code, they don't prove the resulting math is GOOD. Stream-processing the audit at run time gives us both: full internal audit on the regulator's standard (Pearson |r| > 0.30 threshold per HUD AI/ML guidance), zero persistent storage of protected-class indicators. The audit results are public and the methodology is published so any external auditor can replicate using the same Census API.
How we enforce
Quarterly cron at /api/cron/bias-audit (vercel.json schedule) fetches Census ACS data fresh from api.census.gov, joins to our composite scores from municipalities_canonical, computes Pearson + Spearman correlations, persists ONLY the correlation matrix to valifit.bias_audits. Raw ACS data is held only in request memory and discarded on handler exit. /trust/bias-audit publishes the latest matrix + Schema.org Dataset for external replication. __tests__/fha-compliance.test.ts (Phase 6.A) verifies no scoring path imports any persistent protected-class column.
Aligns with
- HUD Disparate Impact Standard (24 CFR 100.500)
- CFPB HMDA Examination Procedures
- NIST AI Risk Management Framework
- EU AI Act Art 27 (post-deployment monitoring)
- Fair Housing Act
Last reviewed and affirmed: 2026-05-08. The charter is versioned with the codebase — a Git history of changes to lib/charters.ts serves as the audit log.