Skip to content

Commit b744433

Browse files
hyperpolymathclaude
andcommitted
feat(verisim-modular-experiment): Phase 4+5 closure — experiment closed
Path B confirmed. All 5 phases complete, 145/145 assertions green across 6 test suites. Phase 4 — KRLAdapter.jl dogfood (task 5): - examples/krladapter_integration.jl: TangleIR lifecycle through VerisimCore with empty federation manager. Demonstrates that a real client (tangles/knots) is satisfied by Core = {S,T,R} alone, no Federable peers required. - test/test_krladapter_integration.jl: 19 assertions covering adapter determinism, distinct octad ids, provenance tag propagation, end-to-end lifecycle, empty-manager sufficiency. Phase 5 — Findings + foldback (task 6): - docs/FINDINGS.adoc: consolidated Path B result, classification with TeX-definition grounding, 5-clause contract summary, two degradation routes (weight renormalisation vs absent-pair convention), adoption guide (when to use VerisimCore vs full octad), foldback tracking table, productisation recommendation (sibling verisim-core package). Updates: - 0-AI-MANIFEST.a2ml: rewritten in markdown format matching the A2ML convention used by sibling experiments (fixes panic-attack "extra tokens after manifest" warning). - STATE.a2ml: completion 100%, phases 4+5 marked complete, total assertions 145. - EXPLAINME.adoc, PLAN.adoc, PROOF-NEEDS.md, session log updated to reflect experiment closure. panic-attack assail scan: clean (0 critical, 0 high, 0 tainted paths, 0 cross-language vulns). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 240d8ca commit b744433

9 files changed

Lines changed: 640 additions & 58 deletions

File tree

verisim-modular-experiment/.machine_readable/6a2/STATE.a2ml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
(purpose "Research experiment: can any octad shape be entirely absent (store-level)
1111
without making VCL consonance claims unsound?")
1212
(type "research-prototype")
13-
(completion-percentage 78))
13+
(completion-percentage 100)
14+
(status-note "All 5 phases complete; experiment closed with positive result."))
1415

1516
(current-position
1617
(phase "phase-3-complete-seams-sorted")
@@ -41,9 +42,13 @@
4142
(federated-shape "vector")
4243
(deferred "ed25519" "multi-peer-noninterference" "vcl-parser"))
4344
(phase "phase-4-krladapter-dogfood"
44-
(status pending))
45+
(status complete)
46+
(decision-gate "passed")
47+
(result "KRLAdapter.jl client satisfied by Core alone — no Federable shapes required")
48+
(artefact "examples/krladapter_integration.jl" "test/test_krladapter_integration.jl"))
4549
(phase "phase-5-findings-writeup"
46-
(status pending)))
50+
(status complete)
51+
(artefact "docs/FINDINGS.adoc")))
4752

4853
(components
4954
(component "idris2-abi"
@@ -107,9 +112,13 @@
107112
(result "vcl-tests"
108113
(command "julia --project=. test/test_vcl.jl")
109114
(status pass)
110-
(assertions 32)))
115+
(assertions 32))
116+
(result "krladapter-dogfood-tests"
117+
(command "julia --project=. test/test_krladapter_integration.jl")
118+
(status pass)
119+
(assertions 19)))
111120

112-
(total-assertions 126)
121+
(total-assertions 145)
113122

114123
(foldback-to-main-verisimdb
115124
(applied
@@ -120,10 +129,11 @@
120129
(item "Normalizer regeneration stub-status doc update (documented in FOLDBACK.adoc)")))
121130

122131
(critical-next-actions
123-
(action "Phase 4 dogfood: wire KRLAdapter.jl against VerisimCore+FederationManager")
124-
(action "Phase 5 writeup: document findings, adoption guide, foldback to main verisimdb")
125-
(action "Optional: add Tensor and Spatial Federable peers for 4-peer parity coverage")
126-
(action "Optional: Zig FFI port of VerisimCore for production readiness"))
132+
(action "Experiment closed — Path B confirmed. No immediate actions.")
133+
(future-action "Promote impl/ to shippable verisim-core package if/when scheduling allows")
134+
(future-action "Zig FFI port of VerisimCore per hyperpolymath standard")
135+
(future-action "Formal Idris2-type-level non-interference proof at arbitrary N")
136+
(future-action "Runtime IsFederable validation in main verisimdb peer registration"))
127137

