← Back to Pull requests

fix(protocol): honor BUSY waits across peer addresses #5027

Closed
unknown closed this pull request without merging on Nov 24, 2026 16:45 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 04:51 UTC
Author

Type of change

<!-- Check exactly one. -->

  • 🐛 Fix — corrects a defect or wrong behavior

  • ✨ Feature — adds new functionality or capability
  • 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.busyUntil holds the end of the wait and can only move later. The connection scheduler
    checks 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 jitter retry. Other addresses may
    resume at the end of the minimum wait, with the scheduler's normal spacing between them.

    Backing evidence

  • Related issue: none

  • This fix/change is backed by a complete log file — attached here or in the linked issue (not just a few quoted lines).
  • Complete logs of simulated tests (ESM):

  • peer-busy-wait-before-esm.log: the new PeerConnection BUSY tests against unchanged production

  • code, 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 test is unchecked: the protocol suite fails the same four ExchangeManager exchange-ID
    allocation timeouts as unchanged upstream; all other protocol tests pass.

    Checklist

  • I understand the code I am submitting and can explain how it works (AI policy)

  • Tests added or updated to cover the change

  • npm test passes

  • npm run format-verify and npm run lint pass

  • CHANGELOG updated (if applicable)
  • Diff: 272 lines (+204 / -68) across 3 files Reviewer: cwedgwood Review duration: 7913m
    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
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.5% (MEDIUM) · Higher = larger blast radius
    39.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.1% · Safe to merge
    17.1%