pub struct RecoverReport {Show 15 fields
pub transcript_path: Option<PathBuf>,
pub host_kind: HostKind,
pub elapsed_ms: u64,
pub elapsed_ms_resolve_path: u64,
pub elapsed_ms_dedup_query: u64,
pub elapsed_ms_parse: u64,
pub elapsed_ms_writes: u64,
pub lines_total: u32,
pub lines_atomised: u32,
pub lines_skipped_dedup: u32,
pub lines_skipped_limit: u32,
pub memories_created: Vec<String>,
pub errors: Vec<String>,
pub schema_version_at_run: i64,
pub fast_path_hit: bool,
}Expand description
Per-call recovery report. Doubles as the JSON wire shape for
ai-memory recover-previous-session --json and as the MCP-tool
return shape; field names + serialization order are the wire
contract.
Fields§
§transcript_path: Option<PathBuf>Absolute path of the transcript file the recovery walked,
or None when no transcript was located (host stub had
no transcripts on disk).
host_kind: HostKindHost whose transcript was recovered. Echoes the resolver
arm that won (or --host flag value if explicit).
elapsed_ms: u64Total wall-clock from recover_from_transcript entry to
return, in milliseconds. Pinned by the regression test
against the per-scenario budget (see #1389 perf design).
elapsed_ms_resolve_path: u64Wall-clock for path resolution + stat(2) only.
elapsed_ms_dedup_query: u64Wall-clock for the dedup-table SELECT.
elapsed_ms_parse: u64Wall-clock for the JSONL stream parse.
elapsed_ms_writes: u64Wall-clock for the INSERTs into memories and
transcript_line_dedup.
lines_total: u32Total lines read from the transcript (pre-filter).
lines_atomised: u32Lines atomised into new memories this run.
lines_skipped_dedup: u32Lines skipped because their sha256 was already in the dedup table from a prior recovery.
lines_skipped_limit: u32Lines skipped because the --limit cap was reached.
memories_created: Vec<String>IDs of memories created this run. Capped at the first
QUIET_MEMORY_ID_PREVIEW_CAP in --quiet mode to keep the
JSON payload bounded.
errors: Vec<String>Best-effort errors surfaced during recovery. A non-empty list is NOT a hard failure — the recover verb is graceful by design so SessionStart-hook integration can’t wedge an agent boot.
schema_version_at_run: i64CURRENT_SCHEMA_VERSION at the time recovery ran. Pinned
in RecoverReport so a future schema migration that
changes the dedup-table shape can be diagnosed from the
JSON wire payload.
fast_path_hit: booltrue when the common-case fast-path short-circuited
(transcript mtime ≤ most-recent memory_store write for
this agent_id). When true, parse + writes never ran and
the elapsed budget is the resolve-path + dedup-query sum.
Implementations§
Trait Implementations§
Source§impl Clone for RecoverReport
impl Clone for RecoverReport
Source§fn clone(&self) -> RecoverReport
fn clone(&self) -> RecoverReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RecoverReport
impl Debug for RecoverReport
Source§impl Default for RecoverReport
impl Default for RecoverReport
Source§fn default() -> RecoverReport
fn default() -> RecoverReport
Source§impl<'de> Deserialize<'de> for RecoverReport
impl<'de> Deserialize<'de> for RecoverReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for RecoverReport
impl RefUnwindSafe for RecoverReport
impl Send for RecoverReport
impl Sync for RecoverReport
impl Unpin for RecoverReport
impl UnsafeUnpin for RecoverReport
impl UnwindSafe for RecoverReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more