Skip to content

client: spawn_harvest drops peer-store write errors; ADR 039 misstates per-lane persistence #2203

Closed

Description

@thiras

Follow-ups found while reviewing #2202 (#2196). Both are outside that PR's diff.

1. spawn_harvest drops every peer-store write error

spawn_harvest (crates/cli/src/commands/fetch.rs) discards the results of upsert_identity, record_sample and prune_and_cap with let _ =. Since #2202, probe samples are the only input to latency_ms, so the harvest is the only writer the fast-path ranking depends on.

A peer store that fails every write (read-only data dir, full disk, bad permissions) freezes the ranking with no log at any level. record_first_open and settle_lane / settle_drive already log a failed write at debug.

Expected: a failed harvest write logs at least at debug with the peer and the operation, like record_first_open. Consider warn once per harvest when every write fails, because that means the store is unusable, not that one record is bad.

2. ADR 039 says per-lane outcomes are not persisted

adr/039-multi-source-parallel-fetch.md § Source diversity and per-peer memory, Client bullet:

The fetch result reports the scheduler's other per-lane outcomes — stalls, drops, verification failures; the client does not persist them.

settle_lane and settle_drive (crates/cli/src/commands/fetch.rs) call PeerStore::record_failure when the drive blames the peer, so a blamed drive failure does persist, as a failure stamp.

Expected: the ADR states that a drive failure the peer caused sets the failure stamp, and that the other outcome details (stall, drop, verification failure) are reported, not stored. Fix the doc, not the code, unless the stamp is found to be wrong.

🤖 Generated with Claude Code

Activity

  1. added
    kind:bug
    kind:docs
    rust
    on Sep 28, 2026
  2. self-assigned this
    on Sep 28, 2026
  3. added
    area:cli
    prio:low
    on Sep 28, 2026
  4. assigned and unassigned on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:bugkind:docsprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions