# E237 — Architecture

**AGI: NOT ESTABLISHED · RSI: EXPERIMENTAL**

## 1. What E237 actually adds

E237 is not a new intelligence architecture. It adds the **substrate an integrated organism needs but did not have**: a durable, crash-safe, exactly-once effect store with a governed execution path and an independent kill fence.

```
                     ┌──────────────────────────────────────────┐
   mission / episode │  campaign.run_episode(ep, committed, salt)│  pure function
                     └───────────────┬──────────────────────────┘
                                     │ proposed effect
                     ┌───────────────▼──────────────────────────┐
                     │ MCPTransparentInterceptor (default deny)  │  production gate
                     │  ALLOW → signed single-use permit         │
                     └───────────────┬──────────────────────────┘
                                     │ permit (id + params hash)
                     ┌───────────────▼──────────────────────────┐
                     │ DurableStore.commit  BEGIN IMMEDIATE      │
                     │  fence?  → ROLLBACK (Fenced)              │
                     │  episode id already? → idempotent no-op   │
                     │  INSERT + SHA-256 chain + COMMIT          │
                     └───────────────┬──────────────────────────┘
                                     │ exactly-once effect
        ┌────────────────────────────┼─────────────────────────────┐
        ▼                            ▼                             ▼
  append-only journal        independent emergency fence    published evidence
  (prev → sha(prev|id|sha))  (separate Ed25519 key)          (verifier + witnesses)
```

## 2. Properties and how they are obtained

| Property | Mechanism | Verified by |
|---|---|---|
| **Exactly-once effect** | episode id primary key + `INSERT` inside `BEGIN IMMEDIATE` | 8 concurrent distinct commits = 8 rows; 8 concurrent identical = 1 effect |
| **Crash safety** | SQLite WAL + `synchronous=FULL`; transaction atomicity | SIGKILL mid-episode; resume identical |
| **No lost committed work** | commit is a single transaction; in-flight marker only before commit | 0 lost commits after resume |
| **Deterministic resume** | episode is a pure function of committed state + revealed salt | episode-for-episode identical journal |
| **Tamper evidence** | SHA-256 chain over `prev || id || payload-hash` | chain verifier; tamper suite |
| **Independent stop** | separate Ed25519 key writes a fence row; checked inside the commit transaction | 0 effects after fence; 16/16 concurrent commits refused |
| **Scoped authorization** | permit bound to episode id + parameter hash; single use; 30 s | 9/9 conformance; 20/20 attacks blocked |
| **Capability preservation** | sealed evaluation before/after restart | identical sealed payloads and witnesses |

## 3. What is integrated, and what is not

The directive names fifteen subsystems. E237 integrates **three** of them for real:

| # | Subsystem | E237 |
|---|---|---|
| 1 | General intelligence core | **NOT INTEGRATED** |
| 2 | Reasoning / planning | **NOT INTEGRATED** |
| 3 | Causal world model | **NOT INTEGRATED** (E109/E157 studies only) |
| 4 | Persistent knowledge organism | **PARTIAL** — durable provenance journal, no semantic graph/consolidation |
| 5 | Continual learning | **NOT INTEGRATED** (E236 in flight) |
| 6 | Capability acquisition | **INTEGRATED** — deterministic E201 learner |
| 7 | Cross-domain transfer | **NOT INTEGRATED** (E232/E234/E235 evidence only) |
| 8 | Scientific discovery | **NOT INTEGRATED** (E157/E144 studies only) |
| 9 | RSI engine | **NOT INTEGRATED** (E172 bounded positive) |
| 10 | Collective intelligence | **NOT INTEGRATED** (E79/E110 no quality gain) |
| 11 | Autonomous engineering | **NOT INTEGRATED** |
| 12 | Independent evaluation | **INTEGRATED** — separate verifier + witness re-application |
| 13 | Long-horizon persistence | **INTEGRATED** — durable store + resume + fence (process death, not host reboot) |
| 14 | Governance constitution | **INTEGRATED** — MCPGate + permits + independent fence |
| 15 | Evidence / reproducibility | **INTEGRATED** — signed bundle, Merkle, tamper suite, replication |

**Honest statement:** E237 is a **three-layer integration** (durable execution, governed authorization, independent evidence), not the fifteen-system organism. E233's finding that the twelve systems are co-located but not integrated still stands.

## 4. Data and trust boundaries

- **Private:** engine source, salts before reveal, permit key, emergency key, SQLite stores. Never published.
- **Published:** preregistration, revealed salts, journal hashes (not timestamps used for equality), sealed tasks and witnesses, governance receipts, independent verifier. No engine source.
- **Trust:** the evidence key is self-generated; a seal proves integrity at sealing time, not third-party identity. The public verifier does not re-run the learner; it re-applies every published witness.

## 5. Failure modes this design accepts

- A crash between `mark_inflight` and `commit` causes the episode to run again (at-least-once execution); the **effect** remains exactly-once. Repeated execution is safe only because episodes are pure; a real-world side effect would need an idempotency key at the resource boundary.
- The store is local. Replication, host reboot, power loss and network partition are **not** covered.
- An attacker with write access to the store can corrupt it; the chain detects corruption only relative to a pinned head (published in the run report). No off-host anchor.
- Permit revocation after mint is **not implemented** (30 s single-use only).

## 6. Relation to the seven moats

E237 adds **no new moat**. It hardens Moat #4 (execution provenance and attestation) and Moat #7 (autonomous trust control loop) at the research-runtime level. It does not change Moat #1–#3, #5–#6, and it does not alter the trust kernel.
