From 6efa9d7451521c146458677f2eaa32eac481a57a Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 6 May 2026 13:26:49 +0100 Subject: [PATCH] Remove legacy job backend protocol surface --- state/ledgers.msgpack | Bin 48614 -> 48975 bytes .../src/protocol/common.rs | 65 +++++--------- .../app-server-protocol/src/protocol/v2.rs | 4 - .../app-server/src/codex_message_processor.rs | 81 ++---------------- .../codex/codex-rs/core/src/codex_thread.rs | 63 ++------------ .../codex/codex-rs/protocol/src/protocol.rs | 4 - vendor/codex/codex-rs/tools/README.md | 2 +- .../tools/src/tool_registry_plan_tests.rs | 6 +- 8 files changed, 40 insertions(+), 185 deletions(-) diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 8ddd4af36770c8b48020c0a37acdf36b5e28f9a4..45e9264f3beb62034890bd5e60e74b1cb32aa9fd 100644 GIT binary patch delta 348 zcmZut%Sr=55G45s6;CbVNfS2<=8#(u4~ig&Ab1JAGrgPE*_magH;7I4cUfS)Yo%!s3`+Dn?N;e`6G9)k<1P&^$hG?fyc_&Ue1Im>Z3TJFsrVwhMqaw(i z2WK>3K~~_>WuXWCB|eG}GE`S&HH^?RS_wPgYb#vR;8#D0`T=V=&zX#l+rO}!CsKQg zR1h=-;$j1f<&wc@XsAFHTZm^{gf_%9$k^)T1lEl~&=)lSSgapAYo;(Ba&$SV$o3C+ g_noE*U>%Q*WmG)MS@2XM+W>3@m9%f3|M}I$4}&XydjJ3c delta 45 zcmX^AkLlTOrU{Bnd)IALp2o;nx_K9)*dDQlEk*`LX1WHZx&~$;hK5!qmR6=FQ2?qP B4}|~# diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs index 732ac72a..532f1ff8 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/common.rs @@ -1908,7 +1908,6 @@ mod tests { backend_kind: None, backend_job_id: None, status: v2::ThreadEpiphanyJobStatus::Needed, - runtime_agent_job_id: None, items_processed: Some(12), items_total: None, progress_note: Some( @@ -1979,7 +1978,6 @@ mod tests { backend_kind: None, backend_job_id: None, status: v2::ThreadEpiphanyJobStatus::Needed, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -2137,14 +2135,13 @@ mod tests { launcher_job_id: Some("epiphany-launch-1".to_string()), authority_scope: Some("epiphany.role.modeling".to_string()), backend_kind: Some( - codex_protocol::protocol::EpiphanyJobBackendKind::AgentJobs, + codex_protocol::protocol::EpiphanyJobBackendKind::Heartbeat, ), backend_job_id: Some("backend-1".to_string()), - runtime_agent_job_id: Some("backend-1".to_string()), linked_subgoal_ids: vec!["phase-6".to_string()], linked_graph_node_ids: vec!["state-spine".to_string()], progress_note: Some( - "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend." + "Explicitly launched through the Epiphany authority surface onto the heartbeat backend." .to_string(), ), blocking_reason: None, @@ -2158,14 +2155,13 @@ mod tests { owner_role: "epiphany-modeler".to_string(), launcher_job_id: Some("epiphany-launch-1".to_string()), authority_scope: Some("epiphany.role.modeling".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("backend-1".to_string()), status: v2::ThreadEpiphanyJobStatus::Pending, - runtime_agent_job_id: Some("backend-1".to_string()), items_processed: None, items_total: None, progress_note: Some( - "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend." + "Explicitly launched through the Epiphany authority surface onto the heartbeat backend." .to_string(), ), last_checkpoint_at_unix_seconds: None, @@ -2197,12 +2193,11 @@ mod tests { "owner_role": "epiphany-modeler", "launcher_job_id": "epiphany-launch-1", "authority_scope": "epiphany.role.modeling", - "backend_kind": "agent_jobs", + "backend_kind": "heartbeat", "backend_job_id": "backend-1", - "runtime_agent_job_id": "backend-1", "linked_subgoal_ids": ["phase-6"], "linked_graph_node_ids": ["state-spine"], - "progress_note": "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend." + "progress_note": "Explicitly launched through the Epiphany authority surface onto the heartbeat backend." }] }, "job": { @@ -2215,8 +2210,7 @@ mod tests { "backendKind": "agentJobs", "backendJobId": "backend-1", "status": "pending", - "runtimeAgentJobId": "backend-1", - "progressNote": "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend.", + "progressNote": "Explicitly launched through the Epiphany authority surface onto the heartbeat backend.", "linkedSubgoalIds": ["phase-6"], "linkedGraphNodeIds": ["state-spine"] } @@ -2246,10 +2240,9 @@ mod tests { owner_role: "epiphany-verifier".to_string(), launcher_job_id: Some("epiphany-launch-2".to_string()), authority_scope: Some("epiphany.role.verification".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("backend-2".to_string()), status: v2::ThreadEpiphanyJobStatus::Completed, - runtime_agent_job_id: Some("backend-2".to_string()), items_processed: Some(1), items_total: Some(1), progress_note: Some("1/1 items completed.".to_string()), @@ -2312,7 +2305,6 @@ mod tests { "backendKind": "agentJobs", "backendJobId": "backend-2", "status": "completed", - "runtimeAgentJobId": "backend-2", "itemsProcessed": 1, "itemsTotal": 1, "progressNote": "1/1 items completed.", @@ -3212,14 +3204,13 @@ mod tests { launcher_job_id: Some("epiphany-launch-1".to_string()), authority_scope: Some("epiphany.reorient.regather".to_string()), backend_kind: Some( - codex_protocol::protocol::EpiphanyJobBackendKind::AgentJobs, + codex_protocol::protocol::EpiphanyJobBackendKind::Heartbeat, ), backend_job_id: Some("backend-1".to_string()), - runtime_agent_job_id: Some("backend-1".to_string()), linked_subgoal_ids: vec!["phase-6".to_string()], linked_graph_node_ids: vec!["state-spine".to_string()], progress_note: Some( - "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend." + "Explicitly launched through the Epiphany authority surface onto the heartbeat backend." .to_string(), ), blocking_reason: None, @@ -3233,14 +3224,13 @@ mod tests { owner_role: "epiphany-reorient".to_string(), launcher_job_id: Some("epiphany-launch-1".to_string()), authority_scope: Some("epiphany.reorient.regather".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("backend-1".to_string()), status: v2::ThreadEpiphanyJobStatus::Pending, - runtime_agent_job_id: Some("backend-1".to_string()), items_processed: None, items_total: None, progress_note: Some( - "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend." + "Explicitly launched through the Epiphany authority surface onto the heartbeat backend." .to_string(), ), last_checkpoint_at_unix_seconds: None, @@ -3292,12 +3282,11 @@ mod tests { "owner_role": "epiphany-reorient", "launcher_job_id": "epiphany-launch-1", "authority_scope": "epiphany.reorient.regather", - "backend_kind": "agent_jobs", + "backend_kind": "heartbeat", "backend_job_id": "backend-1", - "runtime_agent_job_id": "backend-1", "linked_subgoal_ids": ["phase-6"], "linked_graph_node_ids": ["state-spine"], - "progress_note": "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend." + "progress_note": "Explicitly launched through the Epiphany authority surface onto the heartbeat backend." }] }, "job": { @@ -3310,8 +3299,7 @@ mod tests { "backendKind": "agentJobs", "backendJobId": "backend-1", "status": "pending", - "runtimeAgentJobId": "backend-1", - "progressNote": "Explicitly launched through the Epiphany authority surface onto the agent_jobs backend.", + "progressNote": "Explicitly launched through the Epiphany authority surface onto the heartbeat backend.", "linkedSubgoalIds": ["phase-6"], "linkedGraphNodeIds": ["state-spine"] } @@ -3340,10 +3328,9 @@ mod tests { owner_role: "epiphany-reorient".to_string(), launcher_job_id: Some("epiphany-launch-1".to_string()), authority_scope: Some("epiphany.reorient.resume".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("backend-1".to_string()), status: v2::ThreadEpiphanyJobStatus::Completed, - runtime_agent_job_id: Some("backend-1".to_string()), items_processed: Some(1), items_total: Some(1), progress_note: Some("1/1 items completed.".to_string()), @@ -3399,7 +3386,6 @@ mod tests { "backendKind": "agentJobs", "backendJobId": "backend-1", "status": "completed", - "runtimeAgentJobId": "backend-1", "itemsProcessed": 1, "itemsTotal": 1, "progressNote": "1/1 items completed.", @@ -3820,10 +3806,9 @@ mod tests { launcher_job_id: Some("launcher-specialist".to_string()), authority_scope: Some("epiphany.specialist".to_string()), backend_kind: Some( - codex_protocol::protocol::EpiphanyJobBackendKind::AgentJobs, + codex_protocol::protocol::EpiphanyJobBackendKind::Heartbeat, ), backend_job_id: Some("job-123".to_string()), - runtime_agent_job_id: Some("job-123".to_string()), linked_subgoal_ids: Vec::new(), linked_graph_node_ids: Vec::new(), progress_note: Some("Launched explicitly.".to_string()), @@ -3838,10 +3823,9 @@ mod tests { owner_role: "epiphany-harness".to_string(), launcher_job_id: Some("launcher-specialist".to_string()), authority_scope: Some("epiphany.specialist".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("job-123".to_string()), status: v2::ThreadEpiphanyJobStatus::Pending, - runtime_agent_job_id: Some("job-123".to_string()), items_processed: None, items_total: None, progress_note: Some("Runtime agent job is pending.".to_string()), @@ -3872,9 +3856,8 @@ mod tests { "owner_role": "epiphany-harness", "launcher_job_id": "launcher-specialist", "authority_scope": "epiphany.specialist", - "backend_kind": "agent_jobs", + "backend_kind": "heartbeat", "backend_job_id": "job-123", - "runtime_agent_job_id": "job-123", "progress_note": "Launched explicitly." }] }, @@ -3888,7 +3871,6 @@ mod tests { "backendKind": "agentJobs", "backendJobId": "job-123", "status": "pending", - "runtimeAgentJobId": "job-123", "progressNote": "Runtime agent job is pending." } } @@ -3918,7 +3900,6 @@ mod tests { authority_scope: Some("epiphany.specialist".to_string()), backend_kind: None, backend_job_id: None, - runtime_agent_job_id: None, linked_subgoal_ids: Vec::new(), linked_graph_node_ids: Vec::new(), progress_note: None, @@ -3938,7 +3919,6 @@ mod tests { backend_kind: None, backend_job_id: None, status: v2::ThreadEpiphanyJobStatus::Blocked, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -4109,10 +4089,9 @@ mod tests { owner_role: "epiphany-harness".to_string(), launcher_job_id: Some("launcher-specialist".to_string()), authority_scope: Some("epiphany.specialist".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("job-123".to_string()), status: v2::ThreadEpiphanyJobStatus::Running, - runtime_agent_job_id: Some("job-123".to_string()), items_processed: Some(1), items_total: Some(3), progress_note: Some("Runtime agent job is running.".to_string()), @@ -4141,7 +4120,6 @@ mod tests { "backendKind": "agentJobs", "backendJobId": "job-123", "status": "running", - "runtimeAgentJobId": "job-123", "itemsProcessed": 1, "itemsTotal": 3, "progressNote": "Runtime agent job is running.", @@ -5034,10 +5012,9 @@ mod tests { owner_role: "epiphany-harness".to_string(), launcher_job_id: Some("launcher-specialist".to_string()), authority_scope: Some("epiphany.specialist".to_string()), - backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(v2::ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("job-123".to_string()), status: v2::ThreadEpiphanyJobStatus::Running, - runtime_agent_job_id: Some("job-123".to_string()), items_processed: Some(1), items_total: Some(3), progress_note: Some("Runtime agent job is running.".to_string()), diff --git a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs index a2c4d9dc..7d5c5c0e 100644 --- a/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/vendor/codex/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -4617,7 +4617,6 @@ pub enum ThreadEpiphanyJobKind { #[serde(rename_all = "camelCase")] #[ts(export_to = "v2/")] pub enum ThreadEpiphanyJobBackendKind { - AgentJobs, Heartbeat, } @@ -4659,9 +4658,6 @@ pub struct ThreadEpiphanyJob { pub status: ThreadEpiphanyJobStatus, #[serde(default, skip_serializing_if = "Option::is_none")] #[ts(optional = nullable)] - pub runtime_agent_job_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(optional = nullable)] pub items_processed: Option, #[serde(default, skip_serializing_if = "Option::is_none")] #[ts(optional = nullable)] diff --git a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs index 7f53fe5a..d893effa 100644 --- a/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs +++ b/vendor/codex/codex-rs/app-server/src/codex_message_processor.rs @@ -4885,7 +4885,6 @@ impl CodexMessageProcessor { backend_kind: Some(ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some(launched.backend_job_id.clone()), status: ThreadEpiphanyJobStatus::Pending, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -6804,7 +6803,6 @@ impl CodexMessageProcessor { backend_kind: Some(ThreadEpiphanyJobBackendKind::Heartbeat), backend_job_id: Some(launched.backend_job_id.clone()), status: ThreadEpiphanyJobStatus::Pending, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -14484,7 +14482,7 @@ async fn load_epiphany_role_result_snapshot( ( ThreadEpiphanyRoleResultStatus::BackendUnavailable, None, - "Legacy agent_jobs role bindings are sealed; launch a heartbeat-backed role worker for typed runtime-spine results.".to_string(), + "Non-heartbeat role bindings are unsupported; launch a heartbeat-backed role worker for typed runtime-spine results.".to_string(), ) } @@ -14522,7 +14520,7 @@ async fn load_epiphany_reorient_result_snapshot( ( ThreadEpiphanyReorientResultStatus::BackendUnavailable, None, - "Legacy agent_jobs reorientation bindings are sealed; launch a heartbeat-backed reorient worker for typed runtime-spine results.".to_string(), + "Non-heartbeat reorientation bindings are unsupported; launch a heartbeat-backed reorient worker for typed runtime-spine results.".to_string(), ) } @@ -15555,7 +15553,7 @@ async fn load_completed_epiphany_reorient_finding( } Err(CodexErr::InvalidRequest( - "legacy agent_jobs reorientation findings are sealed; accept only typed runtime-spine heartbeat results" + "non-heartbeat reorientation findings are unsupported; accept only typed runtime-spine heartbeat results" .to_string(), )) } @@ -15598,7 +15596,7 @@ async fn load_completed_epiphany_role_finding( } Err(CodexErr::InvalidRequest( - "legacy agent_jobs role findings are sealed; accept only typed runtime-spine heartbeat results" + "non-heartbeat role findings are unsupported; accept only typed runtime-spine heartbeat results" .to_string(), )) } @@ -17319,10 +17317,7 @@ fn binding_backend_kind(binding: &EpiphanyJobBinding) -> Option Option<&str> { - binding - .backend_job_id - .as_deref() - .or(binding.runtime_agent_job_id.as_deref()) + binding.backend_job_id.as_deref() } pub(crate) async fn maybe_run_epiphany_coordinator_automation_for_turn_boundary( @@ -17631,7 +17626,6 @@ fn map_epiphany_bound_job(binding: &EpiphanyJobBinding) -> ThreadEpiphanyJob { } else { ThreadEpiphanyJobStatus::Idle }, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -17656,7 +17650,6 @@ fn overlay_epiphany_job_binding( job.authority_scope = binding.authority_scope.clone(); job.backend_kind = binding_backend_kind(binding).map(map_core_epiphany_job_backend_kind); job.backend_job_id = binding_projected_backend_job_id(binding).map(str::to_string); - job.runtime_agent_job_id = None; if !binding.linked_subgoal_ids.is_empty() { job.linked_subgoal_ids = binding.linked_subgoal_ids.clone(); } @@ -17688,20 +17681,13 @@ fn overlay_epiphany_job_binding( return job; } - if binding_backend_kind(binding) == Some(CoreEpiphanyJobBackendKind::AgentJobs) { - job.status = ThreadEpiphanyJobStatus::Blocked; - job.blocking_reason = Some(format!( - "Legacy agent_jobs binding is sealed; Epiphany activation now belongs to heartbeat/runtime-spine." - )); - } - job } fn binding_projected_backend_job_id(binding: &EpiphanyJobBinding) -> Option<&str> { match binding_backend_kind(binding) { Some(CoreEpiphanyJobBackendKind::Heartbeat) => binding_backend_job_id(binding), - Some(CoreEpiphanyJobBackendKind::AgentJobs) | None => None, + None => None, } } @@ -17709,7 +17695,6 @@ fn map_core_epiphany_job_backend_kind( kind: CoreEpiphanyJobBackendKind, ) -> ThreadEpiphanyJobBackendKind { match kind { - CoreEpiphanyJobBackendKind::AgentJobs => ThreadEpiphanyJobBackendKind::AgentJobs, CoreEpiphanyJobBackendKind::Heartbeat => ThreadEpiphanyJobBackendKind::Heartbeat, } } @@ -17744,7 +17729,6 @@ fn map_epiphany_index_job( backend_kind: None, backend_job_id: None, status: ThreadEpiphanyJobStatus::Unavailable, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -17781,7 +17765,6 @@ fn map_epiphany_index_job( backend_kind: None, backend_job_id: None, status: epiphany_job_status_from_retrieval_status(retrieval.status), - runtime_agent_job_id: None, items_processed: retrieval.indexed_file_count, items_total: None, progress_note: Some(progress_note), @@ -17852,7 +17835,6 @@ fn map_epiphany_remap_job(state: Option<&EpiphanyThreadState>) -> ThreadEpiphany } else { ThreadEpiphanyJobStatus::Idle }, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: Some(progress_note), @@ -17903,7 +17885,6 @@ fn map_epiphany_verification_job(state: Option<&EpiphanyThreadState>) -> ThreadE backend_kind: None, backend_job_id: None, status, - runtime_agent_job_id: None, items_processed: Some(verified), items_total: Some(total), progress_note: Some(progress_note), @@ -17926,7 +17907,6 @@ fn map_epiphany_specialist_job() -> ThreadEpiphanyJob { backend_kind: None, backend_job_id: None, status: ThreadEpiphanyJobStatus::Unavailable, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -17957,7 +17937,6 @@ fn epiphany_blocked_state_job( backend_kind: None, backend_job_id: None, status: ThreadEpiphanyJobStatus::Blocked, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: None, @@ -20168,9 +20147,8 @@ mod tests { owner_role: EPIPHANY_REORIENT_OWNER_ROLE.to_string(), launcher_job_id: Some("launcher-1".to_string()), authority_scope: Some("epiphany.reorient.resume".to_string()), - backend_kind: Some(codex_protocol::protocol::EpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(codex_protocol::protocol::EpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("backend-1".to_string()), - runtime_agent_job_id: None, linked_subgoal_ids: Vec::new(), linked_graph_node_ids: Vec::new(), progress_note: None, @@ -20480,7 +20458,6 @@ mod tests { backend_kind: None, backend_job_id: None, status: ThreadEpiphanyJobStatus::Needed, - runtime_agent_job_id: None, items_processed: None, items_total: None, progress_note: Some("Evidence needs review.".to_string()), @@ -22728,7 +22705,7 @@ mod tests { } #[test] - fn map_epiphany_jobs_projects_heartbeat_binding_as_pending_without_agent_jobs() { + fn map_epiphany_jobs_projects_heartbeat_binding_as_pending() { let state = codex_protocol::protocol::EpiphanyThreadState { job_bindings: vec![codex_protocol::protocol::EpiphanyJobBinding { id: "modeling-checkpoint-worker".to_string(), @@ -22739,7 +22716,6 @@ mod tests { authority_scope: Some("epiphany.role.modeling".to_string()), backend_kind: Some(codex_protocol::protocol::EpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("heartbeat-turn-1".to_string()), - runtime_agent_job_id: None, linked_subgoal_ids: vec!["phase-6".to_string()], linked_graph_node_ids: vec!["runtime-spine".to_string()], progress_note: Some( @@ -22770,7 +22746,6 @@ mod tests { specialist.backend_job_id.as_deref(), Some("heartbeat-turn-1") ); - assert_eq!(specialist.runtime_agent_job_id, None); assert_eq!(specialist.blocking_reason, None); assert!( specialist @@ -22839,7 +22814,6 @@ mod tests { authority_scope: Some("epiphany.role.modeling".to_string()), backend_kind: Some(codex_protocol::protocol::EpiphanyJobBackendKind::Heartbeat), backend_job_id: Some("heartbeat-job-1".to_string()), - runtime_agent_job_id: None, linked_subgoal_ids: Vec::new(), linked_graph_node_ids: Vec::new(), progress_note: None, @@ -22859,43 +22833,6 @@ mod tests { assert!(note.contains("Modeling role specialist completed")); } - #[test] - fn map_epiphany_jobs_blocks_missing_bound_runtime_agent_job() { - let state = codex_protocol::protocol::EpiphanyThreadState { - job_bindings: vec![codex_protocol::protocol::EpiphanyJobBinding { - id: "specialist-work".to_string(), - kind: codex_protocol::protocol::EpiphanyJobKind::Specialist, - scope: "role-scoped specialist work".to_string(), - owner_role: "epiphany-harness".to_string(), - launcher_job_id: Some("launcher-specialist-missing".to_string()), - authority_scope: Some("epiphany.specialist".to_string()), - backend_kind: Some(codex_protocol::protocol::EpiphanyJobBackendKind::AgentJobs), - backend_job_id: Some("job-missing".to_string()), - runtime_agent_job_id: Some("job-missing".to_string()), - linked_subgoal_ids: Vec::new(), - linked_graph_node_ids: Vec::new(), - progress_note: None, - blocking_reason: None, - }], - ..Default::default() - }; - let resolution = EpiphanyJobLauncherResolution::default(); - - let jobs = map_epiphany_jobs(Some(&state), None, &resolution); - let specialist = jobs - .iter() - .find(|job| job.id == "specialist-work") - .expect("specialist slot should exist"); - - assert_eq!(specialist.status, ThreadEpiphanyJobStatus::Blocked); - assert!( - specialist - .blocking_reason - .as_deref() - .is_some_and(|reason| reason.contains("activation now belongs to heartbeat")) - ); - } - #[test] fn map_epiphany_jobs_blocks_binding_after_interrupt_clears_backend() { let state = codex_protocol::protocol::EpiphanyThreadState { @@ -22908,7 +22845,6 @@ mod tests { authority_scope: Some("epiphany.specialist".to_string()), backend_kind: None, backend_job_id: None, - runtime_agent_job_id: None, linked_subgoal_ids: vec!["phase-6".to_string()], linked_graph_node_ids: vec!["job-control".to_string()], progress_note: None, @@ -22938,7 +22874,6 @@ mod tests { assert_eq!(specialist.launcher_job_id, None); assert_eq!(specialist.backend_kind, None); assert_eq!(specialist.backend_job_id, None); - assert_eq!(specialist.runtime_agent_job_id, None); assert_eq!(specialist.linked_subgoal_ids, vec!["phase-6".to_string()]); assert_eq!( specialist.linked_graph_node_ids, diff --git a/vendor/codex/codex-rs/core/src/codex_thread.rs b/vendor/codex/codex-rs/core/src/codex_thread.rs index 8882d223..0fc3a2bc 100644 --- a/vendor/codex/codex-rs/core/src/codex_thread.rs +++ b/vendor/codex/codex-rs/core/src/codex_thread.rs @@ -851,7 +851,6 @@ fn build_epiphany_job_launch_binding( authority_scope: Some(request.authority_scope.clone()), backend_kind: Some(EpiphanyJobBackendKind::Heartbeat), backend_job_id: Some(backend_job_id.to_string()), - runtime_agent_job_id: None, linked_subgoal_ids: request.linked_subgoal_ids.clone(), linked_graph_node_ids: request.linked_graph_node_ids.clone(), progress_note: Some( @@ -950,17 +949,13 @@ fn clear_epiphany_job_binding_backend( binding.launcher_job_id = None; binding.backend_kind = None; binding.backend_job_id = None; - binding.runtime_agent_job_id = None; binding.progress_note = None; binding.blocking_reason = Some(blocking_reason.to_string()); bindings } fn binding_backend_job_id_core(binding: &EpiphanyJobBinding) -> Option<&str> { - binding - .backend_job_id - .as_deref() - .or(binding.runtime_agent_job_id.as_deref()) + binding.backend_job_id.as_deref() } fn epiphany_state_update_validation_errors( @@ -1083,13 +1078,6 @@ fn validate_epiphany_job_bindings(job_bindings: &[EpiphanyJobBinding]) -> Vec Vec {} } - if let ( - Some(EpiphanyJobBackendKind::AgentJobs), - Some(backend_job_id), - Some(runtime_agent_job_id), - ) = ( - binding.backend_kind, - binding.backend_job_id.as_deref(), - binding.runtime_agent_job_id.as_deref(), - ) && backend_job_id != runtime_agent_job_id - { - errors.push(format!( - "job binding {:?} sets mismatched agent_jobs ids across backend_job_id and runtime_agent_job_id", - binding.id - )); - } if !binding.id.is_empty() && !seen_ids.insert(binding.id.as_str()) { errors.push(format!("duplicate job binding id {:?}", binding.id)); } @@ -1438,12 +1411,11 @@ mod epiphany_update_tests { owner_role: "epiphany-harness".to_string(), launcher_job_id: Some(format!("launcher-{id}")), authority_scope: Some("epiphany.specialist".to_string()), - backend_kind: Some(EpiphanyJobBackendKind::AgentJobs), - backend_job_id: Some(format!("agent-job-{id}")), - runtime_agent_job_id: Some(format!("agent-job-{id}")), + backend_kind: Some(EpiphanyJobBackendKind::Heartbeat), + backend_job_id: Some(format!("heartbeat-job-{id}")), linked_subgoal_ids: vec!["phase-6".to_string()], linked_graph_node_ids: vec!["job-surface".to_string()], - progress_note: Some("Bound to a real runtime agent job.".to_string()), + progress_note: Some("Bound to a heartbeat runtime-spine job.".to_string()), blocking_reason: None, } } @@ -1542,8 +1514,8 @@ mod epiphany_update_tests { Some("epiphany.specialist") ); assert_eq!( - state.job_bindings[0].runtime_agent_job_id.as_deref(), - Some("agent-job-new") + state.job_bindings[0].backend_job_id.as_deref(), + Some("heartbeat-job-new") ); assert_eq!(state.last_updated_turn_id.as_deref(), Some("turn-jobs")); } @@ -1853,9 +1825,8 @@ mod epiphany_update_tests { owner_role: String::new(), launcher_job_id: Some(String::new()), authority_scope: Some(String::new()), - backend_kind: Some(EpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(EpiphanyJobBackendKind::Heartbeat), backend_job_id: Some(String::new()), - runtime_agent_job_id: Some(String::new()), linked_subgoal_ids: Vec::new(), linked_graph_node_ids: Vec::new(), progress_note: Some(String::new()), @@ -1888,11 +1859,6 @@ mod epiphany_update_tests { .iter() .any(|error| error.contains("job_binding.owner_role must not be empty")) ); - assert!( - errors - .iter() - .any(|error| error.contains("job_binding.runtime_agent_job_id must not be empty")) - ); assert!( errors .iter() @@ -1925,22 +1891,15 @@ mod epiphany_update_tests { let update = EpiphanyStateUpdate { job_bindings: Some(vec![ EpiphanyJobBinding { - backend_kind: Some(EpiphanyJobBackendKind::AgentJobs), + backend_kind: Some(EpiphanyJobBackendKind::Heartbeat), backend_job_id: None, ..job_binding("missing-backend-job-id") }, EpiphanyJobBinding { backend_kind: None, - backend_job_id: Some("agent-job-orphan".to_string()), - runtime_agent_job_id: None, + backend_job_id: Some("heartbeat-job-orphan".to_string()), ..job_binding("orphan-backend-job-id") }, - EpiphanyJobBinding { - backend_kind: Some(EpiphanyJobBackendKind::AgentJobs), - backend_job_id: Some("agent-job-backend".to_string()), - runtime_agent_job_id: Some("agent-job-legacy".to_string()), - ..job_binding("mismatched-ids") - }, ]), ..Default::default() }; @@ -1956,9 +1915,6 @@ mod epiphany_update_tests { error.contains("backend_job_id without backend_kind") && error.contains("orphan-backend-job-id") })); - assert!(errors.iter().any(|error| { - error.contains("mismatched agent_jobs ids") && error.contains("mismatched-ids") - })); } #[test] @@ -1986,7 +1942,6 @@ mod epiphany_update_tests { Some(EpiphanyJobBackendKind::Heartbeat) ); assert_eq!(binding.backend_job_id.as_deref(), Some("turn-1")); - assert_eq!(binding.runtime_agent_job_id, None); assert!( binding .progress_note diff --git a/vendor/codex/codex-rs/protocol/src/protocol.rs b/vendor/codex/codex-rs/protocol/src/protocol.rs index 9015e35b..8f629ca0 100644 --- a/vendor/codex/codex-rs/protocol/src/protocol.rs +++ b/vendor/codex/codex-rs/protocol/src/protocol.rs @@ -3316,7 +3316,6 @@ pub enum EpiphanyJobKind { #[serde(rename_all = "snake_case")] #[ts(rename_all = "snake_case")] pub enum EpiphanyJobBackendKind { - AgentJobs, Heartbeat, } @@ -3338,9 +3337,6 @@ pub struct EpiphanyJobBinding { #[serde(default, skip_serializing_if = "Option::is_none")] #[ts(type = "string | null")] pub backend_job_id: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] - #[ts(type = "string | null")] - pub runtime_agent_job_id: Option, #[serde(default, skip_serializing_if = "Vec::is_empty")] #[ts(type = "Array")] pub linked_subgoal_ids: Vec, diff --git a/vendor/codex/codex-rs/tools/README.md b/vendor/codex/codex-rs/tools/README.md index 474f35e6..5416e7f2 100644 --- a/vendor/codex/codex-rs/tools/README.md +++ b/vendor/codex/codex-rs/tools/README.md @@ -25,7 +25,7 @@ schema and Responses API tool primitives that no longer need to live in - JS REPL spec builders - MCP resource, `list_dir`, and `test_sync_tool` spec builders - local host tool spec builders for shell/exec/request-permissions/view-image -- collaboration and agent-job `ToolSpec` builders for spawn/send/wait/close, +- collaboration `ToolSpec` builders for spawn/send/wait/close, `request_user_input`, and CSV fanout/reporting - discoverable-tool models, client filtering, and `ToolSpec` builders for `tool_search` and `tool_suggest` diff --git a/vendor/codex/codex-rs/tools/src/tool_registry_plan_tests.rs b/vendor/codex/codex-rs/tools/src/tool_registry_plan_tests.rs index 021bb35b..14d0202b 100644 --- a/vendor/codex/codex-rs/tools/src/tool_registry_plan_tests.rs +++ b/vendor/codex/codex-rs/tools/src/tool_registry_plan_tests.rs @@ -32,7 +32,6 @@ use codex_protocol::openai_models::ModelInfo; use codex_protocol::openai_models::WebSearchToolType; use codex_protocol::protocol::SandboxPolicy; use codex_protocol::protocol::SessionSource; -use codex_protocol::protocol::SubAgentSource; use pretty_assertions::assert_eq; use serde_json::json; use std::collections::BTreeMap; @@ -174,7 +173,6 @@ fn test_build_specs_collab_tools_enabled() { &tools, &["spawn_agent", "send_input", "wait_agent", "close_agent"], ); - assert_lacks_tool_name(&tools, "spawn_agents_on_csv"); assert_lacks_tool_name(&tools, "list_agents"); let spawn_agent = find_tool(&tools, "spawn_agent"); @@ -330,7 +328,7 @@ fn test_build_specs_multi_agent_v2_uses_task_names_and_hides_resume() { } #[test] -fn test_build_specs_multi_agent_omits_agent_jobs() { +fn test_build_specs_multi_agent_exposes_collab_tools_only() { let model_info = model_info(); let mut features = Features::with_defaults(); features.normalize_dependencies(); @@ -356,8 +354,6 @@ fn test_build_specs_multi_agent_omits_agent_jobs() { &tools, &["spawn_agent", "send_input", "wait_agent", "close_agent"], ); - assert_lacks_tool_name(&tools, "spawn_agents_on_csv"); - assert_lacks_tool_name(&tools, "report_agent_job_result"); } #[test]