Skip to content

fix(replication): add audit failure diagnostics#129

Merged
jacderida merged 1 commit into
mainfrom
fix/audit-failure-logging
Jun 5, 2026
Merged

fix(replication): add audit failure diagnostics#129
jacderida merged 1 commit into
mainfrom
fix/audit-failure-logging

Conversation

@dirvine
Copy link
Copy Markdown
Collaborator

@dirvine dirvine commented Jun 5, 2026

Summary

  • adds permanent audit failure summary fields for challenged, confirmed, absent, and digest-mismatch key counts
  • preserves failure classification through responsibility confirmation so final ERROR logs expose the dominant failure mode
  • logs audit failure reason and key-count breakdown without per-key ERROR-level noise

Test Plan

  • cargo fmt --all
  • cargo test replication::audit -- --nocapture
  • cargo clippy --all-features -- -D clippy::panic -D clippy::unwrap_used -D clippy::expect_used

Notes

  • No ADR added: this is observability/logging instrumentation only, not a behavioural or architectural change.

Copilot AI review requested due to automatic review settings June 5, 2026 14:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves replication audit failure diagnostics by adding an aggregated failure summary to audit evidence and emitting richer (non-per-key) ERROR logs that preserve the dominant failure mode after responsibility confirmation.

Changes:

  • Introduces AuditFailureSummary and attaches it to FailureEvidence::AuditFailure.
  • Classifies digest verification failures as Absent vs DigestMismatch, computes summary counts, and refines the final AuditFailureReason accordingly.
  • Updates audit failure logging to include the reason and key-count breakdown.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/replication/types.rs Adds AuditFailureSummary and a new summary field on FailureEvidence::AuditFailure.
src/replication/mod.rs Expands audit failure ERROR logging to include reason and summary counts.
src/replication/audit.rs Classifies per-key audit failures, computes summary counts, preserves/refines failure reason after responsibility confirmation, and adds unit tests for the new helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/replication/types.rs
@jacderida jacderida merged commit aeec447 into main Jun 5, 2026
15 checks passed
@jacderida jacderida deleted the fix/audit-failure-logging branch June 5, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants