Repair Epiphany Rust substrate

This commit is contained in:
Meta Vens 2026-05-27 14:47:23 +01:00
commit 9af7850ea5
12 changed files with 1507 additions and 29 deletions

View file

@ -85,7 +85,7 @@ The landed machine now has:
- old Python dogfood runner cut; replacement must be native Rust/CultCache/CultNet over heartbeat/runtime-spine receipts
- first auditable Phase 6 fixed-lane coordinator runner through native `epiphany-mvp-coordinator`, producing coordinator summary, JSONL steps, rendered snapshots, transcript, stderr, runtime-spine status, native runtime job/result receipts for launched work, and final next-action artifacts while keeping semantic findings review-gated by default
- first Codex-independent native runtime vertebra through `epiphany-runtime-spine`, storing runtime identity, sessions, jobs, job results, and events as typed CultCache MessagePack documents, opening/completing native jobs, projecting job-result counts, and emitting a framed CultNet hello message for the native contract
- first Rust CultMesh local-node integration: `CultLib` now owns `crates/cultmesh-rs`, and `epiphany-core` depends on that CultMesh surface for local `EpiphanyCultMeshStatusEntry`, `EpiphanyCultMeshVersePolicyEntry`, and `EpiphanyCultMeshGlobalRoomPolicyEntry` round-trip smokes instead of treating raw CultNet as the ergonomic app-facing database layer
- first Rust CultMesh local-node integration: `vendor/cultmesh-rs` now provides the repo-contained CultMesh surface over vendored CultCache/CultNet, and `epiphany-core` depends on that surface for local `EpiphanyCultMeshStatusEntry`, `EpiphanyCultMeshVersePolicyEntry`, and `EpiphanyCultMeshGlobalRoomPolicyEntry` round-trip smokes instead of treating raw CultNet as the ergonomic app-facing database layer
- live-specialist runner must be rebuilt around heartbeat/runtime-spine result receipts
- first Phase 6 Aquarium operator shell extracted to sibling repo `E:\Projects\EpiphanyAquarium`, a Tauri v2 + React/WebGL client over the existing status bridge, dogfood artifacts, and GUI action artifacts, with its own distilled interface state/memory/doctrine plus durable checkpoint preparation, bounded status/coordinator artifact buttons, fixed modeling/verification/reorient launch and read-back buttons, and explicit review-gated reorient acceptance
- first Unity editor/runtime bridge through native `epiphany-unity-bridge`, native `epiphany-unity-bridge-smoke`, and the GUI Inspect Unity action, resolving exact project-pinned editors and writing runtime artifacts while refusing wrong or missing versions

View file

