Skip to content

Updates to support the JF Datastore spec change (#12644)#71509

Open
vijs wants to merge 1 commit intoproject-chip:masterfrom
vijs:fix/71507
Open

Updates to support the JF Datastore spec change (#12644)#71509
vijs wants to merge 1 commit intoproject-chip:masterfrom
vijs:fix/71507

Conversation

@vijs
Copy link
Copy Markdown
Contributor

@vijs vijs commented Apr 10, 2026

Summary

Updates to support the JF Datastore spec change (#12644)

Related issues

#71507

Testing

Verified using the below instructions.

$ gn gen --check out/host/ --args='chip_device_config_enable_joint_fabric=true'
$ ninja -C out/host/ src/app/server/tests:tests_run

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 updates the Joint Fabric Datastore and Administrator cluster definitions, primarily adjusting field IDs, changing field nullability to optionality, and introducing a new status code enum for ICAC CSR responses. The changes also include corresponding updates to the SDK's generated code and server-side handlers. A critical issue was identified in the UpdateAdmin command handler where .Value() is called on Optional fields without checking for their presence, which will lead to application crashes if those fields are missing from the request.

Comment on lines +472 to 474
auto nodeId = commandData.nodeID;
auto friendlyName = commandData.friendlyName.Value();
auto icac = commandData.icac.Value();
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 fields friendlyName and icac in UpdateAdminRequest have been changed from nullable to optional in the cluster specification. In the Matter SDK, optional fields are represented as chip::Optional, and calling .Value() on an empty Optional will trigger an assertion failure and crash the application. Since these fields are optional, the handler should pass the Optional objects directly to the UpdateAdmin method (which should be updated to accept them) instead of unconditionally extracting their values.

    auto nodeId                                      = commandData.nodeID;
    auto friendlyName                                = commandData.friendlyName;
    auto icac                                        = commandData.icac;

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

PR #71509: Size comparison from 6cfa747 to a1edcc0

Full report (34 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 6cfa747a a1edcc0 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1090510 1090510 0 0.0
RAM 144858 144858 0 0.0
bl616 lighting-app bl616+thread FLASH 1101988 1101988 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1588876 1588876 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1053666 1053666 0 0.0
RAM 108461 108461 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892364 892364 0 0.0
RAM 105852 105852 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 775904 775904 0 0.0
RAM 103396 103396 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 788108 788108 0 0.0
RAM 108588 108588 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 734432 734432 0 0.0
RAM 97396 97396 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 717860 717860 0 0.0
RAM 97556 97556 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 559874 559874 0 0.0
RAM 204568 204568 0 0.0
lock CC3235SF_LAUNCHXL FLASH 592742 592742 0 0.0
RAM 204816 204816 0 0.0
efr32 lock-app BRD4187C FLASH 992512 992512 0 0.0
RAM 131268 131268 0 0.0
BRD4338a FLASH 796297 796297 0 0.0
RAM 243372 243372 0 0.0
window-app BRD4187C FLASH 1098000 1098000 0 0.0
RAM 130308 130308 0 0.0
esp32 all-clusters-app c3devkit DRAM 98460 98460 0 0.0
FLASH 1599174 1599174 0 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 862232 862232 0 0.0
RAM 162094 162094 0 0.0
nxp contact mcxw71+release FLASH 739032 739032 0 0.0
RAM 67016 67016 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1711700 1711700 0 0.0
RAM 214028 214028 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1609460 1609460 0 0.0
RAM 210908 210908 0 0.0
light cy8ckit_062s2_43012 FLASH 1466876 1466876 0 0.0
RAM 197068 197068 0 0.0
lock cy8ckit_062s2_43012 FLASH 1499596 1499596 0 0.0
RAM 224820 224820 0 0.0
qpg lighting-app qpg6200+debug FLASH 842684 842684 0 0.0
RAM 127868 127868 0 0.0
lock-app qpg6200+debug FLASH 781300 781300 0 0.0
RAM 118816 118816 0 0.0
realtek light-switch-app rtl8777g FLASH 680824 680824 0 0.0
RAM 101600 101600 0 0.0
lighting-app rtl8777g FLASH 724768 724768 0 0.0
RAM 101956 101956 0 0.0
stm32 light STM32WB5MM-DK FLASH 475468 475468 0 0.0
RAM 141388 141388 0 0.0
telink bridge-app tl7218x FLASH 730906 730906 0 0.0
RAM 95924 95924 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 850332 850332 0 0.0
RAM 44340 44340 0 0.0
tl7218x FLASH 841738 841738 0 0.0
RAM 99724 99724 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 730236 730236 0 0.0
RAM 55984 55984 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 793462 793462 0 0.0
RAM 75160 75160 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 730180 730180 0 0.0
RAM 33468 33468 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 613142 613142 0 0.0
RAM 118396 118396 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 839872 839876 4 0.0
RAM 97432 97432 0 0.0

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.32%. Comparing base (cdb458b) to head (a1edcc0).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/app/server/JointFabricDatastore.cpp 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #71509      +/-   ##
==========================================
- Coverage   54.32%   54.32%   -0.01%     
==========================================
  Files        1577     1577              
  Lines      108257   108258       +1     
  Branches    13401    13402       +1     
==========================================
  Hits        58806    58806              
- Misses      49451    49452       +1     

☔ 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.

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.

1 participant