Skip to content

Decision ADR 0004 Registry Lives In The Topic Repo

Chris Dare edited this page Nov 15, 2026 · 2 revisions

ADR-0004 — The statement registry lives in the topic repo

Superseded on 2026-11-15. The arXMCP–Lean contract this record belongs to was retired: derived-alg-geo-lean#1906 removed MathFormalContract, mfc, the registry and the attestation records, and arXMCP#547 removed arXMCP's side. Kept as history.

Context

The registry — the set of durable statement keys, their verbatim quotes, their dependency edges, and their assumption frontiers — has to live somewhere. The name "registry" and arXMCP's R5 brief both pull toward arXMCP. Three facts pull the other way.

arXMCP has no place to put it. A notebook is a row in var/arxmcp/cache/notebooks.db plus a directory under var/arxmcp/notebooks/, joined by a slug string. There is no NotebookSpec type and no notebook.yaml — grep returns nothing for either. There are no extension points: no plugins, no hooks, no entry_points. And arXMCP/.gitignore:31 is /var/, so anything written there is permanently untracked.

Putting it in arXMCP makes every adopter a committer. If the registry is a tracked file in the shared server repo, adopter #2 needs commit rights or a fork, for data that is entirely about their topic.

arXMCP's own brief forbids it. R5 says the registry "only pins releases" and that formalization programs live in "independent Lean projects."

Against all that: the registry is the formalization plan. Its frontier[] entries are the assumption debts; its kind: obligation entries are the work queue. It must be versioned with the proofs it plans, or a review can carry forward across a statement change.

Decision

registry/<work-slug>.yaml is tracked in the topic repo, alongside the Lean source it plans. arXMCP holds no registry — it holds a pin to a released one (notebooks.db v6 formal_releases table) and re-serves its records verbatim.

arXMCP may downgrade an axis from its own fresher resolution. It has no code path that raises one. This asymmetry is the whole permission model: the consumer can say "this got worse since you published it" and can never say "this is better than you claimed."

Consequences

Good. The registry is versioned with the proofs. An adopter needs no permissions on anyone else's repo. arXMCP acquires no formalization-hosting role, so §4.8 and R5 both hold without amendment.

Cost — the work queue has no mechanism yet (red team, gap 6). The architecture relies on "a registry entry of kind: obligation with decls: [] that appears in the work queue," but no work queue is among the seven contract artifacts, and decls is not a field of the registry schema. The fix is not to add decls — that would duplicate the binding @[cites] already owns and create two writers. It is to add an eighth artifact, attest/workqueue.json, generated by mfc join as every registry entry with zero inbound @[cites], partitioned by kind, with frontier rolled up. That file is the one thing in this design with a real chance of getting an LLM to use it.

Cost — revocation has no channel (red team, gap 5). If v0.1.0 is pinned and v0.2.0 marks an entry inadequate, arXMCP keeps serving the old record until a human re-pins, and nothing tells them to. Fix: a producer-side, append-only withdrawals.yaml, which formal_release_pin.py fetches from the newest tag even when pinned to an older one. It is the single channel permitted to travel forward in time, because it can only remove trust.

Rejected alternative. The "Cairn" design (12.5/26) put the statement graph at the centre and got this decision right — it is where the reasoning above comes from. What killed it standing alone: its type_digest hashed only type_pp, so editing the body of abbrev NumLattice : Type := Fin 2 → ℤ leaves every dependent theorem's digest byte-identical and carries an old human review across a meaning change. That is the exact hole CLAUDE.md §3 exists to protect, landing in the exact file §3 names.


Exported from .claude/decisions/ADR-0004-registry-lives-in-the-topic-repo.md at the commit that removed it from the tree.

Home

Architecture

CI and runners

Decision records

Roadmaps

Clone this wiki locally