From 0763fcbe94257eb9adbe92ab814b5a487f65551d Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 8 Aug 2026 11:35:07 +0100 Subject: [PATCH] Complete admitted checkpoint continuity path --- .../src/bin/epiphany-mvp-coordinator.rs | 1 - epiphany-core/src/bin/epiphany-mvp-status.rs | 1 - epiphany-core/src/coordinator_acceptance.rs | 23 ++++++++++++++----- epiphany-state-model/src/lib.rs | 3 +-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs index d391b639..db56677d 100644 --- a/epiphany-core/src/bin/epiphany-mvp-coordinator.rs +++ b/epiphany-core/src/bin/epiphany-mvp-coordinator.rs @@ -1856,7 +1856,6 @@ fn launch_reorient( epiphany_state_model::reorient_checkpoint_from_admitted_repo_model( projection.snapshot(), &projection.obligation().obligation_id, - &projection.obligation().source_commit_id, ) } }; diff --git a/epiphany-core/src/bin/epiphany-mvp-status.rs b/epiphany-core/src/bin/epiphany-mvp-status.rs index 3a619f55..9ef79195 100644 --- a/epiphany-core/src/bin/epiphany-mvp-status.rs +++ b/epiphany-core/src/bin/epiphany-mvp-status.rs @@ -318,7 +318,6 @@ fn run_native_status(args: &Args, include_auxiliary_status: bool) -> Result anyhow::Result { - if update_investigation_checkpoint && state.investigation_checkpoint.is_none() { - return Err(anyhow::anyhow!( - "cannot update investigation checkpoint because state has no durable checkpoint" - )); - } + let investigation_checkpoint = if update_investigation_checkpoint { + match state.investigation_checkpoint.clone() { + Some(checkpoint) => Some(checkpoint), + None => { + let projection = crate::runtime_modeling_semantic_projection_input(store) + .context("cannot accept reorientation without a valid admitted RepoModel checkpoint")?; + Some(epiphany_state_model::reorient_checkpoint_from_admitted_repo_model( + projection.snapshot(), + &projection.obligation().obligation_id, + )) + } + } + } else { + None + }; let snapshot = read_reorient_result_snapshot(Some(state), Some(store), binding_id); if snapshot.status != EpiphanyCrrcResultStatus::Completed { return Err(anyhow::anyhow!( @@ -97,7 +108,7 @@ pub fn accept_coordinator_reorient_finding( accepted_at.clone(), update_scratch, update_investigation_checkpoint, - state.investigation_checkpoint.clone(), + investigation_checkpoint, ) .map_err(anyhow::Error::msg)?; let contract = acceptance_launch_contract_for_binding(store, state, binding_id, "reorient") diff --git a/epiphany-state-model/src/lib.rs b/epiphany-state-model/src/lib.rs index 74023438..90f9632a 100644 --- a/epiphany-state-model/src/lib.rs +++ b/epiphany-state-model/src/lib.rs @@ -876,7 +876,6 @@ pub enum RepoModelPatchPurpose { pub fn reorient_checkpoint_from_admitted_repo_model( snapshot: &EpiphanyMemoryGraphSnapshot, obligation_id: &str, - source_commit_id: &str, ) -> EpiphanyInvestigationCheckpoint { EpiphanyInvestigationCheckpoint { checkpoint_id: obligation_id.to_string(), @@ -904,7 +903,7 @@ pub fn reorient_checkpoint_from_admitted_repo_model( note: Some("Current admitted RepoModel frontier scope".to_string()), }) .collect(), - evidence_ids: vec![source_commit_id.to_string()], + evidence_ids: Vec::new(), } }