From 7b62c3c00945fc7ca5c62c254fe7c0d92823c565 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 20 May 2026 02:12:50 +0100 Subject: [PATCH] Feed role board core pressure --- epiphany-codex-bridge/src/coordinator.rs | 7 ++----- epiphany-codex-bridge/src/view.rs | 6 +++--- notes/fresh-workspace-handoff.md | 1 + state/ledgers.msgpack | Bin 136435 -> 136630 bytes state/map.yaml | 3 ++- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/epiphany-codex-bridge/src/coordinator.rs b/epiphany-codex-bridge/src/coordinator.rs index f242c514..3aef0a58 100644 --- a/epiphany-codex-bridge/src/coordinator.rs +++ b/epiphany-codex-bridge/src/coordinator.rs @@ -5,7 +5,6 @@ use codex_app_server_protocol::ThreadEpiphanyCrrcRecommendation; use codex_app_server_protocol::ThreadEpiphanyJob; use codex_app_server_protocol::ThreadEpiphanyJobKind; use codex_app_server_protocol::ThreadEpiphanyJobStatus; -use codex_app_server_protocol::ThreadEpiphanyPressure; use codex_app_server_protocol::ThreadEpiphanyReorientAction; use codex_app_server_protocol::ThreadEpiphanyReorientResultStatus; use codex_app_server_protocol::ThreadEpiphanyReorientStateStatus; @@ -67,7 +66,6 @@ use crate::launch::EPIPHANY_VERIFICATION_ROLE_BINDING_ID; use crate::launch::build_epiphany_reorient_launch_request; use crate::launch::render_epiphany_coordinator_note; use crate::pressure::derive_epiphany_pressure; -use crate::pressure::map_epiphany_pressure; use crate::reorient::EpiphanyFreshnessWatcherSnapshot; use crate::reorient::derive_epiphany_freshness_view; use crate::reorient::derive_epiphany_reorient; @@ -504,7 +502,6 @@ pub async fn select_epiphany_coordinator_automation( Some(input.watcher_snapshot), ); let core_pressure = derive_epiphany_pressure(input.token_usage_info); - let pressure = map_epiphany_pressure(input.token_usage_info); let (state_status, reorient_decision) = derive_epiphany_reorient( Some(input.state), &core_pressure, @@ -548,7 +545,7 @@ pub async fn select_epiphany_coordinator_automation( Some(input.state), &jobs, &reorient_decision, - &pressure, + &core_pressure, &crrc_recommendation, reorient_result.status, reorient_job.as_ref(), @@ -1007,7 +1004,7 @@ pub fn map_epiphany_roles( state: Option<&EpiphanyThreadState>, jobs: &[ThreadEpiphanyJob], decision: &CoreEpiphanyReorientDecision, - pressure: &ThreadEpiphanyPressure, + pressure: &epiphany_core::EpiphanyPressure, recommendation: &CoreEpiphanyCrrcRecommendation, result_status: CoreEpiphanyCrrcResultStatus, reorient_job: Option<&ThreadEpiphanyJob>, diff --git a/epiphany-codex-bridge/src/view.rs b/epiphany-codex-bridge/src/view.rs index 337616f7..ce8cb7ca 100644 --- a/epiphany-codex-bridge/src/view.rs +++ b/epiphany-codex-bridge/src/view.rs @@ -264,8 +264,8 @@ pub async fn map_epiphany_view_response( } else { None }; - let roles = if let (Some(pressure), Some(decision), Some(recommendation)) = ( - pressure.as_ref(), + let roles = if let (Some(core_pressure), Some(decision), Some(recommendation)) = ( + core_pressure.as_ref(), core_reorient_decision.as_ref(), recommendation.as_ref(), ) { @@ -273,7 +273,7 @@ pub async fn map_epiphany_view_response( state, &jobs, decision, - pressure, + core_pressure, recommendation, reorient_result.status, reorient_job.as_ref(), diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 93a6f0ae..bebdd671 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -56,6 +56,7 @@ remembers doctrine; the branch remembers the blade. - The old protocol-shaped result helper layer is deleted: no protocol finding runtime-id helpers, no protocol result-note renderers, and no dead protocol reorient scratch/checkpoint builders remain in the bridge. Legacy view/result/accept responses may still carry `ThreadEpiphany*Finding`, but they are projections, not bridge policy input. - Runtime result view responses now project directly from typed result snapshots; the old protocol tuple wrappers in `runtime_results.rs` are gone, and runtime-result tests assert core typed statuses. - Role acceptance now applies core `EpiphanyStateUpdate` from typed findings; `ThreadEpiphanyUpdatePatch` survives in that path only as legacy accept-response projection. +- Role-board derivation consumes core `EpiphanyPressure` directly now; `ThreadEpiphanyPressure` is only response projection. - 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 42fb5bebbfa0f10fab3c277f38c38400159fe4e8..cba319cfe26db94d0c82f36a015c7255207044dd 100644 GIT binary patch delta 226 zcmeyol4ILyjtR<4qBR>;3mF+Znx`|iPiJJ@KAn-tU07(!P9p;&GhG8yT_b}K14AoA zqsf8A()Bl|1m)+X>L%qU7NsZ@6r~mymlmZeB$t+0DHI_jQc{aD%Mwd6^Yaw)^2-&H z^Ye;Jb5o0f44`7yg3N-9#JtJ?nC_I!qSWM)oJwnjkc^_##1sq#MX9-onR&$uMX5T) d1wgY>fi~x70rh|^$j{5E)Z2pYSSu5wC;))oPt*Va delta 39 vcmdnCn&b0IjtR<4B0D##7BVunH&175pU%j*eL5qPyD;OH>5L*w!i-S>9Fz