@ -36,7 +36,7 @@ remembers doctrine; the branch remembers the blade.
- The repo now has a one-command local operator path: `.\tools\epiphany_local_run.ps1`. Default mode is `smoke`; it builds the retained Codex app-server compatibility edge, builds native Epiphany operator binaries, runs the coordinator smoke, and writes launcher artifacts under `.epiphany-run/` plus coordinator artifacts under `.epiphany-dogfood/`. Use `-Mode status`, `-Mode plan`, or `-Mode run -MaxSteps 4` for the other current entrypoints; add `-ThreadId <id>` and `-Workspace <path>` to inspect or continue an existing thread. `status`, `plan`, and `smoke` do not spend model calls; `run` builds and uses `epiphany-openai-runtime`.
- The active foundation directive is now `notes/codex-starvation-and-cultnet-liberation-plan.md`. The previous Codex app-server control-plane rebuild made Epiphany less rotten inside Codex, but that is not the destination. Epiphany must become a native CultCache/CultNet runtime while remaining an honest modified Codex-derived backend for subscription auth/model use. Codex is a compatibility reliquary for OpenAI subscription auth and model transport, not the host brain and not a mask for impersonation.
- `notes/epiphany-cultmesh-dreaming-roadmap.md` is the new concrete design for distributed Epiphany dreaming. The invariant is hard: private state stays local; public dreams are separately authored typed documents distributed through CultMesh/CultNet; foreign dreams are thought weather until a reviewed local adoption receipt digests them. The first code slice should be dream schemas plus a local CultMesh-backed store, not public fanout.
- CultMesh is now the preferred Rust abstraction for that local store work. The Rust port lives in `E:\Projects\CultLib\crates\cultmesh-rs`, and Epiphany now depends on it directly from `epiphany-core`. The first integration is deliberately small: `EpiphanyCultMeshStatusEntry`, `EpiphanyCultMeshVersePolicyEntry`, and `EpiphanyCultMeshGlobalRoomPolicyEntry` round-trip through `.epiphany-smoke/cultmesh/epiphany-local.ccmp` using `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-smoke`. Future local dream/status/Verse work should start from CultMesh, not raw CultNet, unless the task is polishing the CultMesh internals themselves. Preserve the three Verse tiers: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Face posts.
- CultMesh is now the preferred Rust abstraction for that local store work. The compile-time Rust substrate is repo-contained: `vendor/cultcache-rs`, `vendor/cultnet-rs`, and `vendor/cultmesh-rs`. The old `E:\Projects\CultLib\crates\*` dependency body is dead in this checkout and must not be revived by accident. Vendored CultCache reads/writes `cultcache.store.v1`, so `state/ledgers.msgpack` and `epiphany-state status` are aligned again. The first integration is deliberately small: `EpiphanyCultMeshStatusEntry`, `EpiphanyCultMeshVersePolicyEntry`, and `EpiphanyCultMeshGlobalRoomPolicyEntry` round-trip through `.epiphany-smoke/cultmesh/epiphany-local.ccmp` using `cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-cultmesh-smoke`. Future local dream/status/Verse work should start from CultMesh, not raw CultNet, unless the task is polishing the CultMesh internals themselves. Preserve the three Verse tiers: `epiphany-internal` for private sub-agent typed state, `gamecult-local` for trusted LAN/Yggdrasil-tunnel GameCult sharing, and `epiphany-global` for untrusted public dreams plus topic-specific threaded public rooms for Face posts.
- `notes/codex-auth-spine-inventory.md` is the source-grounded keeper list for that reliquary. Corrected compliance invariant: Codex-compatible auth identity stays anchored in vendored Codex-derived auth machinery. `epiphany-openai-auth-spine` is now a thin Epiphany-named boundary over `codex-login`, not a clean-room clone of credential storage or token refresh. Codex apps, skills, marketplace, plugin UX, broad app-server workflow, and JSON-RPC sprawl remain cuttable because they are not subscription-auth legitimacy.
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
- `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance.
@ -1420,9 +1420,10 @@ compares Epiphany's named organ contracts against Void's current Face prompting
shape and maps the route from contract catalog to executable organism. Main
finding: the boundaries are directionally right, but Mind/Body/Eyes are still
mostly advertised gates rather than mandatory runtime receipt chains; Hands,
Soul, and Life need their own contract families; and cargo verification is
blocked until the missing `E:\Projects\CultLib\crates\*` Rust dependency body is
repaired or deliberately replaced.
Soul, and Life need their own contract families. The first dependency-body
repair is landed: the missing `E:\Projects\CultLib\crates\*` paths were replaced
with repo-contained vendored CultCache/CultNet/CultMesh crates, and the
`epiphany-core` library tests pass against that body.
## Not Yet

View file

@ -130,9 +130,9 @@ shape parts of the living workflow. The Perfect Machine needs Self as a typed
router over CultNet/CultMesh contracts, not a half-native coordinator behind a
JSON-RPC organ.
### 5. CultMesh/CultLib Local Dependency Is Broken
### 5. CultMesh/CultLib Local Dependency Was Broken
`epiphany-core` currently points at:
`epiphany-core` previously pointed at:
```toml
cultcache-rs = { path = "../../CultLib/crates/cultcache-rs" }
@ -141,13 +141,24 @@ cultnet-rs = { path = "../../CultLib/crates/cultnet-rs" }
```
This checkout has `E:\Projects\CultLib` but no `crates` directory, so cargo
checks fail before reaching the new code. This is a Body-level substrate wound:
the Rust dependency body described by the map does not exist at the path the
machine uses.
checks failed before reaching the new code. This was a Body-level substrate
wound: the Rust dependency body described by the map did not exist at the path
the machine used.
Required correction: decide whether CultLib should restore `crates/` or
Epiphany should depend on the sibling standalone Rust repos. Do not make that
choice as a drive-by patch.
Correction landed: Epiphany now compiles against repo-contained vendored crates:
```toml
cultcache-rs = { path = "../vendor/cultcache-rs" }
cultmesh-rs = { path = "../vendor/cultmesh-rs" }
cultnet-rs = { path = "../vendor/cultnet-rs" }
```
`vendor/cultmesh-rs` is a small Rust facade over vendored CultCache and CultNet.
It owns document-set registration plus local typed node operations
(`put`/`get`/`get_required`/`delete`/`flush`) for now. Vendored CultCache also
reads and writes the `cultcache.store.v1` snapshot format used by the current
state ledgers. This keeps Epiphany's body self-contained while preserving
CultMesh as the ergonomic local store surface.
### 6. Face Prompting Is Directionally Correct But Behind Void
@ -168,12 +179,14 @@ Epiphany should port that shape, not the exact TypeScript machinery.
### Phase 0: Repair The Rust Body
Goal: make the existing contracts buildable again.
Goal: make the existing contracts buildable again. Status: landed for the local
repo-contained dependency body.
- Audit the CultLib/CultCache/CultNet/CultMesh repo layout.
- Choose the canonical Rust dependency source.
- Update dependency paths or restore the expected `CultLib/crates` layout.
- Run the focused tests that are currently blocked:
- Audited the CultLib/CultCache/CultNet/CultMesh repo layout.
- Chose the repo-contained vendored Rust dependency source.
- Updated dependency paths away from the dead `CultLib/crates` layout.
- Added `vendor/cultmesh-rs` as the local CultMesh facade.
- Ran the previously blocked focused surface through:
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib face_turn`
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib mind_gateway`
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib body_gateway`
@ -182,7 +195,9 @@ Goal: make the existing contracts buildable again.
- `cargo test --manifest-path .\epiphany-core\Cargo.toml --lib runtime_spine::tests::runtime_spine_emits_cultnet_hello_frame`
Definition of done: contract code compiles against the intended Rust substrate
without local path superstition.
without local path superstition. Verification: `cargo test --manifest-path
.\vendor\cultmesh-rs\Cargo.toml` and `cargo test --manifest-path
.\epiphany-core\Cargo.toml --lib` pass.
### Phase 1: Make The Gates Executable