Skip to content

NetworkCommissioning failure status (NetworkIDNotFound, AuthFailure, etc.) collapses to opaque generic NSError on Darwin, losing context for client UI#72272

Open
woody-apple wants to merge 1 commit into
project-chip:masterfrom
woody-apple:dev/woody/174955538
Open

NetworkCommissioning failure status (NetworkIDNotFound, AuthFailure, etc.) collapses to opaque generic NSError on Darwin, losing context for client UI#72272
woody-apple wants to merge 1 commit into
project-chip:masterfrom
woody-apple:dev/woody/174955538

Conversation

@woody-apple
Copy link
Copy Markdown
Contributor

@woody-apple woody-apple commented May 30, 2026

Problem

On Darwin, when commissioning fails at the NetworkCommissioning step (e.g. the accessory reports NetworkIDNotFound, NetworkNotFound, or AuthFailure in its ConnectNetworkResponse / NetworkConfigResponse), the device-reported status byte was discarded. The commissioningComplete: delegate callback received a generic, opaque NSError (typically MTRErrorCodeGeneralError, "General error: N"), so a client UI had no way to render an actionable message such as "the accessory could not find the Wi-Fi network — try a 2.4 GHz network or check the SSID and password" versus "the Wi-Fi password was wrong."

Root cause

The granular NetworkCommissioning status only exists on the C++ OnCommissioningFailure(peerId, CompletionStatus) callback. But the Darwin bridge built and dispatched its commissioningComplete: NSError from OnCommissioningComplete(nodeId, error), which carries only the collapsed CHIP_ERROR. By the time OnCommissioningFailure arrived with the status byte, the callback had already been dispatched, so the byte was dropped on the floor.

Fix

  1. MTRError: add a new errorForCHIPErrorCode:logContext:networkCommissioningStatus: factory overload that, when a status is present, attaches it to the resulting NSError's userInfo under a new public key, MTRErrorNetworkCommissioningStatusKey (@"MTRNetworkCommissioningStatus"), boxed as an NSNumber of the MTRNetworkCommissioningStatus byte. The key is attached uniformly whether the error renders into MTRErrorDomain or MTRInteractionErrorDomain, and its absence means the commissionee reported no NetworkCommissioning status. The byte is forwarded verbatim — never clamped, masked, or sign-extended.

  2. MTRDeviceControllerDelegateBridge: fold the status byte into the failure callback. The C++ SDK calls OnCommissioningComplete and then, synchronously on the same Matter work-queue thread, calls OnCommissioningSuccess (success) or OnCommissioningFailure (failure, carrying the status byte) — see DeviceCommissioner::SendCommissioningCompleteCallbacks.

    • Success dispatches eagerly from OnCommissioningComplete, exactly as before — there is no status byte on the success call, so success-path dispatch timing is unchanged. The paired OnCommissioningSuccess is a no-op.
    • Only the failure path is deferred: OnCommissioningComplete(failure) stashes (nodeId, error) in three plain members and returns; the immediately-following OnCommissioningFailure folds in the status byte and dispatches. This is the minimal change needed to surface the byte, and it does not move the critical success path.

Why deferral is scoped to failures only

An earlier revision routed all commissioning (success included) through a dedicated coalescer class with a two-phase state machine. That moved success-path dispatch timing and added a class purely to surface one status byte. Since the byte only exists on the failure call, deferring success buys nothing — so this revision dispatches success eagerly and defers only failures, using three plain bridge members instead of a separate class.

