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

@ -95,6 +95,7 @@ pub fn derive_coordinator_status(
research_continuation_action: input.research_continuation_action,
frontier_planning_stage: input.frontier_planning_stage,
proposal_modeling_request_ready: input.proposal_modeling_request_ready,
body_modeling_work_ready: input.body_modeling_work_ready,
});
EpiphanyCoordinatorStatus {
decision,
@ -705,6 +706,17 @@ pub fn recommend_coordinator_action(
);
}
if input.body_modeling_work_ready {
return build(
EpiphanyCoordinatorAction::LaunchModeling,
Some(EpiphanyCoordinatorRoleId::Modeling),
Some(EpiphanyCoordinatorSceneAction::RoleLaunch),
false,
true,
"The admitted repository Body has unresolved Modeling work; launch it from the keyed Mind obligation.",
);
}
if let Some(action) = input.research_continuation_action {
return match action {
RepoFrontierResearchContinuationAction::LaunchResearch => build(
@ -1365,6 +1377,7 @@ mod tests {
research_continuation_action: None,
frontier_planning_stage: RepoFrontierPlanningLifecycleStage::Unavailable,
proposal_modeling_request_ready: false,
body_modeling_work_ready: false,
}
}
@ -1454,6 +1467,20 @@ mod tests {
assert!(decision.can_auto_run);
}
#[test]
fn unresolved_body_work_routes_modeling_without_research_or_thread_state() {
let decision = recommend_coordinator_action(EpiphanyCoordinatorInput {
body_modeling_work_ready: true,
..input()
});
assert_eq!(decision.action, EpiphanyCoordinatorAction::LaunchModeling);
assert_eq!(
decision.target_role,
Some(EpiphanyCoordinatorRoleId::Modeling)
);
assert!(decision.can_auto_run);
}
fn finding(
runtime_result_id: &str,
runtime_job_id: &str,

View file

@ -166,6 +166,7 @@ pub struct EpiphanyCoordinatorInput {
pub frontier_planning_stage: RepoFrontierPlanningLifecycleStage,
/// True when an explicitly selected user proposal has no Modeling launch.
pub proposal_modeling_request_ready: bool,
pub body_modeling_work_ready: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
@ -217,6 +218,7 @@ pub struct EpiphanyCoordinatorStatusInput {
pub research_continuation_action: Option<RepoFrontierResearchContinuationAction>,
pub frontier_planning_stage: RepoFrontierPlanningLifecycleStage,
pub proposal_modeling_request_ready: bool,
pub body_modeling_work_ready: bool,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]