feat(node,protocol)!: carry caller cancellation through commissioning #5021
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.45) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 431 lines diff across 5 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.363
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5021"
general
weight: 0.35
cwedgwood
Type of change
<!-- Check exactly one. -->
Description
Winning PASE does not finish the caller's commissioning, but today the caller's
abortstops atthe PASE race. With this change,
abortalso reaches commissioning reads, writes and commands,the checks between steps and the operational CASE connection.
CommissioningDiscovery.cancel()also interrupts the winner. Scanner failures after a win still do not cancel it.
This is one of two alternatives for #5020. The other keeps
abortunchanged and adds an opt-incommissioningAbortoption with the same cancellation and cleanup behavior.Breaking: this reverses the winner rule from #4747 ("After the win, the winner's operation is
not interrupted").
peers.commission({ abort })now also cancels the winner. Candidate races thatabort a shared signal must use the new
paseAbortinstead, which cancels PASE attempts only. Onpeers.commission(),paseAbortdoes not stop scanning. DirectControllerCommissioner.commissioncallers move their race signal to
LocatedNodeCommissioningOptions.paseAbort.Boundaries:
discard a successful response. A lost response remains ambiguous.
response.
the abort. A channel that opens later is closed in the background.
attempts and late session closes finish. When no address wins,
CommissioningConnectionnowwaits for a late PASE session's
initiateForceClose()before rejecting.MatterControllerforwardsabortthrough both commissioning routes.Discovery.settlednow resolves when first read after discovery finished.Limitations
reserve a peripheral while an open is pending. This change does not alter either backend.
Backing evidence
Complete logs of simulated tests:
P7a-focused-before-esm.log: the new commissioning tests against unchanged production code,16 of 31 failed.
P7a-focused-after-esm.log,P7a-focused-after-cjs.log: the same tests plus the existingdiscovery tests with this change, 58 passed in each module format.
npm testis unchecked: the protocol suite fails the same fourExchangeManagerexchange-IDallocation timeouts as unchanged upstream; the full node and matter.js suites and all other
protocol tests pass.
Checklist
npm testpassesnpm run format-verifyandnpm run lintpass