Remove raw JSON finding mapper hatch
This commit is contained in:
parent
c27c1dcb9f
commit
d811a480ea
7 changed files with 15 additions and 38 deletions
|
|
@ -12,20 +12,6 @@ use epiphany_core::EpiphanyRoleResultRoleId;
|
|||
use epiphany_core::EpiphanyRoleSelfPersistenceReview as CoreEpiphanyRoleSelfPersistenceReview;
|
||||
use epiphany_core::EpiphanyRoleSelfPersistenceStatus as CoreEpiphanyRoleSelfPersistenceStatus;
|
||||
use epiphany_core::EpiphanyRoleStatePatchDocument;
|
||||
use epiphany_core::interpret_reorient_finding;
|
||||
use epiphany_core::interpret_role_finding;
|
||||
|
||||
pub fn map_epiphany_reorient_finding(
|
||||
raw_result: serde_json::Value,
|
||||
job_error: Option<String>,
|
||||
item_error: Option<String>,
|
||||
) -> ThreadEpiphanyReorientFinding {
|
||||
map_protocol_reorient_finding(interpret_reorient_finding(
|
||||
&raw_result,
|
||||
job_error,
|
||||
item_error,
|
||||
))
|
||||
}
|
||||
|
||||
pub fn map_protocol_reorient_finding(
|
||||
finding: EpiphanyReorientFindingInterpretation,
|
||||
|
|
@ -46,22 +32,6 @@ pub fn map_protocol_reorient_finding(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn map_epiphany_role_finding(
|
||||
role_id: ThreadEpiphanyRoleId,
|
||||
raw_result: serde_json::Value,
|
||||
job_error: Option<String>,
|
||||
item_error: Option<String>,
|
||||
) -> ThreadEpiphanyRoleFinding {
|
||||
let finding = interpret_role_finding(
|
||||
map_core_role_result_role_id(role_id),
|
||||
&raw_result,
|
||||
None,
|
||||
job_error,
|
||||
item_error,
|
||||
);
|
||||
map_protocol_role_finding(role_id, finding)
|
||||
}
|
||||
|
||||
pub fn map_protocol_role_finding(
|
||||
role_id: ThreadEpiphanyRoleId,
|
||||
finding: EpiphanyRoleFindingInterpretation,
|
||||
|
|
|
|||
|
|
@ -256,8 +256,6 @@ pub use surfaces::derive_pressure_view;
|
|||
pub use surfaces::derive_role_board;
|
||||
pub use surfaces::derive_scene;
|
||||
pub use surfaces::imagination_role_state_patch_policy_errors;
|
||||
pub use surfaces::interpret_reorient_finding;
|
||||
pub use surfaces::interpret_role_finding;
|
||||
pub use surfaces::interpret_runtime_reorient_worker_result;
|
||||
pub use surfaces::interpret_runtime_role_worker_result;
|
||||
pub use surfaces::modeling_role_state_patch_policy_errors;
|
||||
|
|
|
|||
|
|
@ -104,8 +104,6 @@ pub use role_result::EpiphanyRoleSelfPersistenceStatus;
|
|||
pub use role_result::build_reorient_acceptance_bundle;
|
||||
pub use role_result::build_role_acceptance_bundle;
|
||||
pub use role_result::imagination_role_state_patch_policy_errors;
|
||||
pub use role_result::interpret_reorient_finding;
|
||||
pub use role_result::interpret_role_finding;
|
||||
pub use role_result::interpret_runtime_reorient_worker_result;
|
||||
pub use role_result::interpret_runtime_role_worker_result;
|
||||
pub use role_result::modeling_role_state_patch_policy_errors;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,8 @@ pub struct EpiphanyReorientAcceptanceBundle {
|
|||
pub investigation_checkpoint: Option<EpiphanyInvestigationCheckpoint>,
|
||||
}
|
||||
|
||||
pub fn interpret_role_finding(
|
||||
#[cfg(test)]
|
||||
fn interpret_role_finding(
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
raw_result: &serde_json::Value,
|
||||
_legacy_state_patch_parse_error: Option<String>,
|
||||
|
|
@ -172,7 +173,8 @@ pub fn interpret_role_finding(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn interpret_reorient_finding(
|
||||
#[cfg(test)]
|
||||
fn interpret_reorient_finding(
|
||||
raw_result: &serde_json::Value,
|
||||
job_error: Option<String>,
|
||||
item_error: Option<String>,
|
||||
|
|
@ -468,6 +470,7 @@ pub fn review_role_self_patch(
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn decode_role_self_patch(
|
||||
role_id: EpiphanyRoleResultRoleId,
|
||||
patch: &serde_json::Value,
|
||||
|
|
@ -833,6 +836,7 @@ fn reorient_finding_investigation_checkpoint(
|
|||
checkpoint
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn json_string_field(value: &serde_json::Value, key: &str) -> Option<String> {
|
||||
value
|
||||
.get(key)
|
||||
|
|
@ -840,6 +844,7 @@ fn json_string_field(value: &serde_json::Value, key: &str) -> Option<String> {
|
|||
.map(str::to_string)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
fn json_string_array_field(value: &serde_json::Value, key: &str) -> Vec<String> {
|
||||
value
|
||||
.get(key)
|
||||
|
|
|
|||
|
|
@ -969,7 +969,10 @@ The typed worker-result boundary is now stricter. `roleResult` and
|
|||
CultCache documents to generic `EpiphanyRuntimeJobResult` lifecycle receipts.
|
||||
If a job completed without the typed worker-result document, the bridge reports
|
||||
backend-unavailable and names the missing document instead of laundering summary
|
||||
strings into a reviewable finding.
|
||||
strings into a reviewable finding. The old public bridge helpers that accepted
|
||||
raw JSON role/reorient findings are deleted; the only remaining raw-result
|
||||
interpreters in `epiphany-core` are private test fixtures for legacy contract
|
||||
coverage.
|
||||
|
||||
That husk has now been cut from `codex-core`. The root core crate no longer
|
||||
exports `plugins`, no longer depends on `codex-core-plugins` or `codex-plugin`,
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -288,5 +288,8 @@ current_status:
|
|||
completed runtime job without the typed worker-result CultCache document now
|
||||
reports backend-unavailable with a repair note instead of manufacturing a
|
||||
reviewable finding from summary strings. Generic runtime job results remain
|
||||
lifecycle receipts; reviewable specialist findings are typed documents.
|
||||
lifecycle receipts; reviewable specialist findings are typed documents. The
|
||||
unused bridge functions that accepted raw JSON findings were deleted, and
|
||||
the remaining raw-result interpreters are private test fixtures rather than
|
||||
public runtime API.
|
||||
next_action: Continue starving coordinator/runtime execution and operator surfaces off app-server JSON-RPC and out of `codex_message_processor.rs`; keep the vestigial Codex organ narrowed to subscription auth/model transport.
|
||||
|
|
|
|||
Reference in a new issue