Modular candidate vs production
Package syntology/ is an additive modular kernel described in
UPGRADE_CANDIDATE.md (present on fresher local trees; may not yet be on
origin/main). It does not replace production until promotion gates pass.
Why
Collapses duplicated concerns: env loading, Neo4j tiers, drivers, corpus paths, ingest chain table, template registry, Bedrock/S2 clients, job registration, QC suite table.
Commands (when package present)
./venv/bin/python3 -m syntology doctor
./venv/bin/python3 -m syntology qc
./venv/bin/python3 -m syntology parity # + --live
./venv/bin/python3 -m syntology census
./venv/bin/python3 -m syntology chain
Design rules
- Additive — legacy path keeps working.
- Single source — re-export existing ONE-way modules (
provenance,bedrock_client,write_ledger, …); parity asserts object identity. - Registries over scatter.
- Parity before promotion.
- Fail loud — no silent writer→reader fallback.
Production vs candidate
| Concern | Production today | Candidate |
|---|---|---|
| ASGI entry | main:app | syntology.serving.app:create_app(legacy=True) then carve routes |
| Index on request | ensure_indexes risk (F-06) | assert-only |
| Corpus paths | many literals | corpus.locate() |
| Ingest definition | inline in 06 | stages.INGEST_CHAIN (+ tripwire vs 06) |
Promotion is one caller at a time; see UPGRADE_CANDIDATE §5 worklist.