A control you can point to on Tuesday is worthless if a Thursday commit quietly removes it. This page is about the discipline that keeps the compliance claims true as the code changes — the engineering rigor a fractional CTO brings to a regulated environment.
For the compliance reviewer
It’s “how do I know the audit chain is still there, still keyed, still covering every table, after six months of feature work by people I’ll never meet?” Screenshots and a feature list can’t answer that. Executable, count-agnostic discipline can. Email Triage is a working reference implementation of that discipline — the same posture I bring when a research program retains me to own its technology.
The through-line: evidence, not adjectives. Every claim on the Privacy page is backed by a build-time gate, a re-verified finding, a signed review, or a registered incident — not by a promise. What follows is where those come from.
1 · Structural pins
Every recurring defect class is answered in two moves: collapse the scattered sites onto a single source of truth, then add a structural pin — an ast.walk / repo-wide test that enforces the invariant across the whole tree. The pin is deliberately count-agnostic: it asserts “every match must have property P,” not “we expect exactly seven sites.” So the next hand-rolled eighth site — the one a human reviewer would skim past — fails CI the moment it lands, from anywhere in the codebase.
| Pin guards… | Class |
|---|---|
No raw INSERT into a chained audit table outside the one _chain_insert writer — a stray insert would fork the HMAC chain. | audit-chain |
| Every PHI→LLM egress site sits inside a function that references an allowed HIPAA control (or an explicit allow-list). | hipaa-gate |
Every outbound HTTP / SMTP / IMAP / DNS client is built through the egress funnel with a declared intent — raw httpx / smtplib / urllib is banned. | egress |
| Every credential write routes through the never-clobber-on-blank secret-write SSOT — browser autofill can’t zero a stored token. | secret-handling |
Every sqlite3.connect in the source tree goes through the encryption-aware opener — no path can open the DB unencrypted. | db-safety |
The taxonomy spans secret-handling, audit-chain, egress, hipaa-gate, db-safety, view-render, ssot-consolidation, route-coverage, and meta-pin. And the pins are themselves censused: a meta-pin fails the build if a pin walks the tree the wrong way. A pin over the pins isn’t paranoia — a control that can silently rot is not a control.
2 · Verify, don’t accept
External audit reports, structured expert-style reviews, and the project’s own automated census output are never filed as defects on their word. Every cited file:line is re-opened at the current HEAD and assigned one of seven canonical labels:
VERIFIED · STALE · REFUTED · DOWNGRADED · UPGRADED · PARTIAL · DUPLICATE.
The report’s claim is the question; the answer is what the code says today. Empirically about half of findings reshape after that check — a claim that read as critical turns out already-fixed (STALE), or a low note turns out to hide a real gap (UPGRADED). Acting on an unverified finding is how teams “fix” things that were never broken and miss the ones that were.
3 · The review gate
main unreviewed.Any change whose diff touches a medical-scope surface — PHI/HIPAA logic, the audit chain, encryption, auth, egress, LLM prompts, schema/migrations — is blocked from main unless the commit carries a valid review verdict. The gate is enforced twice: once client-side in the commit flow, once server-side in CI, so a bypass has to defeat both. It applies three independent review lenses — distinct evaluative perspectives built into the process, not a staffed committee. In a solo practice they are largely structured AI personas, each held to its own brief, plus the operator’s hardware-key sign-off:
Regulatory framing — the correct §-anchor, OCR-posture severity, and equivalent-measure verdicts under §164.306(d). Owns the §164.316 safeguards register.
Data integrity, performance, reliability, and test soundness. Owns the verify-don’t-accept walks — re-checking every external claim against the live code.
A standing skeptic that hedge-checks the lead recommendation against the “take the easier path” bias before it reaches a decision — on every trade-off.
Evidence-or-block. The one way to override the gate is not a plaintext note — a plaintext escape hatch was proven forgeable and closed the same day. An override now requires a signature from the operator’s hardware security key, binding the exact finding and file paths, with a physical touch required on the key. The trust root is the signature, verified server-side against a pinned signer list — not anything a rebase or a stealth edit could fake.
4 · The paper trail
Whether a finding is opened by an outside auditor, an automated census, the review panel, or a live incident, it lands on one register keyed to §164.316(b)(1) — ID, title, §-anchor, severity, status, opened/closed, owner, and a rationale link. Every status transition emits an HMAC-chained audit row, and the register is retained for the full §164.316(b)(2)(i) six years in-tree and in git history — and in off-host backup where the operator enables it (off-host backup ships disabled). No closed row is ever silently dropped.
The register records what was found. This is the “how does that not happen again” answer — each real production failure paired with the count-agnostic pin that now fails the build if the shape ever recurs:
Each incident bought a permanent, tree-wide guarantee — not a note in a wiki that the next hire never reads.
Honest scope
This is engineering discipline aligned to the cited rules — not a certification, and not legal advice. It does not by itself make an organization HIPAA- or 21 CFR Part 11–compliant; compliance is a program an organization owns, with its own policies, vendor agreements, validation, and attestations. What the discipline above does give you is something most vendors’ compliance decks can’t: a way to check the claims yourself, in public source, and a build that refuses to let them quietly decay. Confirm applicability with your own compliance counsel.
Beyond Email
Email Triage is one working proof of a posture — count-agnostic controls, verify-don’t-accept audit hygiene, evidence-bound review gates, sovereign-by-default AI. It’s the same rigor I bring as a fractional CTO to research programs and regulated teams who need technology leadership they can defend to an auditor, a PI, and a board. If that’s the gap you’re staring at, let’s talk.