pub struct RepositoryVerification {Show 29 fields
pub stage_outcomes: Vec<StageOutcome>,
pub object_outcomes: Vec<ObjectItemOutcome>,
pub block_state_outcomes: Vec<BlockStateOutcome>,
pub checked_objects: Option<usize>,
pub checked_wal_records: Option<usize>,
pub wal_record_outcomes: Vec<WalRecordOutcome>,
pub checked_blocks: Option<usize>,
pub checked_rollback_blocks: Option<usize>,
pub checked_sealed_rollback_patches: Option<usize>,
pub persisted_wal_patches: Option<usize>,
pub checked_refs: Option<usize>,
pub checked_ref_log_records: Option<usize>,
pub ref_publication_issues: Vec<RefPublicationIssue>,
pub pointer_outcomes: Vec<RefFileOutcome>,
pub log_outcomes: Vec<RefFileOutcome>,
pub ref_item_outcomes: Vec<RefItemOutcome>,
pub signature_envelope_issues: Vec<SignatureEnvelopeIssue>,
pub checked_rollback_draft_records: Option<usize>,
pub checked_publication_trust_records: Option<usize>,
pub publication_trust_issues: Vec<PublicationTrustIssue>,
pub object_temp_paths: Vec<PathBuf>,
pub trailing_partial_wal_bytes: Option<usize>,
pub active_wal_metadata_status: Option<ActiveWalMetadataStatus>,
pub commit_index_divergences: Vec<CommitIndexDivergence>,
pub lifecycle_cache_divergences: Vec<LifecycleCacheDivergence>,
pub active_wal_ordering_issues: Vec<ActiveWalOrderingIssue>,
pub merge_baseline_divergences: Vec<MergeBaselineDivergence>,
pub block_seals: Vec<BlockSealVerification>,
pub received_ref_item_outcomes: Vec<RefItemOutcome>,
}Expand description
Repository verification summary.
Fields§
§stage_outcomes: Vec<StageOutcome>Outcome of each of the thirteen verification stages (DC-95 Stage 2 Level 1), in pipeline order. Always exactly thirteen entries — no stage may be silently absent.
object_outcomes: Vec<ObjectItemOutcome>Phase A: one outcome per persisted object file scanned, in scan order (DC-95 Stage 2 Level 2).
Empty when the Objects stage itself did not evaluate (a structural directory-shape error) —
nothing was attempted, distinct from a non-empty set where every entry happens to be Failed.
block_state_outcomes: Vec<BlockStateOutcome>Phase B: one outcome per CurrentV6 Block whose Phase A check succeeded, in the
state-dependency order verify_blocks_topological resolved them — not scan order (DC-92
§4.2). Empty when the Objects stage did not evaluate, or when no CurrentV6 Block passed
Phase A at all.
checked_objects: Option<usize>Number of persisted object files whose own Phase A checks ran to completion (DC-95 Stage 2
Level 2). None only when the Objects stage itself did not evaluate (a structural
directory-shape error) — under item containment this is no longer the same claim as “every
object in the store is individually sound”: some entries in object_outcomes may themselves
be Failed while this count still reflects how many succeeded. Never a partial claim about
state-root soundness, which block_state_outcomes is the only source of truth for (Level 2
handoff §7 Q3 — checked_blocks below keeps its pre-Level-2 meaning unchanged).
checked_wal_records: Option<usize>Number of active WAL records replayed successfully. None when the WAL-replay stage did not
evaluate to completion.
wal_record_outcomes: Vec<WalRecordOutcome>One outcome per attempted WAL record frame, in scan order (RFC 102 Stage 2: isolate-and-
continue reading). Empty when the WalReplay stage itself did not evaluate.
checked_blocks: Option<usize>Number of persisted Block objects whose references (parent, patch, snapshot existence, merge
baseline) were checked successfully — a Phase A claim only, never a claim about state-root
soundness (see block_state_outcomes). None only when the Objects stage itself did not
evaluate. This field’s meaning is unchanged by Level 2 (handoff §7 Q3) — only when it is
None changed, from “the whole stage failed” to “the whole stage did not evaluate at all.”
checked_rollback_blocks: Option<usize>Number of persisted Block objects classified as rollback blocks, among those whose Phase A
check succeeded. None only when the Objects stage itself did not evaluate.
checked_sealed_rollback_patches: Option<usize>Number of sealed rollback-marked Patch objects referenced by Blocks whose Phase A check
succeeded. None only when the Objects stage itself did not evaluate.
persisted_wal_patches: Option<usize>Number of active WAL patch records that already exist as persisted patch objects. None when
the WAL-persistence stage did not evaluate to completion.
checked_refs: Option<usize>Number of ref pointer files whose own Phase-A-equivalent read succeeded (DC-95 Stage 2
Level 2). None only when the Refs stage itself did not evaluate.
checked_ref_log_records: Option<usize>Number of inline ref-log records read successfully. None only when the Refs stage
itself did not evaluate.
ref_publication_issues: Vec<RefPublicationIssue>Interrupted ref-publication and candidate-debris conditions found by joint verification. Stays
a plain Vec under stage containment: entries already pushed by a stage that later failed
remain real findings; only the count/emptiness-as-proof reasoning needed a stage-aware guard
(see require_retained_evidence’s own trust_is_valid computation).
pointer_outcomes: Vec<RefFileOutcome>One outcome per ref pointer file scanned, in scan order (DC-95 Stage 2 Level 2). Empty when
the Refs stage itself did not evaluate.
log_outcomes: Vec<RefFileOutcome>One outcome per ref log file scanned, in scan order. Empty when the Refs stage itself did
not evaluate.
ref_item_outcomes: Vec<RefItemOutcome>One outcome per ref name reached via a successfully-read pointer or log. Empty when the
Refs stage itself did not evaluate.
signature_envelope_issues: Vec<SignatureEnvelopeIssue>Warning-level format-1 signature-envelope compatibility findings in deterministic order.
checked_rollback_draft_records: Option<usize>Number of active WAL records classified and decoded as rollback drafts. None when the
rollback-drafts stage did not evaluate to completion.
checked_publication_trust_records: Option<usize>Number of publication envelopes checked against repository-local trust. None unless both
the objects stage and the ref-update schema/trust stage evaluated to completion — this count is
contributed to by both, sharing one PublicationTrustVerifier instance across them.
publication_trust_issues: Vec<PublicationTrustIssue>Publication-trust issues found while structural verification succeeded. Stays a plain Vec —
entries genuinely found before an interrupting failure remain real findings.
object_temp_paths: Vec<PathBuf>Recognized non-authoritative object publication temps left for explicit maintenance.
trailing_partial_wal_bytes: Option<usize>Number of trailing bytes in the active WAL that look like an incomplete final record. None
when the WAL-replay stage did not evaluate to completion.
active_wal_metadata_status: Option<ActiveWalMetadataStatus>Active-WAL ref metadata status relative to the replayed WAL. None when the active-WAL-metadata
stage did not evaluate to completion.
commit_index_divergences: Vec<CommitIndexDivergence>DC-56 commit-index entries whose recorded content hash disagrees with the worktree’s actual current content despite a matching stat — a stale-but-trusted cache entry, reported per the cache-validity specification §6 rather than silently trusted by a future commit.
lifecycle_cache_divergences: Vec<LifecycleCacheDivergence>DC-64 incremental lifecycle-state cache entries whose contents disagree with an independent full replay of the block they claim to represent — reported per the design document §6 rather than silently trusted by a future commit.
active_wal_ordering_issues: Vec<ActiveWalOrderingIssue>DC-66: active WAL queue-ordering violations — a record whose sequence does not strictly
increase over its predecessor. Adversarial-only under normal operation (Wal::append_patch
always assigns the next sequence), but a queue of N gives ordering a meaning (“patches seal in
append order”) worth verifying explicitly rather than assuming from decode success alone.
merge_baseline_divergences: Vec<MergeBaselineDivergence>DC-75: Merge blocks whose recorded merge_baseline_block_id is not, in fact, a common
ancestor of both parents — independently re-derived, not trusted, per
baseline-recording-answer-v1.md §3 (“record it, then check it, unconditionally”). A recorded
baseline that legitimate merge execution ever produced always passes this; a false claim (data
corruption or tampering) does not.
block_seals: Vec<BlockSealVerification>Which adopted MAINTAINER key sealed each checked Block (DC-78 §D3), in on-disk scan order. Reporting only — surfaces provenance that was already intrinsic to each block’s own signature, so an auditor can ask “which parts of this history did I seal” and get an answer.
received_ref_item_outcomes: Vec<RefItemOutcome>RFC 115 Stage 3 §6: one outcome per received (remotes/*) pointer, in
list_received_pointers’ sorted-by-name order — the same kind-aware two-hop target check
local refs already get, applied here for the first time. Empty when the ReceivedRefs stage
itself did not evaluate. A repository with a genuinely dangling received ref (its target
object was never shipped) now reports an item failure here where nothing reported anything
before this stage existed — see the stage’s own module note for what that means for a
repository that already holds one.
Implementations§
Source§impl RepositoryVerification
impl RepositoryVerification
Sourcepub fn has_stage_failure(&self) -> bool
pub fn has_stage_failure(&self) -> bool
Return true when any of the thirteen verification stages did not evaluate cleanly — either its
own check raised an error (Failed) or a dependency’s non-evaluation prevented it from running
at all (NotEvaluated). A repository whose verification did not run to completion is not
verified, regardless of what the stages that did run found. Checked first, ahead of every
finding-specific predicate below: those predicates’ own backing data can itself be incomplete
precisely because a stage failed, so this is the more fundamental question.
Does not, by itself, cover item-level defects (DC-95 Stage 2 Level 2) — the Objects
stage evaluates cleanly (Evaluated) even when one of its items individually failed, since
item containment means a bad object no longer aborts the whole stage. See
Self::has_item_failure for that question, and Self::has_blocking_defect for the
combined check almost every caller actually wants.
Sourcepub fn has_item_failure(&self) -> bool
pub fn has_item_failure(&self) -> bool
Return true when any individual item did not evaluate cleanly (DC-95 Stage 2 Level 2) — a
Phase A object whose own check failed, a Phase B CurrentV6 Block whose state-root check
failed or could not be attempted because its own state-derivation parent did not evaluate,
or a ref (its pointer file, log file, or classification) that failed. Item containment means
these no longer make Self::has_stage_failure true: the owning stage itself completed, so
this is a genuinely separate question, not a more detailed view of the same one. The backing
Vecs are empty (not merely all-Evaluated) when their owning stage itself did not
evaluate — this method reads that case as false, same as every other item-backed predicate
in this type; has_stage_failure is what is already true for it.
Sourcepub fn has_blocking_defect(&self) -> bool
pub fn has_blocking_defect(&self) -> bool
Return true when this repository’s verification found any blocking reason to refuse it –
stage-level (has_stage_failure) or item-level (has_item_failure). A convenience predicate
for a caller that only wants “is this repository verified at all” and does not care which
half of that question failed.
Not currently called by this crate’s own production code. doctor_repository’s refusal
gate is preserved by its own per-stage and per-item DoctorIssue::error loops feeding
is_healthy(), not by calling this directly; prikk verify’s exit-code chain
(main.rs) calls has_stage_failure() and has_item_failure() as two separate arms
precisely so it can report which kind of failure occurred, rather than one generic
message – collapsing them here would lose that. Kept as public API for an external caller
that only wants the yes/no answer.
Sourcepub fn has_trailing_partial_wal(&self) -> bool
pub fn has_trailing_partial_wal(&self) -> bool
Return true if the active WAL contained an incomplete trailing record. None (the WAL-replay
stage did not evaluate) reads as false here — that condition is already surfaced, more
precisely, by has_stage_failure.
Sourcepub fn has_publication_trust_issues(&self) -> bool
pub fn has_publication_trust_issues(&self) -> bool
Return true when all structurally verified publication objects also passed trust checks.
Sourcepub fn has_blocking_ref_publication_issues(&self) -> bool
pub fn has_blocking_ref_publication_issues(&self) -> bool
Return true when pointer/log state requires signer-backed recovery or manual intervention.
Sourcepub fn has_active_wal_metadata_integrity_issue(&self) -> bool
pub fn has_active_wal_metadata_integrity_issue(&self) -> bool
Return true when a non-empty active WAL lacks valid ownership metadata. None (the
active-WAL-metadata stage did not evaluate) reads as false here — see has_trailing_partial_wal.
Sourcepub fn has_active_wal_metadata_warning(&self) -> bool
pub fn has_active_wal_metadata_warning(&self) -> bool
Return true when an empty active WAL has stale local metadata debris. None reads as false —
see has_trailing_partial_wal.
Sourcepub fn has_commit_index_divergence(&self) -> bool
pub fn has_commit_index_divergence(&self) -> bool
Return true when the commit-index cache disagrees with the worktree for at least one path.
Sourcepub fn has_lifecycle_cache_divergence(&self) -> bool
pub fn has_lifecycle_cache_divergence(&self) -> bool
Return true when the incremental lifecycle-state cache disagrees with an independent replay.
Sourcepub fn has_active_wal_ordering_issue(&self) -> bool
pub fn has_active_wal_ordering_issue(&self) -> bool
Return true when the active WAL contains an out-of-order or duplicate sequence.
Sourcepub fn has_merge_baseline_divergence(&self) -> bool
pub fn has_merge_baseline_divergence(&self) -> bool
Return true when a Merge block’s recorded baseline is not a common ancestor of its parents
(DC-75) — a false claim, from data corruption or tampering.
Trait Implementations§
Source§impl Clone for RepositoryVerification
impl Clone for RepositoryVerification
Source§fn clone(&self) -> RepositoryVerification
fn clone(&self) -> RepositoryVerification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more