# Source summary — Audit Chain Integrity

Provenance trail for every artifact in this package. Internal repository paths establish provenance
for review; they are not themselves public links.

| Published artifact | Derived from (internal source) | Sanitization |
| --- | --- | --- |
| `artifacts/audit-chain-integrity-standard.md` | `docs/OPERATING_STANDARDS.md § Audit Chain Integrity Discipline (canonical)` | none required (fleet doctrine); abridged for length |
| `artifacts/payload-boundary.sql` | `system/core/scripts/002_audit_events.sql` (v_payload construction, ~L529) | none required (framework scaffold SQL) |
| `artifacts/c49-contract.md` | `system/caliber/lib/c49-audit-chain-integrity.mjs` (header) | none required (scanner logic) |
| `artifacts/c49-fixture-matrix.md` | `system/caliber/lib/__fixtures__/c49/{pass,fail,warn,grandfather}/` | none required (synthetic fixtures) |

## Chain of causation (from the incident to the control)

1. **2026-05-01** — Phase F sandbox e2e of the CrewOS Payment Plan Scheduler ran the audit-chain
   verifier against the `foundryos-test` sandbox → 20 mismatches + 1,142 broken_links.
2. Investigation traced the finding to migration `20260507c`, which had retroactively `UPDATE`d
   `entity_label_snapshot` and `actor_label` on historical rows.
3. Those two columns are outside the hashed payload (`payload-boundary.sql`) → chain integrity was
   intact; the real defect was the *indistinguishability* of an authorized scrub from a mutation.
4. Codified: originally in `apps/crewos/docs/GOTCHAS.md` (commit `877ee79`), promoted to the fleet-wide
   **Audit Chain Integrity Discipline** operating standard on 2026-05-01.
5. Made mechanical: Caliber **C49** scanner + fixtures across allowed / forbidden / warned /
   grandfathered cases; the `20260507c` migration is named on the grandfather allowlist.

## Internal-only companions (not published here)

- The raw `20260507c` migration SQL — `apps/crewos` submodule history (`514dba68:supabase/migrations/`).
- The verifier run log producing 20 / 1,142 — internal governance docs
  (`docs/OPERATING_STANDARDS.md` provenance line; `system/_operator/sessions/2026-05-01-audit-chain-integrity-fleet-promotion.md`).

**Reviewer:** FoundryOS operator · **Review date:** 2026-08-02
