fix(replication): log audit send failures#154
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds source-side diagnostics for audit challenge send_request failures in the replication audit path, improving observability of “Timeout” outcomes without changing protocol/trust semantics.
Changes:
- Adds structured WARN logging (plus debug-only raw error) when an audit challenge fails before receiving an
AuditResponse. - Introduces helper functions to (a) label the first challenged key with a stable prefix and (b) classify send errors into bounded classes for log safety.
- Adds unit tests for the new helper functions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3f0ee3d to
4f838a9
Compare
jacderida
approved these changes
Jun 21, 2026
jacderida
added a commit
to grumbach/ant-node
that referenced
this pull request
Jun 22, 2026
Patch release on top of v0.13.0. Only change since v0.13.0 is PR WithAutonomi#154 (fix(replication): log audit send failures) — extended audit-timeout diagnostics logging. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
grumbach
pushed a commit
to grumbach/ant-node
that referenced
this pull request
Jun 30, 2026
Minor release on top of v0.13.0. Notable change since v0.13.0 is PR WithAutonomi#128 (Gossip-triggered subtree audit + responsible-chunk audit, ADR-0002), which carries breaking changes — hence the minor bump rather than 0.13.1. Also includes WithAutonomi#154, WithAutonomi#157 (audit logging) and WithAutonomi#124 (CI ADR governance). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
send_requestfails before anAuditResponseWhy
reason=Timeoutcurrently hides whether an audit challenge failed due to a request deadline, peer/channel unavailability, connection/dial failure, transport error, or anothersend_requesterror. This patch gives production enough detail to correlate timeout spikes without changing protocol or penalty behaviour.Review
Full review team was used before opening:
reason=Timeouton this path is asend_requestErr catch-all and recommended source-side diagnosticssend_errorfrom WARN fields; addressed by moving it to debug-only and keeping boundedsend_error_classat WARNVerification
cargo fmt --all -- --checkcargo test -p ant-node classify_audit_send_error_uses_bounded_classescargo test -p ant-node first_challenged_key_labelgit diff --checkcargo clippy -p ant-node --all-targets --all-features -- -D warnings