Extract Epiphany result projection from Codex processor

This commit is contained in:
Meta Vens 2026-05-13 00:39:57 +01:00
commit e783f88789
7 changed files with 299 additions and 278 deletions

View file

@ -407,9 +407,12 @@ they were not enough to make the Codex organ materially smaller. The first real
carcass cut has now moved Epiphany launch doctrine, prompt config, launch
request builders, output schemas, binding ids, and launch-specific labels into
`vendor/codex/codex-rs/app-server/src/epiphany_launch.rs`. The processor is
down from about 21,263 lines to 20,596 lines. This is progress, not absolution:
handlers, mappers, route orchestration, result projection, coordinator glue,
and tests still keep too much Epiphany inside Codex.
down from about 21,263 lines to 20,596 lines. The second cut moved role/reorient
result projection and note rendering into
`vendor/codex/codex-rs/app-server/src/epiphany_results.rs`, taking the processor
to about 20,331 lines. This is progress, not absolution: handlers, scene/view
mappers, route orchestration, coordinator glue, accept policy plumbing, and
tests still keep too much Epiphany inside Codex.
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 cut moved Epiphany launch doctrine into `epiphany_launch.rs` and reduced `codex_message_processor.rs` from about 21,263 to 20,596 lines. Next move route handlers, result/projection mappers, coordinator glue, and policy-shaped code 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 cut moved Epiphany launch doctrine into `epiphany_launch.rs`, and the second moved role/reorient result projection into `epiphany_results.rs`, reducing `codex_message_processor.rs` from about 21,263 to 20,331 lines. Next move route handlers, scene/view projection mappers, coordinator glue, and policy-shaped code 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.