acpmux: briefs asks the peers at once and names each one left out

TE
6d ago
+157-4

_acpmux/briefs on the unix socket asks every connected peer for its briefs. It asked them one by one, each with the 600 s request budget, and left out a peer whose answer failed without saying so: one stalled peer held the whole list for ten minutes, and a peer that refused was simply missing. This is the same silent-wait class as the 2026-10-30 peer-handshake outage (#28105): an RPC error dropped (let Ok(..) else { continue }) while the caller waits on a timeout.

server/requests/briefs.rs list now asks the peers at once (join_all) under one 10 s deadline, as _acpmux/models already does (models_fanout.rs). Each peer left out is named with its error in peersFailed: [{peer, error}] (only when some peer was left out), logged at warn, and acpmux briefs ls prints left out PEER: ERROR on stderr. A request that misses the deadline is dropped, which takes its pending entry with it (ForgetPending); a late reply is ignored. The merge of remote rows and the peer-origin path are unchanged.

Performance

metricbeforeafterdeltaharness
_acpmux/briefs with one stalled peer of three600 s (that peer's request budget)10 s (one shared deadline)-590 speer_briefs_tests.rs, tokio paused time (red: the stalled peer held the list for 600s)
peers left out with a reason0 of 22 of 2+2same

Test

cargo test -p acpmux --lib briefs_tests (briefs_asks_the_peers_at_once_and_names_each_one_left_out): three fake peers on in-memory links (one stalls, one refuses, one lists a brief), under tokio's paused clock. The list comes back within 30 s (virtual), holds the listing peer's brief, and names the other two with their errors.

  • Red on the test commit aaace171 (run 41027814977): the stalled peer held the list for 600s
  • Green on the head 5a749353 (run 41028681107, cargo test -p acpmux --no-fail-fast): the test passes, and so does every other test except hermetic_daemon_guard::every_test_binary_runs_in_the_hermetic_environment, red on base the same way (tests/web_image_attachments.rs lacks the hermetic helper; #28150 fixes it). The job's exit 1 is forced so the log prints.

Observed / Not run

Observed: the red and green runs above, on hosted Linux through cmux-ci test; an independent review (Codex gpt-6.1-sol, high) passed at 5a749353. Read, not run: no live fleet measurement.

Changelog

  • Fixed: listing briefs no longer waits up to ten minutes on one slow peer machine, and says which peers were left out and why.

Agent session: agent session

🤖 Generated with Claude Code