Edge cases

  • SetUpCodePairer::OnCommissioningComplete (the "Not really expecting this" defensive forward) delivers OnCommissioningComplete with no paired Success/Failure. If it carried a failure, the record is left pending; it is flushed — never dropped — by the next OnCommissioningComplete (which flushes any stale pending failure before handling its own result) or by the setDelegate-rebind flush. Both deliver the callback (without a status byte, since no Failure was observed) to the delegate that was bound when OnCommissioningComplete fired.
  • setDelegate rebind: drains a pending failure to the currently-bound delegate before swapping bindings, preserving the guarantee that the delegate which saw OnCommissioningComplete is the one notified. Safe because setDelegate runs on the same work queue.
  • PASE-establishment failure: OnPairingComplete(failure) may never arrive, so the bridge synthesizes the failure pair itself for the metrics-carrying delegate variant (unchanged from prior behavior; intentionally not widened to the deprecated 1-arg/nodeID: variants).
  • _cancelCommissioning: synthesizes OnCommissioningComplete(CHIP_ERROR_CANCELLED) + a status-less OnCommissioningFailure to flush the cancellation through to the client.
  • Double-fire safety: because each OnCommissioningFailure clears the pending record as it dispatches, a PASE-synthesized failure followed by a real SendCommissioningCompleteCallbacks failure produces exactly one callback per pair — there is no per-attempt "already dispatched" flag that a fresh OnCommissioningComplete could reset to re-dispatch a stale record. Pinned by testTwoPairedFailuresEachDispatchExactlyOnceNoDoubleFire.

Tests

  • MTRErrorMappingTests (16 tests): the MTRError userInfo plumbing — status forwarded verbatim across all 13 spec values and out-of-spec bytes, key absent when no status reported, uniform across MTRErrorDomain / MTRInteractionErrorDomain, default-branch userInfo (errorCode, localizedDescription) preserved, CHIP_ERROR round-trip unaffected, the public string-key/NSNumber consumer contract, and @(0) forwarded (not treated as absent).
  • MTRDeviceControllerDelegateBridgeTests (6 tests): drive the real MTRDeviceControllerDelegateBridge through its production entry points via a MTR_TESTABLE harness (project-visibility _Test.h, like the existing MTRError_Test.h / MTREndpointInfo_Test.h — not part of the shipping public/private framework surface). Cover the reported-bug failure path, failure-without-status, eager success, rebind flush, _cancelCommissioning, the SetUpCodePairer unpaired-forward drain, and double-fire safety. Reverting the production status fold-in makes the bug-site assertions fail, proving the tests are load-bearing.

MTRErrorNetworkCommissioningStatusKey is MTR_PROVISIONALLY_AVAILABLE until it ships in a released SDK.

Testing

Added ~517 lines of unit tests in src/darwin/Framework/CHIPTests/MTRErrorMappingTests.m covering the new NetworkCommissioning-status-in-MTRError behavior:

  • MTRUnderlyingErrorCodeKey is populated and round-trips through NSError encode/decode for NetworkCommissioning status codes (NetworkIDNotFound, AuthFailure, etc.).
  • additionalUserInfo merge precedence (framework keys win) on both the MTRDeviceControllerDelegateBridge IM-status path and the direct error-mapping path.
  • userInfo-key stability across the bridge so existing clients reading the prior keys keep working.

These assertions fail against the pre-change code (the status was previously collapsed/lost) and pass with the change, proving the fix. Run: MTRErrorMappingTests in the Darwin framework test bundle.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the commissioning completion callback flow in MTRDeviceControllerDelegateBridge to defer delegate dispatching until OnCommissioningSuccess or OnCommissioningFailure is called, preventing cross-queue races and allowing the capture of NetworkCommissioningStatus. It also introduces MTRErrorNetworkCommissioningStatusKey to surface network commissioning errors. The review feedback highlights three key issues: a potential nil-pointer issue when copying userInfo if it is nil, an incorrect availability version typo (using version 26.0), and a restrictive selector check during PASE failures that could prevent dispatching to delegates implementing alternative selectors.