128138
(session-history
129139
(session "2026-04-05"
Lines changed: 103 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,104 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
2-
# 0-AI-MANIFEST.a2ml — verisim-modular-experiment
3-
# Universal entry point for AI agents (Claude, Gemini, OpenAI, etc.)
4-
5-
repository:
6-
name: verisim-modular-experiment
7-
status: experimental
8-
purpose: |
9-
Research experiment asking whether VeriSimDB's octad can be decomposed
10-
into a slim identity core + federation contract protocol without
11-
weakening VCL's consonance guarantees. NOT a replacement for VeriSimDB.
12-
parent-monorepo: nextgen-databases
13-
siblings:
14-
- verisimdb (canonical, paved-road)
15-
- typeql-experimental (sibling experiment)
16-
17-
critical-invariants:
18-
- "Main verisimdb/ is read-only from this experiment's perspective."
19-
- "Do NOT weaken VCL's consonance guarantees in pursuit of modularity —
20-
either preserve them via federation contract, or document the
21-
degradation honestly."
22-
- "A negative result (octad is indivisible) is an acceptable outcome."
23-
- "Follow hyperpolymath standards: Idris2 ABI, Zig FFI, PMPL-1.0-or-later."
24-
25-
canonical-locations:
26-
design-docs: docs/
27-
spec: spec/
28-
proof-obligations: PROOF-NEEDS.md
29-
30-
lifecycle:
31-
on-enter:
32-
- Read README.adoc
33-
- Read docs/DESIGN-2026-04-05-core-and-federation.adoc
34-
- Read PROOF-NEEDS.md
35-
on-exit:
36-
- Update DESIGN log if conclusions changed
37-
- Update PROOF-NEEDS.md if obligations discharged or added
38-
39-
references:
40-
- memory: vcl-rename.md (user's modularity thought, 2026-04-05)
41-
- memory: feedback_verisimdb_policy.md (maximise-first philosophy)
42-
- conversation: 2026-04-05 Claude Code session
2+
# STOP - CRITICAL READING REQUIRED
3+
4+
**THIS FILE MUST BE READ FIRST BY ALL AI AGENTS**
5+
6+
## WHAT IS THIS?
7+
8+
This is the AI manifest for **verisim-modular-experiment** — a research
9+
experiment asking whether VeriSimDB's 8-shape octad can be split into a
10+
slim identity core plus a federation of optional shapes without breaking
11+
VCL consonance guarantees.
12+
13+
**NOT a replacement for main `verisimdb/`.** The canonical octad remains
14+
the paved-road deployment. This experiment is a falsifier that produced
15+
a positive result: the octad IS divisible.
16+
17+
## CURRENT STATUS (2026-04-05)
18+
19+
- **Experiment status**: CLOSED with positive result. All 5 phases complete.
20+
- **Path B**: runtime-confirmed. Core = {Semantic, Temporal, Provenance}.
21+
- **Tests**: 145/145 green across 6 Julia test suites.
22+
- **Idris2 ABI**: 3 modules typecheck clean in Idris2 0.8.0.
23+
- **Overall completion**: 100% (research prototype).
24+
25+
## KEY FINDING
26+
27+
The octad decomposes into:
28+
29+
- **Core** (3 shapes, store-level required): Semantic, Temporal, Provenance
30+
- **Federable** (4 shapes, can be absent at store level): Vector, Tensor, Document, Spatial
31+
- **Conditional** (1 shape): Graph — required iff cross-entity claims in scope
32+
33+
VCL consonance claims compose soundly across any federation of these
34+
shapes, via a 5-clause contract (weight renormalisation, drift-signal
35+
projection, Ed25519 attestation, coherence surface, LWW conflict resolution).
36+
37+
## CANONICAL LOCATIONS
38+
39+
### Machine-Readable Metadata: `.machine_readable/6a2/` ONLY
40+
41+
- `STATE.a2ml` — experiment state, phase status, completion percentage
42+
- `META.a2ml` — architecture decisions, development practices
43+
- `ECOSYSTEM.a2ml` — position in ecosystem, siblings, standards followed
44+
45+
### Idris2 ABI: `src/Abi/`
46+
47+
- `Types.idr` — 8-shape enum + Core/Federable/Conditional classification
48+
- `VerisimCore.idr` — identity-core ABI (enrich, attest, verify)
49+
- `FederationContract.idr` — 5-clause contract + IsFederable predicate
50+
51+
### Julia Reference Implementation: `impl/`
52+
53+
- `VerisimCore.jl` — Core store with Ed25519-signed enrichment
54+
- `FederationManager.jl` — renormalisation, aggregate_drift, peer registration
55+
- `Crypto.jl` — Ed25519 wrapper (libsodium via Sodium.jl)
56+
- `drift/Metrics.jl` — pairwise drift functions (d_SV, d_VD, d_SD)
57+
- `peers/VectorPeer.jl`, `peers/DocumentPeer.jl` — Federable peer impls
58+
- `vcl/{Query,Prover,Parser}.jl` — VCL subset AST + evaluator + parser
59+
60+
### Documentation: root + `docs/`
61+
62+
- `README.adoc`, `EXPLAINME.adoc` — entry points
63+
- `PLAN.adoc`, `PROOF-NEEDS.md` — research plan + obligations
64+
- `docs/FINDINGS.adoc` — Phase 5 consolidated findings
65+
- `docs/CORE-CANDIDATES.adoc` — Phase 1 closure test + resolved classification
66+
- `docs/OCTAD-SHAPES.adoc` — Phase 0 archaeology
67+
- `docs/SEAMS.adoc` — ABI↔impl seam audit
68+
- `docs/SHAPES.adoc` — central shape mapping (TeX ↔ Idris2 ↔ Julia)
69+
- `docs/FOLDBACK.adoc` — items folded back to main verisimdb
70+
- `spec/federation-contract.adoc` — 5-clause contract prose spec
71+
72+
## CRITICAL INVARIANTS
73+
74+
1. Main `verisimdb/` is read-only from this experiment's perspective.
75+
2. Core shapes (Semantic, Temporal, Provenance) **cannot** be federated.
76+
The Idris2 `IsFederable` predicate enforces this at compile time;
77+
`FederationManager.register_peer!` enforces it at runtime.
78+
3. All SCM-style metadata lives in `.machine_readable/6a2/` as A2ML.
79+
4. All original code carries `SPDX-License-Identifier: PMPL-1.0-or-later`.
80+
81+
## HOW TO RUN
82+
83+
```bash
84+
# Idris2 ABI
85+
idris2 --build verisim-modular-experiment.ipkg
86+
87+
# Julia test suites (6 files, 145 assertions)
88+
for f in test/*.jl; do julia --project=. $f; done
89+
```
90+
91+
## LIFECYCLE HOOKS
92+
93+
### on-enter (every session)
94+
95+
1. Read this manifest first.
96+
2. Read `.machine_readable/6a2/STATE.a2ml` for current status.
97+
3. Read `docs/FINDINGS.adoc` if asking "what did the experiment prove?".
98+
4. Read `PLAN.adoc` for phase structure and decision gates.
99+
100+
### on-exit
101+
102+
1. Update `.machine_readable/6a2/STATE.a2ml` if state changed.
103+
2. Write a session log to `docs/sessions/<date>-<topic>.adoc`.
104+
3. Commit frequently; push to `main` on nextgen-databases monorepo.

verisim-modular-experiment/EXPLAINME.adoc

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,20 @@ All three immediate follow-ups now complete:
122122
PROOF INTEGRITY, PROOF CONSISTENCY WITH DRIFT < θ (with OVER scope),
123123
PROOF FRESHNESS. 32 assertions.
124124

125-
Remaining:
125+
All 5 phases + 3 deferred items complete. **Experiment closed, Path B confirmed.**
126126

127-
* **Phase 4 dogfood** — wire `KRLAdapter.jl` against this VerisimCore.
128-
* **Phase 5 writeup** — findings document, adoption guide, main-verisimdb foldback.
129-
* **Optional Zig FFI port** — production readiness if Path B ships.
127+
* ✓ **Phase 4 dogfood** — `examples/krladapter_integration.jl` +
128+
`test/test_krladapter_integration.jl` (19 assertions). KRLAdapter.jl
129+
client satisfied by Core alone — no Federable peers required.
130+
* ✓ **Phase 5 findings** — `docs/FINDINGS.adoc` with classification,
131+
degradation routes, adoption guide, foldback tracking, and the
132+
productisation recommendation.
133+
134+
Open post-experiment work (not blocking):
135+
136+
* Promote `impl/` to shippable `verisim-core` sibling package.
137+
* Zig FFI port of VerisimCore per hyperpolymath standard.
138+
* Formal Idris2-type-level non-interference proof at arbitrary N.
130139

131140
== What if the result had been negative?
132141

verisim-modular-experiment/PLAN.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ can terminate the experiment with a positive or negative result. A
99
negative result (octad-is-indivisible) is an acceptable outcome and
1010
strengthens the main verisimdb documentation.
1111

12+
*Outcome (2026-04-05):* **experiment closed with positive result.** All
13+
5 phases complete. Path B confirmed: the octad is divisible,
14+
`Core = {Semantic, Temporal, Provenance}` suffices, 145 assertions
15+
green across 6 test suites. See `docs/FINDINGS.adoc`.
16+
1217
*Cadence:* light. User has many other active projects. Run in background
1318
between higher-priority work. No ship deadline.
1419

verisim-modular-experiment/PROOF-NEEDS.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,25 @@ next Phase 3 follow-up.
6868

6969
## Remaining obligations
7070

71-
- [ ] Non-interference with N ≥ 2 simultaneous Federable peers.
72-
- [ ] Formal (Idris2 type-level) proof of non-interference. Currently
73-
discharged at runtime only.
74-
- [ ] Byzantine-peer resistance (requires real Ed25519, not placeholder).
71+
- [x] Non-interference with N ≥ 2 simultaneous Federable peers.
72+
**DISCHARGED runtime:** `test_noninterference.jl` (15 assertions)
73+
with Vector + Document peers. Independent keypairs, isolated LWW
74+
writes, 3-way parity over (S,V)/(S,D)/(V,D).
75+
- [x] Byzantine-peer resistance baseline — real Ed25519 via libsodium.
76+
`test_seams.jl` round-trip + tamper rejection.
77+
- [ ] Formal (Idris2 type-level) proof of non-interference at arbitrary N.
78+
Discharged at runtime only.
79+
- [ ] Byzantine-peer resistance beyond Clause 3 (e.g., peers that accept
80+
LWW order but serve stale reads).
7581
- [ ] Conditional-shape gating (Graph): runtime check that Graph is
7682
registered only when cross-entity-claim workload is in scope.
83+
84+
## Phase 4 + 5 closure
85+
86+
- [x] **Phase 4 dogfood:** `test_krladapter_integration.jl` (19 assertions).
87+
KRLAdapter.jl client fully satisfied by Core alone — no Federable
88+
shapes required. See `examples/krladapter_integration.jl` +
89+
`docs/FINDINGS.adoc`.
90+
- [x] **Phase 5 findings writeup:** `docs/FINDINGS.adoc` with
91+
classification, contract, degradation routes, adoption guide,
92+
foldback log, and productisation recommendation.

0 commit comments

Comments
 (0)