Move Epiphany job policy into bridge

This commit is contained in:
Meta Vens 2026-05-18 07:00:35 +01:00
commit bbe8a758a1
7 changed files with 170 additions and 225 deletions

View file

@ -60,6 +60,7 @@ remembers doctrine; the branch remembers the blade.
- Thread config helpers now live in `codex_message_processor/thread_config.rs`: instruction-source loading, thread config override construction, config-load error shaping, and dynamic-tool validation. The pure dynamic-tool validation contract has module-local unit tests.
- Turn control routes now live in `codex_message_processor/turn_routes.rs`: turn start, thread item injection, app-server client info setting, turn steer, turn interrupt, mode normalization, and input-limit validation with module-local unit tests.
- Epiphany read-route memory graph loading now belongs to `epiphany-codex-bridge::state::load_thread_memory_graph_snapshot`. Vendored app-server read routes may decide whether a loaded thread exists, but they no longer own the memory graph store path or load mechanics.
- Epiphany job launch/interrupt policy now belongs to `epiphany-codex-bridge::mutation_service`: heartbeat launch planning, runtime-spine job opening, binding/runtime-link mutation, and interrupt binding cleanup are out of vendored `CodexThread`. `CodexThread` still owns the narrow Codex-session read/update seam for Epiphany state until that persistence seam can be replaced cleanly.
- Heartbeat durable document/schema types now live in `epiphany-core/src/heartbeat_state/heartbeat_documents.rs`, role/default construction lives in `epiphany-core/src/heartbeat_state/heartbeat_roles.rs`, persistence/validation lives in `epiphany-core/src/heartbeat_state/heartbeat_store.rs`, and status/artifact JSON projection lives in `epiphany-core/src/heartbeat_state/heartbeat_projection.rs`. The root `heartbeat_state.rs` keeps scheduling and Void cognition orchestration for the next cuts. Focused heartbeat tests and `epiphany-core` check pass after the splits.
- Heartbeat role/default and store seams now have module-local unit tests: fixed lane catalog, Ghostlight scene role projection, and typed state/cognition CultCache round-trip. Keep future heartbeat cuts aligned to those seam tests instead of growing root integration-only coverage.
- Heartbeat adaptive pacing now lives in `epiphany-core/src/heartbeat_state/heartbeat_pacing.rs`, including running-turn count and effective cooldown multipliers. It has a module-local unit test for pending-turn counting; root scheduling calls the pacing seam instead of owning pressure/concurrency math directly.