feat(node,protocol): add opt-in commissioning cancellation #5022
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.43) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 365 lines diff across 4 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.353
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5022"
general
weight: 0.35
cwedgwood
Type of change
<!-- Check exactly one. -->
Description
Add
commissioningAbort, one signal that cancels discovery, PASE, commissioning reads, writes andcommands, the checks between steps and the operational CASE connection. It is forwarded through
ClientNode.commissionand both deprecatedMatterControllerroutes, including a known address.This is one of two alternatives for #5020, and it is backward compatible. The existing
abortoption still cancels candidate selection and PASE only, so a PASE winner keeps the rule from #4747
("After the win, the winner's operation is not interrupted"). No caller migration is needed. The
alternative that extends
abortitself is #5021.Boundaries:
discard a successful response. A lost response remains ambiguous.
response.
the cancel. A channel that opens later is closed in the background.
wins,
CommissioningConnectionnow waits for a late PASE session'sinitiateForceClose()before rejecting.
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:
P7b-focused-before-esm.log: the new commissioning tests against unchanged production code,15 of 30 failed.
P7b-focused-after-esm.log,P7b-focused-after-cjs.log: the same tests plus the existingdiscovery tests with this change, 57 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