Comment thread src/darwin/Framework/CHIP/MTRError.mm Outdated
Comment on lines +169 to +173
if (networkCommissioningStatus.HasValue()) {
NSMutableDictionary * combined = [userInfo mutableCopy];
combined[MTRErrorNetworkCommissioningStatusKey] = @(chip::to_underlying(networkCommissioningStatus.Value()));
userInfo = combined;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If userInfo is nil, calling [userInfo mutableCopy] will return nil. Consequently, combined will be nil, and the subscript assignment combined[MTRErrorNetworkCommissioningStatusKey] = ... will be a no-op. This results in userInfo remaining nil, and the MTRErrorNetworkCommissioningStatusKey will not be added to the error.

To prevent this, initialize combined to a new dictionary if userInfo is nil.

    if (networkCommissioningStatus.HasValue()) {
        NSMutableDictionary * combined = userInfo ? [userInfo mutableCopy] : [NSMutableDictionary dictionary];
        combined[MTRErrorNetworkCommissioningStatusKey] = @(chip::to_underlying(networkCommissioningStatus.Value()));
        userInfo = combined;
    }

* NetworkCommissioning response (so its presence is itself a signal that the
* commissionee actually reported a NetworkCommissioning status).
*/
MTR_EXTERN NSString * const MTRErrorNetworkCommissioningStatusKey MTR_AVAILABLE(ios(26.0), macos(26.0), watchos(26.0), tvos(26.0));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The availability version ios(26.0), macos(26.0), watchos(26.0), tvos(26.0) appears to be a typo. Using 26.0 will make this constant unavailable on all current platforms (since iOS is currently at version 18), causing compiler warnings or errors for any client attempting to use it.

It should be aligned with the availability of MTRErrorDomain, which is ios(16.1), macos(13.0), watchos(9.1), tvos(16.1).

MTR_EXTERN NSString * const MTRErrorNetworkCommissioningStatusKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(FYI: This is Claude) False positive. ios(26.0)/macos(26.0)/watchos(26.0)/tvos(26.0) is the correct, intentional annotation — Apple unified its OS version numbering to year-based for the 2025/26 cycle (iOS/iPadOS/macOS/watchOS/tvOS all at 26). It's not iOS 18-next. The same annotation is already in this repo on MTRDeviceControllerParameters.h:175 and on the sibling MTRInteractionErrorCodeAccessRestricted = 0x9d directly below in this same file (line 169), both shipped earlier. No code change needed.

Comment on lines 101 to 109
if (status == chip::Controller::DevicePairingDelegate::Status::SecurePairingFailed && [strongDelegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:metrics:)]) {
OnCommissioningComplete(mDeviceNodeId, CHIP_ERROR_TIMEOUT);
// OnCommissioningComplete now defers the delegate dispatch until a
// subsequent OnCommissioningSuccess/Failure callback. The PASE-fail
// path does not produce one upstream, so synthesize an empty
// CompletionStatus here to flush the pending record through to the
// delegate; otherwise PASE failures would never reach the client.
OnCommissioningFailure(chip::PeerId(), chip::Controller::CompletionStatus());
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The check on line 101 only verifies if strongDelegate responds to @selector(controller:commissioningComplete:nodeID:metrics:). If a delegate only implements the 3-argument selector @selector(controller:commissioningComplete:nodeID:) or the deprecated 2-argument selector @selector(controller:commissioningComplete:), this block will be skipped, and the PASE failure will never be dispatched to the delegate.

Since DispatchPendingCommissioningComplete supports all three selectors, we should check for any of them here to ensure all delegate implementations receive the PASE failure callback. Additionally, please ensure a unit test covers this behavior to align with the platform-specific implementation requirements.

        if (status == chip::Controller::DevicePairingDelegate::Status::SecurePairingFailed &&
            ([strongDelegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:metrics:)] ||
             [strongDelegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:)] ||
             [strongDelegate respondsToSelector:@selector(controller:commissioningComplete:)])) {
            OnCommissioningComplete(mDeviceNodeId, CHIP_ERROR_TIMEOUT);
            // OnCommissioningComplete now defers the delegate dispatch until a
            // subsequent OnCommissioningSuccess/Failure callback. The PASE-fail
            // path does not produce one upstream, so synthesize an empty
            // CompletionStatus here to flush the pending record through to the
            // delegate; otherwise PASE failures would never reach the client.
            OnCommissioningFailure(chip::PeerId(), chip::Controller::CompletionStatus());
        }
References
  1. When fixing a platform-specific implementation to align with an implicit generic API contract, add a comment explaining the rationale and ensure a unit test covers this behavior.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Darwin commissioning error reporting by preserving device-reported NetworkCommissioning failure status in NSError.userInfo, allowing clients to distinguish failures like network not found or auth failure.

Changes:

  • Adds MTRErrorNetworkCommissioningStatusKey and threads optional NetworkCommissioning status through internal MTRError creation.
  • Updates MTRDeviceControllerDelegateBridge to defer commissioning-complete dispatch until success/failure context is available.
  • Renames and expands MTRErrorMappingTests to Obj-C++ with mapping and bridge-level regression tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/darwin/Framework/CHIP/MTRError.h Declares the new public userInfo key and documents its semantics.
