Evidence platform and governance
Document
ADR-0004: The public/private boundary
- Repository path
- docs/decisions/ADR-0004-public-private-boundary.md
- Size · SHA-256
- 1.3 KB · 96f1d14e49ba9a558eefd49751592da12576415d04ea784f096fd0bbb00ea98d
Status: accepted (2026-09-06); amended by ADR-0065 (2026-11-14), which publishes the research record and narrows the browser-facing path rule from mentions to links
Context
apps/web must be physically unable to ship INTERNAL/RESTRICTED/CONFIDENTIAL material, and the guarantee must not rest on developer discipline.
Decision
Four cooperating mechanisms (full analysis in docs/architecture/THREAT_MODEL.md):
- Classification-by-directory: records declare a classification AND inherit one from their store directory; the loader fails on disagreement.
- Scoped loading + projection: only
@lithoen/projectionis importable for data from apps/web; it loads public directories only, throws on projecting anything not PUBLIC+PUBLISHED, and builds DTOs by explicit allow-lists. - Static gates: a deterministic import scanner (plus mirrored ESLint rules) rejects forbidden imports and non-public path strings in web code.
- Canary leakage scan: synthetic canaries in every non-public store; all build output scanned after every build. All four are covered by RED/GREEN mutation tests.
Consequences
- Public leakage requires four independent failures, each individually tested.
- Adding a non-public store obliges: directory mapping, canary exemplar, test extension.