From f3984d293e12f83416fed5e950f06002b027776e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 20 May 2026 08:16:11 +0100 Subject: [PATCH] Keep coordinator view core-shaped --- epiphany-codex-bridge/src/coordinator.rs | 9 +++++---- epiphany-codex-bridge/src/view.rs | 5 ++--- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 140469 -> 140721 bytes state/map.yaml | 3 +++ 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/epiphany-codex-bridge/src/coordinator.rs b/epiphany-codex-bridge/src/coordinator.rs index e62c0450..d0089f81 100644 --- a/epiphany-codex-bridge/src/coordinator.rs +++ b/epiphany-codex-bridge/src/coordinator.rs @@ -72,6 +72,7 @@ use crate::pressure::derive_epiphany_pressure; use crate::reorient::EpiphanyFreshnessWatcherSnapshot; use crate::reorient::derive_epiphany_freshness_view; use crate::reorient::derive_epiphany_reorient; +use crate::reorient::map_protocol_reorient_state_status; use crate::runtime_results::load_core_epiphany_reorient_result_snapshot; use crate::runtime_results::load_core_epiphany_role_result_snapshot; @@ -402,10 +403,10 @@ pub async fn derive_epiphany_coordinator_status( pub fn map_epiphany_coordinator_view( thread_id: String, loaded: bool, - state_status: ThreadEpiphanyReorientStateStatus, + state_status: CoreEpiphanyReorientStateStatus, state_revision: Option, status: EpiphanyCoordinatorStatus, - roles: Vec, + roles: EpiphanyRoleBoardStatus, ) -> ThreadEpiphanyViewCoordinator { ThreadEpiphanyViewCoordinator { thread_id, @@ -414,7 +415,7 @@ pub fn map_epiphany_coordinator_view( } else { ThreadEpiphanyRolesSource::Stored }, - state_status, + state_status: map_protocol_reorient_state_status(state_status), state_revision, action: map_protocol_coordinator_action(status.decision.action), target_role: status @@ -429,7 +430,7 @@ pub fn map_epiphany_coordinator_view( can_auto_run: status.decision.can_auto_run, reason: status.decision.reason, source_signals: map_protocol_coordinator_source_signals(status.source_signals), - roles, + roles: map_protocol_role_board_lanes(&roles), note: status.note, } } diff --git a/epiphany-codex-bridge/src/view.rs b/epiphany-codex-bridge/src/view.rs index 62824996..a3360f3b 100644 --- a/epiphany-codex-bridge/src/view.rs +++ b/epiphany-codex-bridge/src/view.rs @@ -336,7 +336,6 @@ pub async fn map_epiphany_view_response( recommendation.as_ref(), roles.clone(), ) { - let protocol_roles = map_protocol_role_board_lanes(&roles); let status = derive_epiphany_coordinator_status( state, runtime_store_path, @@ -353,10 +352,10 @@ pub async fn map_epiphany_view_response( Some(map_epiphany_coordinator_view( thread_id.clone(), loaded, - reorient_state_status, + core_reorient_state_status, state_revision, status, - protocol_roles, + roles, )) } else { None diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index b471b588..07de4a4d 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -73,6 +73,7 @@ remembers doctrine; the branch remembers the blade. - Changed-field derivation now inspects typed `EpiphanyRoleStatePatchDocument` directly. The bridge no longer converts typed patches back into `ThreadEpiphanyUpdatePatch` merely to calculate changed fields. - View-lens orchestration now uses bridge-native `EpiphanyViewLens` selectors. App-server converts `ThreadEpiphanyViewLens` at the request wall, and the bridge maps back only for the legacy response echo. - Coordinator status derivation now receives core `EpiphanyCrrcResultStatus` for reorient result state; `ThreadEpiphanyReorientResultStatus` is projection-only for coordinator/view responses. +- Coordinator view response assembly now receives core reorient state and role-board status; `ThreadEpiphanyReorientStateStatus` / `ThreadEpiphanyRoleLane` are projected inside the response builder. - 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 2a74f396b38cd8c62933a984dc2e1d003f0a07a3..84c52e6527e7a4383b5dc2999420804736c17199 100644 GIT binary patch delta 253 zcmdmbl4Ij(jtR<4s^uG13mF+_Hcw}4pU%j*eL5o(r}FfBB20WN=2nJgQwteo#LhbB z=NF}9<|UTo7b%owrj{!tmzG#fjxm$0j|X$}^2-&9Qj=3N%TkLKlJkpFfxP^p%+$OR zh2oOLl2nDnyc7l3g3N-9#JtL&{G3#${KTS^V4zfKv5rDPQGQlxa!F=hI*3`4pPZkA zs=u@tY(NoEqe4z%9?*{byqrpf@{CMVph!|_W)9GC=?WzoKe1|Sbv85l