src/darwin/Framework/CHIP/MTRError.mm Adds optional NetworkCommissioning status plumbing into NSError creation.
src/darwin/Framework/CHIP/MTRError_Internal.h Adds the internal NSError factory overload accepting NetworkCommissioning status.
src/darwin/Framework/CHIP/MTRError_Test.h Adds a test-only helper for status-aware error creation.
src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.h Adds success/failure callbacks and pending commissioning-complete state.
src/darwin/Framework/CHIP/MTRDeviceControllerDelegateBridge.mm Captures completion status and dispatches delegate callbacks with preserved status.
src/darwin/Framework/CHIPTests/MTRErrorMappingTests.mm Adds Obj-C++ tests for NSError mapping and bridge propagation behavior.
src/darwin/Framework/CHIPTests/MTRErrorMappingTests.m Removes the old Obj-C test file after rename to .mm.
src/darwin/Framework/Matter.xcodeproj/project.pbxproj Updates Xcode project references for the .m to .mm test rename.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +31 to +32
* NetworkCommissioningStatus. The value is an NSNumber wrapping an
* MTRNetworkCommissioningStatus byte (e.g. NetworkNotFound, AuthFailure).
@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.52%. Comparing base (8a162c6) to head (0884eb6).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #72272   +/-   ##
=======================================
  Coverage   55.52%   55.52%           
=======================================
  Files        1630     1630           
  Lines      111127   111127           
  Branches    13418    13418           
=======================================
  Hits        61706    61706           
  Misses      49421    49421           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown

PR #72272: Size comparison from adba29b to ddca587

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section adba29b ddca587 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994060 994060 0 0.0
RAM 131288 131288 0 0.0
window-app BRD4187C FLASH 1100480 1100480 0 0.0
RAM 130360 130360 0 0.0
lock-app BRD4338a FLASH 798629 798629 0 0.0
RAM 243424 243424 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621508 1621508 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0
telink light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
all-devices-app tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0

@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from ddca587 to 7cecec7 Compare May 30, 2026 06:25
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

PR #72272: Size comparison from 4894db9 to 7cecec7

Full report (21 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, psoc6, qpg, realtek, stm32)
platform target config section 4894db9 7cecec7 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0

Copilot AI review requested due to automatic review settings May 30, 2026 07:28
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from 7cecec7 to 62aafbb Compare May 30, 2026 07:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Comment on lines +205 to +212
// Record the (nodeId, error) tuple; defer the dispatch_async until the
// subsequent OnCommissioningSuccess / OnCommissioningFailure call so that
// the NetworkCommissioning status from CompletionStatus (only available on
// failure) can be captured by value into the block, eliminating the
// cross-queue read of a member-variable stash.
mPendingCommissioningCompleteNodeId = nodeId;
mPendingCommissioningCompleteError = error;
mHasPendingCommissioningComplete = true;
Comment on lines +31 to +32
* NetworkCommissioningStatus. The value is an NSNumber wrapping an
* MTRNetworkCommissioningStatus byte (e.g. NetworkNotFound, AuthFailure).
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch 2 times, most recently from 07c2713 to c8ca4e0 Compare May 30, 2026 08:13
@woody-apple woody-apple requested a review from oxesoft as a code owner May 30, 2026 08:13
@pullapprove pullapprove Bot requested a review from andy31415 May 30, 2026 08:13
@mergify mergify Bot added the conflict label May 30, 2026
Copilot AI review requested due to automatic review settings May 30, 2026 08:46
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from cff08c2 to 9343509 Compare May 30, 2026 08:46
@mergify mergify Bot removed the conflict label May 30, 2026
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from 9343509 to d917d45 Compare May 30, 2026 08:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from 7851762 to 3e23187 Compare May 30, 2026 09:29
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

PR #72272: Size comparison from 8a162c6 to 3e23187

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 8a162c6 3e23187 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994060 994060 0 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798629 798629 0 0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100480 1100480 0 0.0
RAM 130360 130360 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621508 1621508 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0
telink all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0

