fix(protocol): honor BUSY waits across peer addresses #5027
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 272 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.336
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5027"
general
weight: 0.35
cwedgwood
Type of change
<!-- Check exactly one. -->
Description
Matter Core § 4.11.1.5 ("Busy") requires an initiator that receives BUSY to wait at least the
responder's minimum wait before it retries. The responder is the node, so this change applies the
wait to all of that node's addresses. The specification does not discuss multiple addresses
explicitly.
Today only the address that received BUSY waits. A queued address, or a socket that finishes
opening on another address, can start CASE before the wait ends.
Peer.busyUntilholds the end of the wait and can only move later. The connection schedulerchecks it before it schedules an address, before an address retries, and right before CASE
starts. A socket that opens during the wait is closed by the existing cleanup for unsuccessful
attempts. CASE exchanges already in progress continue. The wait survives cancellation and restart
of a connection process.
The address that received BUSY keeps its
busyDelay + random jitterretry. Other addresses mayresume at the end of the minimum wait, with the scheduler's normal spacing between them.
Backing evidence
Complete logs of simulated tests (ESM):
peer-busy-wait-before-esm.log: the newPeerConnectionBUSY tests against unchanged productioncode, 5 of 6 failed. Other addresses start CASE during the wait.
peer-busy-wait-after-esm.log: the same tests with this change, 6 passed.npm testis unchecked: the protocol suite fails the same fourExchangeManagerexchange-IDallocation timeouts as unchanged upstream; all other protocol tests pass.
Checklist
npm testpassesnpm run format-verifyandnpm run lintpass