Move processor tests out of Codex processor

This commit is contained in:
Meta Vens 2026-05-13 01:54:47 +01:00
commit 722a7f0028
6 changed files with 4813 additions and 4847 deletions

View file

@ -454,6 +454,10 @@ intervention orchestration into
`vendor/codex/codex-rs/app-server/src/codex_message_processor/epiphany_automation.rs`,
taking the processor to about 15,346 lines while preserving the old
`codex_message_processor` re-export path for event handling.
The sixteenth cut moved the old in-file processor test tail into
`vendor/codex/codex-rs/app-server/src/codex_message_processor/processor_tests.rs`,
taking the processor to about 10,502 lines. Treat this as test-ownership relief,
not runtime purification by itself.
Also: MCP itself is allowed to be JSON. The target is not "replace MCP JSON";
the target is an Epiphany-owned boundary that speaks typed Epiphany

View file

@ -62,6 +62,6 @@ Rule: JSON is allowed at external schema/wire boundaries. Inside Epiphany, live
3. Done: replace role `statePatch` JSON with typed map/planning/graph patch documents. `EpiphanyRoleFindingInterpretation` now carries `EpiphanyRoleStatePatchDocument`; app-server maps it to the legacy protocol patch without JSON round-tripping.
4. Done: replace runtime job result JSON projections. Runtime-spine results now project through typed role/reorient interpreters instead of `runtime_job_result_to_role_json` and `runtime_job_result_to_reorient_json`.
5. Done: replace app-server launch protocol `input_json` / `output_schema_json` with typed launch documents and `output_contract_id`.
6. Continue the whale-carcass cut: the first cuts moved Epiphany launch doctrine and protocol-to-core launch document mapping into `epiphany_launch.rs`, role/reorient result projection into `epiphany_results.rs`, scene projection into `epiphany_scene.rs`, freshness/reorientation mapping into `epiphany_reorient.rs`, context/planning/graph-query projection into `epiphany_context.rs`, jobs projection into `epiphany_jobs.rs`, retrieve projection into `epiphany_retrieve.rs`, pressure/pre-compaction checkpoint projection into `epiphany_pressure.rs`, CRRC/coordinator/role-board projection plus acceptance/evidence signal helpers into `epiphany_coordinator.rs`, Epiphany JSON-RPC route handling under `codex_message_processor/` split into read/proposal routes and mutation/launch/accept/index routes, mutation support helpers into `epiphany_mutation_routes.rs`, runtime-spine result snapshot/adaptation helpers into `epiphany_runtime_results.rs`, and automation/pre-compaction orchestration into `epiphany_automation.rs`, reducing `codex_message_processor.rs` from about 21,263 to 15,346 lines. Next replace child-module parent visibility with explicit typed service boundaries and move remaining Epiphany prompt/state/runtime helpers out of the processor; success means the processor keeps shrinking and ownership gets clearer, not merely better typed.
6. Continue the whale-carcass cut: the first cuts moved Epiphany launch doctrine and protocol-to-core launch document mapping into `epiphany_launch.rs`, role/reorient result projection into `epiphany_results.rs`, scene projection into `epiphany_scene.rs`, freshness/reorientation mapping into `epiphany_reorient.rs`, context/planning/graph-query projection into `epiphany_context.rs`, jobs projection into `epiphany_jobs.rs`, retrieve projection into `epiphany_retrieve.rs`, pressure/pre-compaction checkpoint projection into `epiphany_pressure.rs`, CRRC/coordinator/role-board projection plus acceptance/evidence signal helpers into `epiphany_coordinator.rs`, Epiphany JSON-RPC route handling under `codex_message_processor/` split into read/proposal routes and mutation/launch/accept/index routes, mutation support helpers into `epiphany_mutation_routes.rs`, runtime-spine result snapshot/adaptation helpers into `epiphany_runtime_results.rs`, automation/pre-compaction orchestration into `epiphany_automation.rs`, and the old processor test tail into `processor_tests.rs`, reducing `codex_message_processor.rs` from about 21,263 to 10,502 lines. Next replace child-module parent visibility with explicit typed service boundaries and move remaining Epiphany prompt/state/runtime helpers out of the processor; success means the processor keeps shrinking and ownership gets clearer, not merely better typed.
7. Seal MCP payloads behind an Epiphany boundary that speaks typed Epiphany documents internally and MCP JSON externally.
8. Audit heartbeat cognition values and either type them or explicitly expire them.

