pub struct MemoryDurabilityStatus {
pub total_failed_turns: u64,
pub consecutive_failed_turns: u32,
pub latest_failure_category: Option<MemoryFailureCategory>,
pub latest_failure_at: Option<DateTime<Utc>>,
pub unrecorded_outcomes: u64,
}Expand description
Per-session durable-memory degradation status (#2425).
Why: the turn recorder is fail-open by design — a failed chat_turn_append
or memory_remember is logged and dropped so the turn still completes. That
makes a session whose durable history is silently thinning indistinguishable
from a healthy one at the operator surface. This is the retained counterpart
to those per-turn warnings: session.get_transcript reports how much of the
session’s history failed to land.
What: total_failed_turns counts every degraded turn for the session’s
lifetime; consecutive_failed_turns is the current streak and resets to 0
on the next durable turn; latest_failure_category/latest_failure_at
describe the most recent degradation in LOGICAL turn order, not arrival
order. unrecorded_outcomes counts outcomes that could not be folded in at
all (see super::registry’s record_memory_durability) — a non-zero
value means the three counters above UNDER-report.
Every field is #[serde(default)], so a transcript serialised before #2425
still deserialises.
Test: registry_tests::memory_durability_retains_counts_resets_streak_and_warns_at_one_and_three,
registry_tests::outcome_beyond_the_reorder_bound_is_counted_as_unrecorded,
transcript::tests::old_transcript_json_defaults_memory_durability_status.
Fields§
§total_failed_turns: u64§consecutive_failed_turns: u32§latest_failure_category: Option<MemoryFailureCategory>§latest_failure_at: Option<DateTime<Utc>>§unrecorded_outcomes: u64Outcomes discarded before they reached the counters above (#2425).
Trait Implementations§
Source§impl Clone for MemoryDurabilityStatus
impl Clone for MemoryDurabilityStatus
Source§impl Debug for MemoryDurabilityStatus
impl Debug for MemoryDurabilityStatus
Source§impl Default for MemoryDurabilityStatus
impl Default for MemoryDurabilityStatus
Source§impl<'de> Deserialize<'de> for MemoryDurabilityStatus
impl<'de> Deserialize<'de> for MemoryDurabilityStatus
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>,
impl Eq for MemoryDurabilityStatus
Source§impl PartialEq for MemoryDurabilityStatus
impl PartialEq for MemoryDurabilityStatus
Source§impl Serialize for MemoryDurabilityStatus
impl Serialize for MemoryDurabilityStatus
impl StructuralPartialEq for MemoryDurabilityStatus
Auto Trait Implementations§
impl Freeze for MemoryDurabilityStatus
impl RefUnwindSafe for MemoryDurabilityStatus
impl Send for MemoryDurabilityStatus
impl Sync for MemoryDurabilityStatus
impl Unpin for MemoryDurabilityStatus
impl UnsafeUnpin for MemoryDurabilityStatus
impl UnwindSafe for MemoryDurabilityStatus
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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