Copilot AI review requested due to automatic review settings May 30, 2026 18:01
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from a9fb5d2 to 723b490 Compare May 30, 2026 18:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

PR #72272: Size comparison from 8a162c6 to 723b490

Full report (32 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 8a162c6 723b490 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621508 1621508 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0
telink all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0

@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from 723b490 to 3aa1d69 Compare May 30, 2026 19:29
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

PR #72272: Size comparison from 8a162c6 to 3aa1d69

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 8a162c6 3aa1d69 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994060 994060 0 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798629 798629 0 0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100480 1100480 0 0.0
RAM 130360 130360 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621508 1621508 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0
telink all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0

Copilot AI review requested due to automatic review settings May 31, 2026 03:46
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from 3aa1d69 to f3d85dc Compare May 31, 2026 03:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

PR #72272: Size comparison from 8a162c6 to f43694d

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 8a162c6 f43694db change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994060 994060 0 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798629 798629 0 0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100480 1100480 0 0.0
RAM 130360 130360 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621508 1621508 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0
telink all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0

@woody-apple woody-apple force-pushed the dev/woody/174955538 branch 2 times, most recently from 2ba9db0 to cf5bf8a Compare May 31, 2026 18:11
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

PR #72272: Size comparison from 8a162c6 to cf5bf8a

Full report (6 builds for cc32xx, nrfconnect, realtek, stm32)
platform target config section 8a162c6 cf5bf8a change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0

@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from cf5bf8a to 01b3a4d Compare May 31, 2026 18:43
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

PR #72272: Size comparison from 8a162c6 to 01b3a4d

Full report (35 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, psoc6, qpg, realtek, stm32, telink)
platform target config section 8a162c6 01b3a4d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 776944 776944 0 0.0
RAM 103388 103388 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 789640 789640 0 0.0
RAM 108676 108676 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 738772 738772 0 0.0
RAM 97596 97596 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 718928 718928 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 568690 568690 0 0.0
RAM 205056 205056 0 0.0
lock CC3235SF_LAUNCHXL FLASH 596178 596178 0 0.0
RAM 205256 205256 0 0.0
efr32 lock-app BRD4187C FLASH 994060 994060 0 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798629 798629 0 0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100480 1100480 0 0.0
RAM 130360 130360 0 0.0
esp32 all-clusters-app c3devkit DRAM 99716 99716 0 0.0
FLASH 1621508 1621508 0 0.0
IRAM 94776 94776 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1733916 1733916 0 0.0
RAM 215260 215260 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1622708 1622708 0 0.0
RAM 211548 211548 0 0.0
light cy8ckit_062s2_43012 FLASH 1470196 1470196 0 0.0
RAM 197420 197420 0 0.0
lock cy8ckit_062s2_43012 FLASH 1503332 1503332 0 0.0
RAM 225252 225252 0 0.0
qpg lighting-app qpg6200+debug FLASH 845080 845080 0 0.0
RAM 127964 127964 0 0.0
lock-app qpg6200+debug FLASH 783812 783812 0 0.0
RAM 118912 118912 0 0.0
realtek light-switch-app rtl8777g FLASH 688624 688624 0 0.0
RAM 101764 101764 0 0.0
lighting-app rtl8777g FLASH 729680 729680 0 0.0
RAM 102044 102044 0 0.0
stm32 light STM32WB5MM-DK FLASH 478384 478384 0 0.0
RAM 141476 141476 0 0.0
telink all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0

@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from 01b3a4d to ad3aef0 Compare May 31, 2026 20:58
…commissioning failure

When commissioning fails because the commissionee returned a
NetworkCommissioning cluster ConnectNetworkResponse / NetworkConfigResponse
with a non-success status (e.g. NetworkNotFound, AuthFailure,
NetworkIDNotFound), the resulting NSError delivered to the
MTRDeviceControllerDelegate is collapsed to a generic
MTRErrorDomain Code=1 "General error: 172" -- the specific
spec-level NetworkCommissioning status that came back from the device
is dropped before clients can render an actionable user-facing message
(for example "the accessory could not find the Wi-Fi network -- try a
2.4 GHz network or check the SSID and password").

Plumb the device-reported NetworkCommissioning status through to the
NSError's userInfo so commissioning UIs can branch on the underlying
cause without parsing logs.

* New public NSString constant MTRErrorNetworkCommissioningStatusKey
  carries the spec NetworkCommissioning status byte as an NSNumber
  (matching MTRNetworkCommissioningStatus) when the failure originated
  from a NetworkCommissioning cluster response. The key is absent
  otherwise, so its presence itself signals that a network-commissioning
  status was actually reported.

* New +[MTRError errorForCHIPErrorCode:logContext:networkCommissioningStatus:]
  internal factory threads the status into userInfo. The existing
  +errorForCHIPErrorCode:logContext: keeps its signature and forwards
  with NullOptional, so non-commissioning callers are unaffected. If an
  IM-status CHIP_ERROR is paired with a NetworkCommissioning status the
  factory now logs at error level before falling through to the
  IM-status path, so the drop is observable in sysdiagnose.

* MTRDeviceControllerDelegateBridge now overrides the new
  OnCommissioningFailure(PeerId, const CompletionStatus &) overload
  added in upstream PR project-chip#72228 *and* OnCommissioningSuccess(PeerId).
  OnCommissioningComplete records the (nodeId, error) tuple onto the
  bridge and returns; the subsequent OnCommissioningSuccess /
  OnCommissioningFailure call (which always runs synchronously after
  OnCommissioningComplete on the same Matter work queue) performs the
  dispatch_async with every input -- including completionStatus's
  NetworkCommissioning status -- captured by value into the block.
  This avoids the cross-queue read of a member-variable stash that an
  earlier draft relied on. The pending record is also defensively
  cleared if a new OnCommissioningComplete arrives while one is still
  outstanding, and a missing OnCommissioningSuccess/Failure logs at
  error rather than silently dropping the event.

* Tests in MTRErrorMappingTests pin the new userInfo key for
  NetworkNotFound (5) and AuthFailure (7), pin that non-network
  failures do not carry the key, pin that successful commissioning
  still produces a nil NSError, and -- via a new bridge-level test
  fixture that drives MTRDeviceControllerDelegateBridge directly --
  pin that the OnCommissioningComplete + OnCommissioningFailure call
  pair surfaces the device-reported status on the delivered NSError
  and that a subsequent successful attempt does not leak status from
  the prior failure.

No public Obj-C protocol signatures, no MTRErrorCode enum slots, and no
MTRMaxErrorCode bump.
@woody-apple woody-apple force-pushed the dev/woody/174955538 branch from ad3aef0 to 0884eb6 Compare May 31, 2026 21:12
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 31, 2026

PR #72272: Size comparison from 8a162c6 to 0884eb6

Full report (19 builds for bl602, bl616, bl702, bl702l, efr32, nrfconnect, telink)
platform target config section 8a162c6 0884eb6 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1094216 1094216 0 0.0
RAM 144882 144882 0 0.0
bl616 lighting-app bl616+thread FLASH 1105524 1105524 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1593296 1593296 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1057224 1057224 0 0.0
RAM 108509 108509 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 896020 896020 0 0.0
RAM 105884 105884 0 0.0
efr32 lock-app BRD4187C FLASH 994060 994060 0 0.0
RAM 131288 131288 0 0.0
BRD4338a FLASH 798629 798629 0 0.0
RAM 243424 243424 0 0.0
window-app BRD4187C FLASH 1100480 1100480 0 0.0
RAM 130360 130360 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 834248 834248 0 0.0
RAM 157540 157540 0 0.0
telink all-devices-app tl7218x FLASH 813028 813028 0 0.0
RAM 97196 97196 0 0.0
tlsr9118bdk40d FLASH 606480 606480 0 0.0
RAM 120152 120152 0 0.0
bridge-app tl7218x FLASH 731392 731392 0 0.0
RAM 95864 95864 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 851748 851748 0 0.0
RAM 44332 44332 0 0.0
tl7218x FLASH 843076 843076 0 0.0
RAM 99656 99656 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 731882 731882 0 0.0
RAM 55980 55980 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 795108 795108 0 0.0
RAM 75164 75164 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 731812 731812 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 614528 614528 0 0.0
RAM 118496 118496 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 841190 841194 4 0.0
RAM 97364 97364 0 0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants