Keep CRRC checkpoint view inside routed state model

This commit is contained in:
Meta Vens 2026-08-08 11:21:57 +01:00
commit 5dfdfad420
5 changed files with 23 additions and 25 deletions

View file

@ -82,7 +82,6 @@ pub use pressure::EpiphanyPressureStatus;
pub use pressure::EpiphanyTokenUsageSnapshot;
pub use pressure::derive_pressure_view;
pub use reorient::EpiphanyReorientAction;
pub use reorient::EpiphanyReorientCheckpoint;
pub use reorient::EpiphanyReorientCheckpointStatus;
pub use reorient::EpiphanyReorientDecision;
pub use reorient::EpiphanyReorientFreshnessStatus;

View file

@ -1,5 +1,5 @@
use epiphany_state_model::EpiphanyInvestigationCheckpoint;
use epiphany_state_model::EpiphanyInvestigationDisposition;
use epiphany_state_model::EpiphanyReorientCheckpoint;
use serde::Deserialize;
use serde::Serialize;
use std::collections::HashSet;
@ -80,25 +80,6 @@ pub struct EpiphanyReorientInput<'a> {
pub watched_root: Option<PathBuf>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct EpiphanyReorientCheckpoint<'a> {
pub checkpoint_id: &'a str,
pub disposition: EpiphanyInvestigationDisposition,
pub next_action: Option<&'a str>,
pub code_refs: &'a [epiphany_state_model::EpiphanyCodeRef],
}
impl<'a> From<&'a EpiphanyInvestigationCheckpoint> for EpiphanyReorientCheckpoint<'a> {
fn from(checkpoint: &'a EpiphanyInvestigationCheckpoint) -> Self {
Self {
checkpoint_id: &checkpoint.checkpoint_id,
disposition: checkpoint.disposition,
next_action: checkpoint.next_action.as_deref(),
code_refs: &checkpoint.code_refs,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EpiphanyReorientDecision {
@ -410,7 +391,7 @@ fn epiphany_path_key(path: &Path) -> String {
#[cfg(test)]
mod tests {
use super::*;
use epiphany_state_model::EpiphanyCodeRef;
use epiphany_state_model::{EpiphanyCodeRef, EpiphanyInvestigationCheckpoint};
fn checkpoint() -> EpiphanyInvestigationCheckpoint {
EpiphanyInvestigationCheckpoint {