Appearance
Regulatory data on disk (data/regulatory and cousins)
Status: October 2026 (slices 30–34).
Locus keeps legal text and evidence in three places that must not be confused:
| Location | Owner | Purpose |
|---|---|---|
data/regulatory/fixtures/ (repo root) | Engineering / CI | Tiny synthetic PDFs + manifest.json to exercise the platform legal vault pipeline without shipping official gazettes |
| Postgres + R2 (or local vault dir) | Platform ops (locus-ops) | Production instrument / edition / provision / artifact system of record — real PDFs after human review |
locus-web/data/regulatory/ | Dev / analysis engines | Legacy parsed JSON / SQLite corpus used by catalog.ts and retrieval until vault provisions are legal_reviewed |
Tenant deal-room PDFs (term sheets, SYSCOHADA packs) live under the tenant document vault (R2), not under data/regulatory/.
1. data/regulatory/fixtures/ (what the PDFs are for)
Purpose
These PDFs are CI and local-dev stand-ins for foundational CEMAC instruments that LegalVaultBootstrap creates as stub editions (e.g. cosumaf-rg-2014__edition_bootstrap). They exist so that:
- Artifact register / SHA-256 / PdfPig extract / review → publish can be tested without copyrighted full gazettes in the repo.
scripts/attach-vault-fixtures.shcan attach each file to its bootstrap edition viaPOST /api/admin/regulatory/editions/{editionId}/artifact(PLATFORM_OPERATOR session).- Contract tests (
locus-ops/tests/legal_vault_amendments_applicability_fixtures.test.ts) can assert unique SHA-256 values and a complete instrument list.
They are not the production legal corpus. Digests in manifest.json must never be presented as official source fingerprints.
Contents
| File | Bootstrap edition | Authority |
|---|---|---|
syscohada-audcif-2017.pdf | syscohada-audcif-2017__edition_bootstrap | OHADA |
ohada-aus-2010.pdf | ohada-aus-2010__edition_bootstrap | OHADA |
cosumaf-rg-2014.pdf | cosumaf-rg-2014__edition_bootstrap | COSUMAF |
cosumaf-inst-ape-2019.pdf | cosumaf-inst-ape-2019__edition_bootstrap | COSUMAF |
beac-reg-changes-2018.pdf | beac-reg-changes-2018__edition_bootstrap | BEAC |
cobac-r-2016-01.pdf | cobac-r-2016-01__edition_bootstrap | COBAC |
manifest.json | — | Maps instrument → edition → fixture → SHA-256 |
Regenerate deterministically:
bash
python3 scripts/generate-regulatory-fixtures.pyHow the PDFs are used (pipeline)
text
generate-regulatory-fixtures.py
│
▼
data/regulatory/fixtures/*.pdf + manifest.json
│
│ attach-vault-fixtures.sh (or locus-ops "Upload PDF")
▼
SoR LegalSourceArtifacts (storageKey = local:<abs path> or R2 key)
│
├── LegalVaultDocumentExtractor (pages, preview, candidate articles)
├── LegalReviewItem → human APPROVE
└── LegalVaultPublisher → edition legal_reviewed / in_force
│
▼
Tenant analyzeDealWithVault → resolve edition/provision/artifact
→ open-statute BFF streams PDF (hash-verified)
→ DossierRegulatoryFindings stores vault IDsStaging / production: attach official PDFs in locus-ops Legal Vault (Upload PDF per edition), then approve in the Review Queue. Do not rely on fixture digests in production.
Local attach (dev):
bash
export LOCUS_SESSION_TOKEN=… # PLATFORM_OPERATOR session
export LOCUS_ORG_ID=… # that session's org id
# optional: DRY_RUN=1
./scripts/attach-vault-fixtures.shThe SoR must be able to read local: paths (same machine as the API). For R2-backed deploys, use the ops UI upload instead.
2. locus-web/data/regulatory/ (engine corpus, not vault)
| Path | Role |
|---|---|
parsed/ | JSON article chunks for retrieval / curation stats |
regulations/, manifests/, checklists/ | Supporting regulatory engine assets |
cosumaf_legal_kb.sqlite | Local COSUMAF knowledge base used by some auditor paths |
sample_drafts/, approved_precedents/ | Sample texts for tooling — not tenant data |
catalog.ts still holds stable instrument IDs and evaluation predicates; article bodies gradually move to SoR provisions after ops legal review. Bank UI analyzeDeal can run without vault PDFs; analyzeDealWithVault overlays vault IDs when the session can resolve them.
3. What is not in data/regulatory
- Tenant deal-room uploads (R2 +
Documentstable) - Market bulletins (market ingest →
MarketBulletins/ observations) - Live Watchtower downloads (stored under
LEGAL_VAULT_STORAGE_PATHor R2 asLegalSourceArtifacts)
Related docs
- Bank workspace screens:
workspace-guide.md - Ops app:
../locus-ops/README.md - Tracker R5/R7:
../IMPLEMENTATION_TRACKER.md - OCR override SOP:
ocr-override-sop.md