From 954f7cd1d319a00872ebe77ff5ee0afca4a10905 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 19 May 2026 16:55:32 +0100 Subject: [PATCH] Record CultNet starvation cuts --- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 132969 -> 133287 bytes state/map.yaml | 12 +++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 9cf92d6f..bf1555e3 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -47,6 +47,7 @@ remembers doctrine; the branch remembers the blade. - State-update contract proof and job launch/interrupt DTO ownership now live in native `epiphany-core`. The old giant `codex_thread.rs` Epiphany state-update test fixture was cut, and `epiphany-codex-bridge` no longer imports Epiphany job launch request types from `codex_core`; vendored `CodexThread` may call the native mutation/launch law for compatibility, but it must not regain ownership of state-update semantics, heartbeat launch-plan policy, or Epiphany DTOs. - `epiphany-codex-bridge` no longer depends on vendored `codex-core` at all. Retrieval takes workspace/Codex-home paths, invalidation owns a native `notify` watcher, runtime-result acceptance takes typed state plus runtime-store path, live rollout/thread reads moved into app-server `epiphany_thread_host`, and mutation policy depends on the small `EpiphanyMutationHost` trait implemented by app-server's `EpiphanyCodexThreadHost` wrapper. The bridge owns Epiphany law; vendored app-server owns CodexThread access. - `epiphany-codex-bridge` also no longer depends on `codex-protocol`. Bridge durable-state imports point at `epiphany-state-model`, token pressure takes native `EpiphanyTokenUsageSnapshot`, app-server maps Codex token telemetry at the host wall, Codex token usage rollout replay lives in `codex_message_processor/token_usage_replay.rs`, and bridge errors are `EpiphanyBridgeError`. The only remaining vendored bridge dependencies are app-server protocol DTOs and absolute path validation. +- The first bridge JSON-RPC starvation cuts are landed. Freshness now returns a serializable `EpiphanyFreshnessSurface`, job launch/interrupt mutation results carry typed `EpiphanyJobView` plus separate host-edge launcher/backend ids, and reorient/pre-compaction decisions consume typed `EpiphanyPressure`. App-server still projects those typed surfaces into `ThreadEpiphany*` JSON-RPC DTOs at the legacy edge. Continue by cutting view/coordinator/reorient DTO coupling, not by inventing adapters with nicer uniforms. - MCP remains JSON because MCP is a JSON protocol. The latest processor cut only moved MCP refresh/OAuth/status/resource/tool-call route handling into `codex_message_processor/mcp_routes.rs`, reducing the root processor to about 8,977 lines; it did not claim MCP payloads are CultNet or make MCP an Epiphany-owned runtime contract. - Codex account auth route handling remains in vendored Codex but now lives in `codex_message_processor/auth_routes.rs`: API-key login, ChatGPT browser/device-code/external-token login, logout, auth status, account, rate limits, and add-credits nudge handling. This preserves Codex ownership of subscription auth while cutting the root processor to about 8,094 lines. - One-off command execution and command stream write/resize/terminate route handling now live in `codex_message_processor/command_routes.rs`; `CommandExecManager` remains the lifecycle owner, while the root processor is about 7,800 lines. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 26d57179d6caad94ed5e99068badbbe20c8f4371..be3d635bee7f45578a38713b7c41ceec7dd37a89 100644 GIT binary patch delta 351 zcmZXQF-yZx5XVVG$mHbaav(bOX%mQG9E%PeYO&(r_L5x9D^1?>?xm$T6mjS#3PL`D zvml6rAINXvt3?N0Zn^vaet+)sK6ri%9=83UeA&77yqmkmTQr{c)_DHM`sUMn)Q%2B zI~L*Lc^D^goP^Eon!h#Q=+tA|LknyrO{7)20wb9d7!q<(Av08Z3K?l;WJpQnR|t~f z*eFxTYIgE-H>hbSGi<>~r%={*1#??xV8|rV4D8Hc{u}M;d3vF63T9k06q>ETC0*s* z0$Jris7YaE_YI-QbZKPv-7v>Yv8(E^Zqz0I0r#DiYr-Rt#t255AURkmm5bN{p*uM3 WiL-uZ7YykUuBc1*-s}HQMVDXx?t88P delta 52 zcmZ2Jk>h0_#{^|2cKwa2g^Y|<&C?m%r!z8cpU%j%msNC&k%5t!u7Rnpp=F4niIuUX Im7zrx0J6aj)Bpeg diff --git a/state/map.yaml b/state/map.yaml index 4fb7bce6..2ecba22a 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -302,6 +302,12 @@ current_status: `epiphany-state-model`; Codex token usage rollout replay moved back into app-server; token telemetry crosses the wall as `EpiphanyTokenUsageSnapshot`; and `CodexErr` was replaced with - `EpiphanyBridgeError`. `epiphany-codex-bridge` now depends on vendored - Codex only for app-server protocol DTOs and absolute path validation. - next_action: Continue Codex starvation and CultNet liberation from the new host wall. Audit whether `codex-app-server-protocol` DTO coupling should remain the legacy JSON-RPC edge or collapse into native CultNet/app-server boundary types; then classify OpenAI/MCP protocol edges and role-result/raw ingress compatibility. Keep JSON only at true wire/hostile-ingress/forensic boundaries; move Epiphany-owned runtime data into typed CultCache documents and CultNet contracts. + `EpiphanyBridgeError`. The first protocol-starvation cuts are landed: + freshness now returns a serializable `EpiphanyFreshnessSurface`, job + launch/interrupt bridge results carry typed `EpiphanyJobView` plus host-edge + launcher metadata, and reorient/pre-compaction decisions consume typed + `EpiphanyPressure`. App-server still projects those typed surfaces into + `ThreadEpiphany*` responses at the legacy JSON-RPC edge. The bridge still + depends on vendored Codex for app-server protocol DTOs and absolute path + validation, so the purification is not done. + next_action: Continue Codex starvation and CultNet liberation by cutting bridge-internal `ThreadEpiphany*` authority. Prioritize view/coordinator/reorient DTO coupling: derive typed CultNet surfaces first, push JSON-RPC projection into app-server, and keep MCP/OpenAI JSON only at their true protocol/text edges. Do not add compatibility adapters unless they protect a named ownership invariant.