pub enum Coverage {
Normalized,
Retained,
Dropped,
Unmodeled,
}Expand description
How a given discriminant is handled by the loader.
Variants§
Normalized
Parsed and normalized into the canonical conversation.
Retained
PARITY-12/PARITY-13 (P012/P013): parsed and its content/provenance IS
captured by the loader — into Session.meta (Codex session_meta’s
id/cwd/model/base_instructions, turn_context’s model), replay
semantics (thread_rolled_back actually removes the rolled-back
turns, exited_review_mode’s review_output.overall_explanation
becomes a message with review_output.findings AND
overall_correctness/overall_confidence_score (N4) captured onto
that message’s metadata (D4/N4), thread_goal_updated‘s
goal.objective becomes a message with goal.status/
goal.tokenBudget captured onto that message’s metadata too (D4),
agent_message can become a message when its text has no
response_item twin) — just not 1:1 into a ChatMessage the way
Normalized records are.
This is the “retained, not dropped” bucket the two audits were
missing: before this variant existed, every one of these landed in
Dropped indistinguishably from truly-inert UI noise (token_count,
task_started, …), which is exactly the false “silently dropped”
signal both items’ dev/03 ACs flag.
response_item/reasoning also belongs here (D5, PARITY-12): its
summary text, raw content chain-of-thought text when non-null
(N2 — previously dropped despite this very label claiming otherwise;
content is null on the vast majority of real turns, so this was
easy to miss until fixtures carried the key at all), and the
encrypted_content presence flag (N1: only a genuinely non-null
value counts — serde_json returns Some(&Value::Null) for a
present-but-null key, which is what EVERY real rollout’s reasoning
item carries per upstream codex-rs/protocol/src/models.rs:970-983,
so a naive .is_some() false-flagged every reasoning item as
“encrypted” on real data) are captured by Session::from_codex_str
onto the next assistant ChatMessage’s metadata (reasoning/
reasoning_content/reasoning_encrypted) — see audit_codex_item’s
Reasoning arm. When no following assistant turn exists to attach to
(a non-assistant item interrupts, or the reasoning is dangling at
EOF — an aborted-turn shape, N3), it is flushed as its own synthesized
[reasoning] (turn ended without a reply) message instead of being
silently discarded, so this label stays honest for that shape too.
It isn’t Normalized (no canonical “reasoning” ChatMessage), but it
is provably not a blind drop either.
DISCLOSURE: every metadata key mentioned above (review_findings,
review_overall_correctness, review_overall_confidence_score,
goal_status, goal_token_budget, reasoning, reasoning_content,
reasoning_encrypted) is LOADER-CAPTURE ONLY. It survives the
verbatim Codex→Codex diagonal (raw bytes, untouched) and reads back
out of the native supercode format, but it does NOT survive a
cross-format writer or the --session-id re-serialized diagonal:
ChatMessage.metadata is never serialized (message.rs:50-55) and no
writer reads it back out. Don’t misread Retained here as
cross-format-durable — it means “captured in-process”, not “written
back out”.
Dropped
Parsed and understood, but intentionally dropped (e.g. token_count,
task_started/task_complete, UI echoes of content already captured
elsewhere as Normalized/Retained). See event_msg_coverage’s doc
comment for the few real, currently-unrecovered exceptions (D1) —
e.g. patch_apply_end’s changes[path].unified_diff — where
Dropped means genuine, asserted content loss, not “duplicated
elsewhere”.
Unmodeled
Not modeled at all — falls into an Unknown typed bucket.
Trait Implementations§
impl Copy for Coverage
impl Eq for Coverage
Source§impl Ord for Coverage
impl Ord for Coverage
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for Coverage
impl PartialOrd for Coverage
impl StructuralPartialEq for Coverage
Auto Trait Implementations§
impl Freeze for Coverage
impl RefUnwindSafe for Coverage
impl Send for Coverage
impl Sync for Coverage
impl Unpin for Coverage
impl UnsafeUnpin for Coverage
impl UnwindSafe for Coverage
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.