Route Research from exact lifecycle
This commit is contained in:
parent
40beb6a99c
commit
08383c6d6e
3 changed files with 38 additions and 32 deletions
|
|
@ -480,10 +480,7 @@ fn run_native_status(args: &Args, include_auxiliary_status: bool) -> Result<Valu
|
|||
.context("failed to derive actionable Hands frontier from runtime-spine state")?;
|
||||
let research_lifecycle = runtime_repo_frontier_research_lifecycle(&runtime_store_path)
|
||||
.context("failed to derive exact Eyes frontier lifecycle from runtime-spine state")?;
|
||||
let eyes_frontier_ready = matches!(
|
||||
research_lifecycle.continuation_action(),
|
||||
Some(epiphany_core::RepoFrontierResearchContinuationAction::LaunchResearch)
|
||||
);
|
||||
let research_continuation_action = research_lifecycle.continuation_action();
|
||||
let frontier_planning_eligibility = epiphany_core::runtime_repo_frontier_planning_eligibility(
|
||||
&runtime_store_path,
|
||||
)
|
||||
|
|
@ -545,7 +542,7 @@ fn run_native_status(args: &Args, include_auxiliary_status: bool) -> Result<Valu
|
|||
verification_result_needs_evidence: finding_signals.verification_result_needs_evidence,
|
||||
reorient_finding_accepted: finding_signals.reorient_finding_accepted,
|
||||
hands_frontier_ready,
|
||||
eyes_frontier_ready,
|
||||
research_continuation_action,
|
||||
frontier_planning_stage: frontier_planning.stage,
|
||||
proposal_modeling_request_ready: pending_proposal.is_some(),
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ use epiphany_core::EpiphanyReorientFindingInterpretation;
|
|||
use epiphany_core::EpiphanyRoleBoardLane;
|
||||
use epiphany_core::EpiphanyRoleFindingInterpretation;
|
||||
use epiphany_core::RepoFrontierPlanningLifecycleStage;
|
||||
use epiphany_core::RepoFrontierResearchContinuationAction;
|
||||
use epiphany_core::modeling_role_state_patch_policy_errors;
|
||||
use epiphany_core::research_role_state_patch_policy_errors;
|
||||
use epiphany_state_model::EpiphanyThreadState;
|
||||
|
|
@ -91,7 +92,7 @@ pub fn derive_coordinator_status(
|
|||
verification_result_needs_evidence: input.verification_result_needs_evidence,
|
||||
reorient_finding_accepted: input.reorient_finding_accepted,
|
||||
hands_frontier_ready: input.hands_frontier_ready,
|
||||
eyes_frontier_ready: input.eyes_frontier_ready,
|
||||
research_continuation_action: input.research_continuation_action,
|
||||
frontier_planning_stage: input.frontier_planning_stage,
|
||||
proposal_modeling_request_ready: input.proposal_modeling_request_ready,
|
||||
});
|
||||
|
|
@ -700,6 +701,27 @@ pub fn recommend_coordinator_action(
|
|||
);
|
||||
}
|
||||
|
||||
if let Some(action) = input.research_continuation_action {
|
||||
return match action {
|
||||
RepoFrontierResearchContinuationAction::LaunchResearch => build(
|
||||
EpiphanyCoordinatorAction::LaunchResearch,
|
||||
Some(EpiphanyCoordinatorRoleId::Research),
|
||||
Some(EpiphanyCoordinatorSceneAction::RoleLaunch),
|
||||
false,
|
||||
true,
|
||||
"The exact frontier Research lifecycle requires another bounded attempt.",
|
||||
),
|
||||
RepoFrontierResearchContinuationAction::ReviewResearchResult => build(
|
||||
EpiphanyCoordinatorAction::ReviewResearchResult,
|
||||
Some(EpiphanyCoordinatorRoleId::Research),
|
||||
Some(EpiphanyCoordinatorSceneAction::RoleResult),
|
||||
true,
|
||||
false,
|
||||
"The exact frontier Research lifecycle has one terminal result awaiting review.",
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
if input.signals.research_result_status == EpiphanyCoordinatorRoleResultStatus::Completed
|
||||
&& !input.research_result_accepted
|
||||
{
|
||||
|
|
@ -1138,23 +1160,6 @@ pub fn recommend_coordinator_action(
|
|||
);
|
||||
}
|
||||
|
||||
if input.eyes_frontier_ready
|
||||
&& !matches!(
|
||||
input.signals.research_result_status,
|
||||
EpiphanyCoordinatorRoleResultStatus::Pending
|
||||
| EpiphanyCoordinatorRoleResultStatus::Running
|
||||
)
|
||||
{
|
||||
return build(
|
||||
EpiphanyCoordinatorAction::LaunchResearch,
|
||||
Some(EpiphanyCoordinatorRoleId::Research),
|
||||
Some(EpiphanyCoordinatorSceneAction::RoleLaunch),
|
||||
false,
|
||||
true,
|
||||
"Mind has admitted an actionable Eyes frontier; launch Research against that source-gathering authority.",
|
||||
);
|
||||
}
|
||||
|
||||
if input.signals.verification_result_status == EpiphanyCoordinatorRoleResultStatus::Completed
|
||||
&& input.verification_result_accepted
|
||||
&& !input.verification_result_allows_implementation
|
||||
|
|
@ -1353,7 +1358,7 @@ mod tests {
|
|||
verification_result_needs_evidence: false,
|
||||
reorient_finding_accepted: false,
|
||||
hands_frontier_ready: false,
|
||||
eyes_frontier_ready: false,
|
||||
research_continuation_action: None,
|
||||
frontier_planning_stage: RepoFrontierPlanningLifecycleStage::Unavailable,
|
||||
proposal_modeling_request_ready: false,
|
||||
}
|
||||
|
|
@ -2343,11 +2348,15 @@ mod tests {
|
|||
research_result_status: EpiphanyCoordinatorRoleResultStatus::Completed,
|
||||
..modeling_done
|
||||
},
|
||||
research_result_accepted: true,
|
||||
research_result_accepted: false,
|
||||
research_result_reviewable: true,
|
||||
research_result_failure_reviewed: true,
|
||||
modeling_result_accepted: true,
|
||||
modeling_result_reviewable: true,
|
||||
hands_frontier_ready: false,
|
||||
eyes_frontier_ready: true,
|
||||
research_continuation_action: Some(
|
||||
RepoFrontierResearchContinuationAction::LaunchResearch,
|
||||
),
|
||||
..input()
|
||||
});
|
||||
assert_eq!(
|
||||
|
|
@ -2359,7 +2368,7 @@ mod tests {
|
|||
Some(EpiphanyCoordinatorRoleId::Research)
|
||||
);
|
||||
assert!(eyes_frontier.can_auto_run);
|
||||
assert!(eyes_frontier.reason.contains("Eyes frontier"));
|
||||
assert!(eyes_frontier.reason.contains("Research lifecycle"));
|
||||
|
||||
let consequences_exist = recommend_coordinator_action(EpiphanyCoordinatorInput {
|
||||
signals: modeling_done,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use super::EpiphanyPressureLevel;
|
|||
use super::EpiphanyReorientAction;
|
||||
use super::EpiphanyRoleBoardLane;
|
||||
use crate::RepoFrontierPlanningLifecycleStage;
|
||||
use crate::RepoFrontierResearchContinuationAction;
|
||||
use serde::{Deserialize, Serialize};
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
|
@ -157,10 +158,9 @@ pub struct EpiphanyCoordinatorInput {
|
|||
/// True only when the canonical runtime RepoModel has exactly one current
|
||||
/// admission and an Active, dependency-ready Hands frontier item.
|
||||
pub hands_frontier_ready: bool,
|
||||
/// True only when the canonical runtime RepoModel has exactly one current
|
||||
/// admission and an Active, dependency-ready Eyes frontier item not yet
|
||||
/// covered by an accepted packet from its typed Research request.
|
||||
pub eyes_frontier_ready: bool,
|
||||
/// Exact next action projected by the current frontier Research lifecycle.
|
||||
/// Legacy role-lane status remains observable but cannot override it.
|
||||
pub research_continuation_action: Option<RepoFrontierResearchContinuationAction>,
|
||||
/// Read-only projection of the single typed Imagination -> Mind planning
|
||||
/// lifecycle. Self may advance it, but only Mind's result can decide adoption.
|
||||
pub frontier_planning_stage: RepoFrontierPlanningLifecycleStage,
|
||||
|
|
@ -214,7 +214,7 @@ pub struct EpiphanyCoordinatorStatusInput {
|
|||
pub verification_result_needs_evidence: bool,
|
||||
pub reorient_finding_accepted: bool,
|
||||
pub hands_frontier_ready: bool,
|
||||
pub eyes_frontier_ready: bool,
|
||||
pub research_continuation_action: Option<RepoFrontierResearchContinuationAction>,
|
||||
pub frontier_planning_stage: RepoFrontierPlanningLifecycleStage,
|
||||
pub proposal_modeling_request_ready: bool,
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue