Skip to content

Commit 91e9cf1

Browse files
docs(proof-story): amend with echo-types foundation per owner directive (#181)
## Summary Owner directive 2026-06-01: any proof work for boj-server must check `hyperpolymath/echo-types` first; if relevant use what's there, if not extend echo-types and prove down that path, then cross-document. This amendment to `docs/planning/boj-server-proof-story-2026-06-01.md` (PR #180) adds: - **section 2.5** — echo-types as cross-cutting type-theoretic foundation. Includes an invariant -> primitive mapping table (cartridge dispatch -> `EchoResidueTaxonomy` indexed; multi-protocol composition -> `EchoImageFactorizationProp`; credential isolation -> linear/affine + `EchoSecurity`; audit -> `EchoProvenance`; cost -> tropical + cost residue; effect tracking -> graded modality; class-J axioms -> generic Σ-cert; federation -> choreographic; adversary bounds -> epistemic) and an extension policy. - **per-wave echo-types module mapping** in section 4 (W1-W6), noting which extensions are likely required per wave (W1+W2 no extension expected; W3 likely needs borrow-and-return variant; W4 possible chain-composition lemma; W5 likely needs externally-validated residue form). - **section 6 D5** — echo-types extension governance decision point (instance ownership, pace constraint, reciprocal documentation cadence). - **section 9 provenance note** for the amendment. ## Why this matters Echo-types is the estate's constructive Agda formalisation of proof-relevant lossy computation (`--safe --without-K`, 0 postulates) and the foundation pack target of VeriSimDB's D1/D2/C7/N2 design. Bypassing it leads to duplicate type definitions and proof rot across the estate. The "drift = echo + tropical cost" composition is the single most natural fit for boj-server's anchor theorem `MultiProtocol.invokeChainSoundness`. ## Cross-document follow-up Once W1 (the first wave) lands its first echo-types import, a reciprocal amendment to `echo-types/EXPLAINME.adoc` should add boj-server to a downstream-consumers list. Tracked as part of W1's deliverables. ## Test plan - [x] Doc-only change, no code paths affected - [x] Local edit + signed commit + push verified - [x] Cross-references to existing echo-types modules verified against `echo-types/EXPLAINME.adoc` (2026-06-01 HEAD) - [x] No new claims about echo-types content that aren't in EXPLAINME 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d2a63e2 commit 91e9cf1

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

docs/planning/boj-server-proof-story-2026-06-01.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,53 @@ Each is a candidate "what could we prove that we currently just assume?"
8484
8585
---
8686

87+
## 2.5 Echo-types — cross-cutting type-theoretic foundation
88+
89+
**Owner directive 2026-06-01**: every proof wave below must first check `hyperpolymath/echo-types` for a reusable definition or lemma. If relevant, the wave consumes echo-types via a SHA-pinned import. If absent, the wave **extends echo-types first**, proves the extension there, and then consumes downstream. Cross-document: every consumer cites the echo-types module + commit; the echo-types module's `EXPLAINME.adoc` lists boj-server as a downstream consumer once the first wave imports it.
90+
91+
### Why echo-types is the right foundation
92+
93+
`echo-types` is the estate's constructive Agda formalisation of *proof-relevant lossy computation*`--safe --without-K`, 0 postulates. Its core abstractions map directly onto boj-server's proof obligations:
94+
95+
| boj-server invariant | echo-types primitive |
96+
|---|---|
97+
| Cartridge dispatch — distinct cartridges cannot collide on a message type | `EchoResidueTaxonomy` *indexed* residue form (proof-relevant distinguishability of dispatch keys) |
98+
| Multi-protocol composition — outputs of `Cᵢ` parse under input schema of `Cᵢ₊₁` | `EchoImageFactorizationProp` (epi-mono earn-back: the residue of the projection bears the witness that the next stage's precondition is satisfied) |
99+
| Credential isolation (BJ2) — a Teranga capability cannot leak across cartridges | Linear / affine bridge + `EchoSecurity` application module |
100+
| Audit log integrity (`local-coord-mcp`, MFA-001 to MFA-006) | `EchoProvenance` application module (hash-chain as echo: the digest is the residue that constrains the preimage) |
101+
| Cost / budget proofs (Glama scoring, panel cost-meters) | Tropical bridge + `EchoResidueTaxonomy` *cost* residue form |
102+
| Effect / capability tracking across L4–L8 boundaries | Graded modality bridge (loss-graded reindexing per `docs/retractions.adoc` R-2026-05-18) |
103+
| Class-J axiom witnesses (5 in `SafetyLemmas.idr`) | `EchoResidueTaxonomy` *generic Σ-cert* residue form |
104+
| Federated coord (ADR-0010) role-projection | Choreographic bridge |
105+
| Adversary-knowledge bounds | Epistemic bridge |
106+
107+
The drift = echo + tropical cost composition (per VeriSimDB foundation pack) is the single most natural fit for boj-server's anchor theorem.
108+
109+
### Status of echo-types at 2026-06-01
110+
111+
Per `echo-types/EXPLAINME.adoc` and `.machine_readable/6a2/STATE.a2ml`:
112+
113+
- Core echo / fiber theorems present (`echo-intro`, `map-over`, `map-over-id`, `map-over-comp`, `map-square`).
114+
- Bridges complete: linear, graded, tropical, choreographic, epistemic, CNO, Janus, Dyadic, Ordinal, Indexed, Relational, Categorical, Scope.
115+
- Eight residue forms in `EchoResidueTaxonomy` (trivial, identity, generic Σ-cert, linear-affine, indexed, cost, search, epistemic).
116+
- Investigation EI-2 (integration-recipe distinctness) terminated negatively via PATH B — **do not reopen**; treat as a settled negative result.
117+
- Ordinal/Buchholz track: 11 of 13 per-constructor rank-mono cases closed; Slice-3 headline closed via Route A in PR #142/#143.
118+
119+
This means W1 and W2 of boj-server's proof roadmap can be expressed *today* in echo-types vocabulary without extension. W3-W6 likely require small extensions — to be identified per wave as the work begins.
120+
121+
### Extension policy
122+
123+
When a wave needs a definition not in echo-types:
124+
125+
1. File the gap as an echo-types issue (`hyperpolymath/echo-types`), referencing the boj-server wave + theorem name.
126+
2. Land the extension in echo-types first (small, focused PR; passes `--safe --without-K`; no new postulates).
127+
3. SHA-pin the echo-types import in the boj-server proof PR.
128+
4. Echo-types `EXPLAINME.adoc` "Applied prototype hook" or downstream-consumers section lists boj-server.
129+
130+
This keeps echo-types as the proof-foundation single-source-of-truth and prevents duplicate type definitions drifting across the estate.
131+
132+
---
133+
87134
## 3. Competitive context — what the rest of the field claims
88135

89136
### The baseline
@@ -128,31 +175,37 @@ Agent D's plan, condensed. Each wave estimate is solo-with-Joshua at ~6-8 weeks
128175
- `local-coord-mcp` closes P-04/P-05/P-06/P-07 (record format, CRC truncation, replay-equivalence, quarantine state machine) — 6 days, infrastructure already present.
129176
- `007-mcp` policy-apply type-safety — ~1 day.
130177
- One domain cartridge (e.g., `dap-mcp` or `bsp-mcp`) protocol dispatch uniqueness lemma — ~1 day.
178+
- **Echo-types import**: `EchoResidueTaxonomy` *indexed* residue form (dispatch keys); `EchoProvenance` for replay-equivalence as hash-chain echo. **No extension expected** — both present at echo-types HEAD.
131179

132180
### W2 — Invocation protocol soundness + multi-protocol composition (Weeks 5-12, ~8 days)
133181
- `CartridgeDispatch.invokeSound` (direct-invoke preserves type) — 2 days.
134182
- **`MultiProtocol.invokeChainSoundness`** ← the anchor theorem (see §5) — 3 days.
135183
- `sseFrameIntegrity` — 1 day.
136184
- Aligns with typed-wasm Phase 2 (L2 access-site carrier, ADR-0003 accepted 2026-05-30) as a case-study consumer.
185+
- **Echo-types import**: `EchoImageFactorizationProp` (the anchor theorem statement *is* an epi-mono earn-back across cartridge boundaries); graded modality bridge for invocation-effect tracking. **No extension expected** — Tier 2 EchoImageFactorizationProp landed 2026-05-28.
137186

138187
### W3 — Capability containment + vault isolation (Weeks 13-18, ~5 days)
139188
- `VaultIsolation` upgrade to dynamic isolation (cartridges added post-init) — 2 days.
140189
- `CapabilityContainment.borrowCap` (capability temporary-borrow, not store-or-re-export) — 2 days.
141190
- `CredentialFlow.credentialCannotEscape` — 1 day.
191+
- **Echo-types import**: linear/affine bridge + `EchoSecurity` application module. **Likely extension**: capability *borrow-and-return* may need a new linear-affine variant in echo-types — file as echo-types issue, land extension first.
142192

143193
### W4 — End-to-end safety case (Weeks 19-24, ~10 days)
144194
- `SafetyCase.e2eInferenceSound` — the umbrella theorem composing W1-W3 lemmas — 5 days bookkeeping.
145195
- `CompositionLemma.multiCartridgeChain` — chain induction — 2 days.
146196
- `AdversarialModel` — negative lemmas (can't forge IDs, can't bypass isolation, can't corrupt dispatch) — 1 day.
197+
- **Echo-types import**: tropical bridge (cost composition under chain), `EchoProvenance` (audit trail across the chain), epistemic bridge (adversary knowledge bound). **Possible extension**: composition lemma for chained echo factorizations — likely covered by `map-over-comp` but may need a chain-specific lemma; file as echo-types issue if so.
147198

148199
### W5 — Backend-assurance expansion (Weeks 25-28, ~4 days)
149200
- Audit + externally validate any new class-J axioms introduced by new cartridges — 2 days.
150201
- **Harness mechanisation** — formalise the discipline itself in Coq or Agda: "a class-J axiom is valid iff (trusted-extraction doc + property test + BEAM evidence)" — 2 days.
202+
- **Echo-types import**: `EchoResidueTaxonomy` *generic Σ-cert* residue form — class-J axioms are precisely Σ-cert residues with external-evidence witnesses. **Extension expected**: a new residue form "*externally-validated*" or a refinement of generic Σ-cert with a backend-assurance side-condition. File as echo-types issue first.
151203

152204
### W6 — Publication + standoff (Weeks 29+, ~2 days/cartridge)
153205
- Technical report on the W4 e2e proof.
154206
- Ready 3-5 proof-bearing cartridges for production.
155207
- Establish proof-maintenance policy (within 2 weeks of any proof-bearing PR, a `docs/proof-summary.md` follow-up must cite which theorems cover which invariants).
208+
- **Echo-types cross-document**: by W6 each of W1-W5's downstream consumers should be listed in echo-types `EXPLAINME.adoc` under a new "downstream consumers" section. Publication framing: "boj-server is the first capability-gateway *consumer* of the echo-types foundation; echo-types is its proof bedrock."
156209

157210
### Top-3 quick wins (1.5-2 total days — front-load before W1)
158211

@@ -203,6 +256,12 @@ Solo + Joshua at 6-8 weeks proof per quarter ≈ 30 weeks of proof work over 18
203256
### D4 — proof-debt tracking discipline
204257
boj-server's `PROOF-NEEDS.md` and `docs/proof-debt.md` are already exemplary (Agent A says: estate reference for the Trusted-Base Reduction Policy). Question: do you want a **per-cartridge** `proof-summary.md` requirement (W6 policy), or just per-repo? Per-cartridge gives much higher resolution but is high-overhead.
205258

259+
### D5 — echo-types extension governance
260+
Per the §2.5 owner directive, when a wave needs an echo-types extension, the workflow is: file as echo-types issue → land extension there first → SHA-pin in downstream boj-server PR → cross-link in `EXPLAINME.adoc`. Open sub-questions:
261+
- **Repo of record for boj-server-specific instances** — when an `EchoResidueTaxonomy` instance is *only* boj-server-relevant (e.g. a "cartridge-tier-validated" instance), does it live in echo-types (estate-wide) or boj-server (local)? Recommend echo-types for any instance with a re-usable shape, boj-server for one-off.
262+
- **Pace** — echo-types extension PRs must pass `--safe --without-K` and add no postulates. This is strict; W3 + W5 extensions may need 1-2 extra days each.
263+
- **Reciprocal documentation** — at what cadence does echo-types' `EXPLAINME.adoc` get refreshed with the downstream-consumers list? Recommend at each wave-completion checkpoint.
264+
206265
---
207266

208267
## 7. Open questions
@@ -234,5 +293,6 @@ The catalogue document (PR #179) proposed a 5-phase rollout (tooling → backfil
234293
- 4 Explore subagents fanned out 2026-06-01 ~13:30Z; all returned within ~12 minutes (existing state), ~6 minutes (trust chain), ~13 minutes (competitor baseline), ~6 minutes (roadmap).
235294
- Owner-direct verification corrected Agent C's claim about `launch-scaffolder` being the cartridge minter's replacement (it is not — it's a desktop launcher generator). The minter is retired with no replacement, deepening the Q2 stub-rewrite scope from 3 tools to 4.
236295
- Subagent transcripts at `/tmp/claude-1000/-home-hyperpolymath-developer-repos/.../tasks/`.
296+
- **2026-06-01 amendment**: section 2.5 (echo-types foundation), per-wave echo-types module mapping in section 4, and section 6 D5 (echo-types extension governance) added per owner directive: "in the proofs you do, you need to check the echo-types repo and make sure this is part of the proofing for the repo, if not, establish the extension to what is there and work down that path proving as you go, then cross document". Echo-types module references sourced from `echo-types/EXPLAINME.adoc` at 2026-06-01 HEAD.
237297

238298
🤖 Generated with [Claude Code](https://claude.com/claude-code)

0 commit comments

Comments
 (0)