Skip to content

feat(chunk-get): emit per-failure close-group summary at info level#86

Merged
jacderida merged 1 commit into
WithAutonomi:mainfrom
jacderida:feat-chunk-get-summary-trace
May 12, 2026
Merged

feat(chunk-get): emit per-failure close-group summary at info level#86
jacderida merged 1 commit into
WithAutonomi:mainfrom
jacderida:feat-chunk-get-summary-trace

Conversation

@jacderida
Copy link
Copy Markdown
Contributor

Summary

When `chunk_get` exhausts its close group without finding the chunk, emit a single info-level summary line covering the count of peers queried and the per-peer terminal outcome (NotFound / Timeout / Network error).

Example output (under `-v`):

```
chunk_get exhausted close group for a5faabc4dcd18f18…: queried=7 not_found=7 timeout=0 network_err=0
```

Motivation

When a client reports `Chunk not found`, the existing per-peer `debug!` lines don't tell operators (or downstream tooling) whether the cause was genuine data loss (every close-group peer responded NotFound) or a reachability problem from the client's vantage (peers timed out before responding). The summary line surfaces that distinction in a single greppable line at `-v` (info) verbosity, so it doesn't require `-vv` debug logs to recover after the fact.

The signal directly supports the canary monitoring we're standing up to measure chunk-loss rates on the production network: each probe parses this line into a structured `terminal_peer_outcomes` record, letting us classify each failed probe as data-loss vs reachability without needing `-vv` log volumes or cross-vantage triangulation.

Test plan

  • `cargo check -p ant-core` (verified locally; no new warnings)
  • `cargo test -p ant-core` (no behaviour change; only an extra `info!` on the existing terminal branch)
  • Manual: run `ant -v file download -o /tmp/out` against a known-missing chunk; confirm the summary line appears on stderr

🤖 Generated with Claude Code

When chunk_get exhausts its close group without finding the chunk, emit a
single info-level summary line covering the count of peers queried and the
per-peer terminal outcome (NotFound / Timeout / Network error).

Motivation: when a client reports "Chunk not found", the existing per-peer
debug lines don't tell operators (or downstream tooling) whether the cause
was genuine data loss (every close-group peer responded NotFound) or a
reachability problem from the client's vantage (peers timed out before
responding). The summary line surfaces that distinction in a single
greppable line at -v (info) verbosity, so it doesn't require -vv debug logs
to recover after the fact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jacderida jacderida merged commit eb0963c into WithAutonomi:main May 12, 2026
20 of 24 checks passed
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.

1 participant