Binary file not shown.

View file

@ -278,5 +278,5 @@ rejected_paths:
reason: making Epiphany cleaner inside Codex still preserves the wrong organ; Codex must be starved down to OpenAI subscription auth/model transport, while Epiphany data and subsystem communication move to typed CultCache/CultNet.
current_status:
summary: The Codex starvation pass has five typing receipts plus fifteen real ownership cuts: Epiphany launch doctrine/prompt/builders and protocol-to-core launch document mapping moved into `vendor/codex/codex-rs/app-server/src/epiphany_launch.rs`, role/reorient result projection/note rendering moved into `vendor/codex/codex-rs/app-server/src/epiphany_results.rs`, scene projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_scene.rs`, freshness/reorientation input mapping moved into `vendor/codex/codex-rs/app-server/src/epiphany_reorient.rs`, context/planning/graph-query projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_context.rs`, jobs projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_jobs.rs`, retrieve projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_retrieve.rs`, pressure/pre-compaction checkpoint projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_pressure.rs`, CRRC/coordinator/role-board projection plus acceptance/evidence signal helpers moved into `vendor/codex/codex-rs/app-server/src/epiphany_coordinator.rs`, the Epiphany JSON-RPC route-handler cluster moved under `vendor/codex/codex-rs/app-server/src/codex_message_processor/`, that cluster split into read/proposal routes versus mutation/launch/accept/index routes, mutation support helpers moved into `epiphany_mutation_routes.rs`, runtime-spine result snapshot/adaptation helpers moved into `epiphany_runtime_results.rs`, and coordinator automation/pre-compaction intervention orchestration moved into `epiphany_automation.rs`. The processor is down from about 21,263 lines to 15,346 lines. This is progress, not absolution: the route/automation modules still have parent-internal visibility and mutation authority still lives in the Codex adapter layer. MCP itself is correctly JSON at its protocol edge; the target is typed Epiphany intent/result/receipt wrappers around MCP, not replacing MCP JSON.
summary: The Codex starvation pass has five typing receipts plus sixteen real ownership cuts: Epiphany launch doctrine/prompt/builders and protocol-to-core launch document mapping moved into `vendor/codex/codex-rs/app-server/src/epiphany_launch.rs`, role/reorient result projection/note rendering moved into `vendor/codex/codex-rs/app-server/src/epiphany_results.rs`, scene projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_scene.rs`, freshness/reorientation input mapping moved into `vendor/codex/codex-rs/app-server/src/epiphany_reorient.rs`, context/planning/graph-query projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_context.rs`, jobs projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_jobs.rs`, retrieve projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_retrieve.rs`, pressure/pre-compaction checkpoint projection moved into `vendor/codex/codex-rs/app-server/src/epiphany_pressure.rs`, CRRC/coordinator/role-board projection plus acceptance/evidence signal helpers moved into `vendor/codex/codex-rs/app-server/src/epiphany_coordinator.rs`, the Epiphany JSON-RPC route-handler cluster moved under `vendor/codex/codex-rs/app-server/src/codex_message_processor/`, that cluster split into read/proposal routes versus mutation/launch/accept/index routes, mutation support helpers moved into `epiphany_mutation_routes.rs`, runtime-spine result snapshot/adaptation helpers moved into `epiphany_runtime_results.rs`, coordinator automation/pre-compaction intervention orchestration moved into `epiphany_automation.rs`, and the old processor test tail moved into `processor_tests.rs`. The processor is down from about 21,263 lines to 10,502 lines. This is progress, not absolution: the route/automation modules still have parent-internal visibility and mutation authority still lives in the Codex adapter layer. MCP itself is correctly JSON at its protocol edge; the target is typed Epiphany intent/result/receipt wrappers around MCP, not replacing MCP JSON.
next_action: Continue the actual whale-carcass cut: replace child-module parent visibility with explicit typed service boundaries, and move remaining Epiphany prompt/state/runtime helpers out of `codex_message_processor.rs`. Success metric remains a visibly smaller processor and clearer ownership, not merely typed payloads.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff