Route operator Body Modeling without thread state

This commit is contained in:
Meta Vens 2026-08-17 20:31:36 +02:00
commit 587c56d2b3
4 changed files with 64 additions and 14 deletions

View file

@ -959,19 +959,37 @@ fn run_coordinator(args: &Args) -> Result<Value> {
} else {
None
};
let launch = launch_role(
&runtime_store,
&local_verse_store,
&thread_id,
role_id,
revision,
args.max_runtime_seconds,
if role_id == "modeling" {
proposal_modeling_request_id
} else {
None
},
)?;
let launch = if role_id == "modeling"
&& proposal_modeling_request_id.is_none()
&& status["currentWork"]["bodyModeling"].is_object()
{
let binding = epiphany_core::launch_current_body_modeling_work(
&runtime_store,
epiphany_core::EpiphanyBodyModelingLaunchOptions {
job_id: Uuid::new_v4().to_string(),
created_at: now(),
},
)?;
json!({
"bindingId": epiphany_core::EPIPHANY_MODELING_ROLE_BINDING_ID,
"backendJobId": binding.job_id,
"bodyModelingLaunchBinding": binding,
})
} else {
launch_role(
&runtime_store,
&local_verse_store,
&thread_id,
role_id,
revision,
args.max_runtime_seconds,
if role_id == "modeling" {
proposal_modeling_request_id
} else {
None
},
)?
};
let worker_job_id = worker_job_id_from_launch(&launch)?;
push_event(
&mut step,

View file

@ -496,7 +496,9 @@ fn run_native_status(args: &Args, include_auxiliary_status: bool) -> Result<Valu
epiphany_core::runtime_repo_frontier_planning_lifecycle(&runtime_store_path)
.context("failed to derive frontier planning lifecycle from runtime-spine state")?;
if frontier_planning.stage != current_work.frontier_planning_stage {
return Err(anyhow!("current-work frontier planning projection diverged"));
return Err(anyhow!(
"current-work frontier planning projection diverged"
));
}
let frontier_relinquishment =
epiphany_core::runtime_latest_repo_frontier_relinquishment(&runtime_store_path)
@ -548,6 +550,7 @@ fn run_native_status(args: &Args, include_auxiliary_status: bool) -> Result<Valu
research_continuation_action,
frontier_planning_stage: frontier_planning.stage,
proposal_modeling_request_ready: pending_proposal.is_some(),
body_modeling_work_ready: current_work.body_modeling.is_some(),
});
let coordinator_json = coordinator_status_json(&coordinator)?;
let tool_invocations = native_tool_invocation_surface(&runtime_store_path)?;