Skip to content

[CodeDriven] Convert Actions cluster to be code-driven#43471

Merged
mergify[bot] merged 11 commits intoproject-chip:masterfrom
Elen777300:code_driven_actions_cluster
Mar 27, 2026
Merged

[CodeDriven] Convert Actions cluster to be code-driven#43471
mergify[bot] merged 11 commits intoproject-chip:masterfrom
Elen777300:code_driven_actions_cluster

Conversation

@Elen777300
Copy link
Copy Markdown
Contributor

@Elen777300 Elen777300 commented Mar 4, 2026

Summary

Migrate Actions cluster to be Code-Driven

Related issues

43162

Testing

Tested using chip-all-clusters-app and matter-repl.
Added unit tests.

See: Pull Request Guidelines

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 converts the Actions cluster to a code-driven model, introducing new ActionsCluster.h, ActionsCluster.cpp, and CodegenIntegration.cpp files, and refactoring existing actions-server.h and actions-server.cpp as a legacy facade. While this refactoring improves maintainability and testability, several security and stability issues were identified in the new ActionsCluster implementation. These include potential null pointer dereferences, a logic error in attribute reading, incompatible return types in InvokeCommand methods, and redundant checks in command handlers. Addressing these issues is crucial for the robustness and compliance of the cluster.

Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/tests/TestActionsCluster.cpp Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

PR #43471: Size comparison from 524356a to c816074

Full report (1 build for stm32)
platform target config section 524356a c816074 change % change
stm32 light STM32WB5MM-DK FLASH 478980 478980 0 0.0
RAM 141332 141332 0 0.0

@Elen777300 Elen777300 force-pushed the code_driven_actions_cluster branch 2 times, most recently from cfd1b02 to 775c7bb Compare March 5, 2026 16:38
@Elen777300 Elen777300 linked an issue Mar 5, 2026 that may be closed by this pull request
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 5, 2026

PR #43471: Size comparison from ae4c1e9 to ac7ff51

Full report (11 builds for cc13x4_26x4, cc32xx, qpg, realtek, stm32)
platform target config section ae4c1e9 ac7ff51 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779160 779160 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786516 786516 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732744 732744 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716180 716180 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558062 558062 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591194 591194 0 0.0
RAM 204744 204744 0 0.0
qpg lighting-app qpg6200+debug FLASH 840688 840688 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779332 779332 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720704 720704 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767888 767888 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478812 478812 0 0.0
RAM 141324 141324 0 0.0

@Elen777300 Elen777300 force-pushed the code_driven_actions_cluster branch from ac7ff51 to f42ba66 Compare March 6, 2026 07:10
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

PR #43471: Size comparison from a92c842 to f42ba66

Full report (5 builds for cc32xx, realtek, stm32)
platform target config section a92c842 f42ba66 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767960 767960 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478880 478880 0 0.0
RAM 141324 141324 0 0.0

@Elen777300 Elen777300 force-pushed the code_driven_actions_cluster branch 2 times, most recently from 1bd336a to 16a0a48 Compare March 6, 2026 07:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

PR #43471: Size comparison from a92c842 to 16a0a48

Full report (24 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, nxp, psoc6, qpg, realtek, stm32)
platform target config section a92c842 16a0a48 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089708 1089708 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100108 1100108 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586972 1586972 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052812 1052812 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890814 890814 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779220 779220 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 972332 972332 0 0.0
RAM 125220 125220 0 0.0
BRD4338a FLASH 769484 769476 -8 -0.0
RAM 236552 236552 0 0.0
window-app BRD4187C FLASH 1075064 1075056 -8 -0.0
RAM 126440 126440 0 0.0
nxp contact mcxw71+release FLASH 735904 735904 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1706756 1706444 -312 -0.0
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607524 1606916 -608 -0.0
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470652 1470652 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497364 1497364 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840748 840748 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779408 779408 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767960 767960 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478880 478880 0 0.0
RAM 141324 141324 0 0.0

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 52.73973% with 69 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.26%. Comparing base (7ef53d2) to head (9892390).
⚠️ Report is 16 commits behind head on master.

Files with missing lines Patch % Lines
src/app/clusters/actions-server/ActionsCluster.cpp 37.36% 57 Missing ⚠️
...app/clusters/actions-server/CodegenIntegration.cpp 80.85% 9 Missing ⚠️
src/app/util/mock/CodegenEmberMocks.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43471      +/-   ##
==========================================
+ Coverage   54.21%   54.26%   +0.05%     
==========================================
  Files        1562     1563       +1     
  Lines      107371   107369       -2     
  Branches    13311    13316       +5     
==========================================
+ Hits        58212    58266      +54     
+ Misses      49159    49103      -56     

☔ 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

github-actions Bot commented Mar 6, 2026

PR #43471: Size comparison from a92c842 to 7066dd2

Full report (24 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, nxp, psoc6, qpg, realtek, stm32)
platform target config section a92c842 7066dd2 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089708 1089708 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100108 1100108 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586972 1586972 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052812 1052812 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890814 890814 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779220 779220 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 972332 972332 0 0.0
RAM 125220 125220 0 0.0
BRD4338a FLASH 769484 769476 -8 -0.0
RAM 236552 236552 0 0.0
window-app BRD4187C FLASH 1075064 1075056 -8 -0.0
RAM 126440 126440 0 0.0
nxp contact mcxw71+release FLASH 735904 735904 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1706756 1706444 -312 -0.0
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607524 1606916 -608 -0.0
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470652 1470652 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497364 1497364 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840748 840748 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779408 779408 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767960 767960 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478880 478880 0 0.0
RAM 141324 141324 0 0.0

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

PR #43471: Size comparison from a92c842 to c066589

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 a92c842 c066589 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089708 1089708 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100108 1100108 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586972 1586972 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052812 1052812 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890814 890814 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779220 779220 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 972332 972332 0 0.0
RAM 125220 125220 0 0.0
BRD4338a FLASH 769484 769476 -8 -0.0
RAM 236552 236552 0 0.0
window-app BRD4187C FLASH 1075064 1075056 -8 -0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1594976 1595486 510 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 856072 856076 4 0.0
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735904 735904 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1706756 1706444 -312 -0.0
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607524 1606916 -608 -0.0
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470652 1470652 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497364 1497364 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840748 840748 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779408 779408 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767960 767960 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478880 478880 0 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728880 728586 -294 -0.0
RAM 95768 95768 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 853022 853022 0 0.0
RAM 44184 44184 0 0.0
tl7218x FLASH 844422 844422 0 0.0
RAM 99572 99572 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725726 725726 0 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788290 788290 0 0.0
RAM 74924 74924 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725726 725726 0 0.0
RAM 33228 33228 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615478 615478 0 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 843244 843248 4 0.0
RAM 97280 97280 0 0.0

@Elen777300 Elen777300 force-pushed the code_driven_actions_cluster branch from c066589 to 5d09b69 Compare March 9, 2026 12:26
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

PR #43471: Size comparison from a94849f to 5d09b69

Full report (10 builds for cc13x4_26x4, cc32xx, nrfconnect, realtek, stm32)
platform target config section a94849f 5d09b69 change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779236 779236 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857656 857080 -576 -0.1
RAM 161999 161999 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767984 767984 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478904 478904 0 0.0
RAM 141324 141324 0 0.0

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

PR #43471: Size comparison from a94849f to 93ddef9

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 a94849f 93ddef9 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089430 1089430 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100108 1100108 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586972 1586972 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052790 1052790 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890814 890814 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779236 779236 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 971260 971260 0 0.0
RAM 125796 125796 0 0.0
BRD4338a FLASH 769684 769676 -8 -0.0
RAM 236552 236552 0 0.0
window-app BRD4187C FLASH 1074944 1074944 0 0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1596670 1596508 -162 -0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857656 857128 -528 -0.1
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735904 735904 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708852 1707396 -1456 -0.1
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607524 1605756 -1768 -0.1
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470668 1470668 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497364 1497364 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840748 840748 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779408 779408 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767984 767984 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478904 478904 0 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728880 728034 -846 -0.1
RAM 95768 95768 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 853046 853046 0 0.0
RAM 44184 44184 0 0.0
tl7218x FLASH 844446 844446 0 0.0
RAM 99572 99572 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725726 725726 0 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788290 788290 0 0.0
RAM 74924 74924 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725726 725726 0 0.0
RAM 33228 33228 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615502 615502 0 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 843242 843246 4 0.0
RAM 97280 97280 0 0.0

@Elen777300 Elen777300 force-pushed the code_driven_actions_cluster branch from 93ddef9 to aaa2300 Compare March 9, 2026 14:25
@Elen777300 Elen777300 marked this pull request as ready for review March 9, 2026 15:02
@Elen777300 Elen777300 changed the title [draft] Convert Actions cluster to be code-driven [CodeDriven] Convert Actions cluster to be code-driven Mar 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 9, 2026

PR #43471: Size comparison from a94849f to 2c7a59d

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 a94849f 2c7a59d change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089430 1089430 0 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100108 1100108 0 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586972 1586972 0 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052790 1052790 0 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890814 890814 0 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779236 779236 0 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786576 786576 0 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732812 732812 0 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716248 716248 0 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558130 558130 0 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591262 591262 0 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 971260 971260 0 0.0
RAM 125796 125796 0 0.0
BRD4338a FLASH 769684 769676 -8 -0.0
RAM 236552 236552 0 0.0
window-app BRD4187C FLASH 1074944 1074944 0 0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1596670 1596608 -62 -0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 857656 857240 -416 -0.0
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735904 735904 0 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1708852 1707492 -1360 -0.1
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1607524 1605852 -1672 -0.1
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470668 1470668 0 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497364 1497364 0 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840748 840748 0 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779408 779408 0 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720776 720776 0 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767984 767984 0 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478904 478904 0 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728880 728078 -802 -0.1
RAM 95768 95768 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 853046 853046 0 0.0
RAM 44184 44184 0 0.0
tl7218x FLASH 844446 844446 0 0.0
RAM 99572 99572 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725726 725726 0 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788290 788290 0 0.0
RAM 74924 74924 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725726 725726 0 0.0
RAM 33228 33228 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615502 615502 0 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 843242 843246 4 0.0
RAM 97280 97280 0 0.0

Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/clusters/actions-server/ActionsCluster.cpp Outdated
Comment thread src/app/zap-templates/zcl/zcl-with-test-extensions.json Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 26, 2026

PR #43471: Size comparison from 1edbe71 to 2396b9c

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 1edbe71 2396b9c change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1091534 1091534 0 0.0
RAM 144858 144858 0 0.0
bl616 lighting-app bl616+thread FLASH 1102036 1102036 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1588940 1588940 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1054474 1054474 0 0.0
RAM 108461 108461 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892370 892370 0 0.0
RAM 105836 105836 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 781184 781184 0 0.0
RAM 103396 103396 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 788132 788132 0 0.0
RAM 108588 108588 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 734472 734472 0 0.0
RAM 97396 97396 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 717892 717892 0 0.0
RAM 97556 97556 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 559958 559958 0 0.0
RAM 204568 204568 0 0.0
lock CC3235SF_LAUNCHXL FLASH 592826 592826 0 0.0
RAM 204816 204816 0 0.0
efr32 lock-app BRD4187C FLASH 975460 975460 0 0.0
RAM 126180 126180 0 0.0
BRD4338a FLASH 773156 773148 -8 -0.0
RAM 236648 236648 0 0.0
window-app BRD4187C FLASH 1079768 1079760 -8 -0.0
RAM 126792 126792 0 0.0
esp32 all-clusters-app c3devkit DRAM 98460 98460 0 0.0
FLASH 1598852 1599046 194 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 859812 860328 516 0.1
RAM 162093 162094 1 0.0
nxp contact mcxw71+release FLASH 737600 737600 0 0.0
RAM 67016 67016 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1711212 1711388 176 0.0
RAM 214028 214028 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1609604 1609148 -456 -0.0
RAM 210900 210908 8 0.0
light cy8ckit_062s2_43012 FLASH 1473436 1473436 0 0.0
RAM 197068 197068 0 0.0
lock cy8ckit_062s2_43012 FLASH 1499524 1499524 0 0.0
RAM 224820 224820 0 0.0
qpg lighting-app qpg6200+debug FLASH 842220 842220 0 0.0
RAM 127868 127868 0 0.0
lock-app qpg6200+debug FLASH 781132 781132 0 0.0
RAM 118816 118816 0 0.0
realtek light-switch-app rtl8777g FLASH 731864 731864 0 0.0
RAM 113484 113484 0 0.0
lighting-app rtl8777g FLASH 784920 784920 0 0.0
RAM 114724 114724 0 0.0
stm32 light STM32WB5MM-DK FLASH 480972 480972 0 0.0
RAM 141388 141388 0 0.0
telink bridge-app tl7218x FLASH 730738 729730 -1008 -0.1
RAM 95852 95852 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 855340 855340 0 0.0
RAM 44264 44264 0 0.0
tl7218x FLASH 846750 846750 0 0.0
RAM 99652 99652 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 727532 727532 0 0.0
RAM 55832 55832 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 790100 790100 0 0.0
RAM 75008 75008 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 727526 727526 0 0.0
RAM 33312 33312 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 618478 618478 0 0.0
RAM 118320 118320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 845520 845524 4 0.0
RAM 97360 97360 0 0.0

Elen777300 and others added 11 commits March 26, 2026 22:55
Get rid of unnecessary checks
Move private functions to be helper functions
Cleanup code
  - Rename OnStateChanged/OnActionFailed to GenerateEvent overloads taking
    the event struct directly, reducing parameter count and matching the
    underlying eventsGenerator API.
  - Wrap ActionsCluster.cpp in namespace chip::app::Clusters to reduce
    using-namespace boilerplate.
  - Replace DispatchActionCommand template with inline decode/validate/
    dispatch logic in InvokeCommand, as the template generalization added
    complexity without benefit.
  - Move BuildOptionalAttributes and BuildSetupURL (renamed ReadSetupURL)
    to anonymous-namespace free functions in CodegenIntegration.cpp;
    replace the fixed-size char[] buffer with std::string.
  - Add singleton guard (sInstanceCount) to ActionsServer: the Actions
    cluster is Node-scoped per the Matter spec and must live on a single
    aggregator endpoint. Log an error on double-instantiation.
  - Guard ActionListModified/EndpointListModified against calls for a
    mismatched endpoint.
  - Make Init/Shutdown idempotent via mRegistered flag to prevent spurious
    error logs when the destructor calls Shutdown after an explicit call.
  - Add README.md documenting the Node-scope constraint, per-endpoint
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 26, 2026

PR #43471: Size comparison from af89497 to 9892390

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 af89497 9892390 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1091544 1091544 0 0.0
RAM 144858 144858 0 0.0
bl616 lighting-app bl616+thread FLASH 1102052 1102052 0 0.0
RAM 104280 104280 0 0.0
bl616+wifi+shell FLASH 1588948 1588948 0 0.0
RAM 98176 98176 0 0.0
bl702 lighting-app bl702+eth FLASH 1054484 1054484 0 0.0
RAM 108461 108461 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 892380 892380 0 0.0
RAM 105836 105836 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 781200 781200 0 0.0
RAM 103396 103396 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 788132 788132 0 0.0
RAM 108588 108588 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 734480 734480 0 0.0
RAM 97396 97396 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 717900 717900 0 0.0
RAM 97556 97556 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 559958 559958 0 0.0
RAM 204568 204568 0 0.0
lock CC3235SF_LAUNCHXL FLASH 592826 592826 0 0.0
RAM 204816 204816 0 0.0
efr32 lock-app BRD4187C FLASH 975468 975468 0 0.0
RAM 126180 126180 0 0.0
BRD4338a FLASH 773180 773172 -8 -0.0
RAM 236648 236648 0 0.0
window-app BRD4187C FLASH 1079784 1079776 -8 -0.0
RAM 126792 126792 0 0.0
esp32 all-clusters-app c3devkit DRAM 98460 98460 0 0.0
FLASH 1598858 1599052 194 0.0
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 859824 860340 516 0.1
RAM 162093 162094 1 0.0
nxp contact mcxw71+release FLASH 737608 737608 0 0.0
RAM 67016 67016 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1711220 1711412 192 0.0
RAM 214028 214028 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1609620 1609164 -456 -0.0
RAM 210900 210908 8 0.0
light cy8ckit_062s2_43012 FLASH 1473452 1473452 0 0.0
RAM 197068 197068 0 0.0
lock cy8ckit_062s2_43012 FLASH 1499532 1499532 0 0.0
RAM 224820 224820 0 0.0
qpg lighting-app qpg6200+debug FLASH 842220 842220 0 0.0
RAM 127868 127868 0 0.0
lock-app qpg6200+debug FLASH 781156 781156 0 0.0
RAM 118816 118816 0 0.0
realtek light-switch-app rtl8777g FLASH 731880 731880 0 0.0
RAM 113484 113484 0 0.0
lighting-app rtl8777g FLASH 784936 784936 0 0.0
RAM 114724 114724 0 0.0
stm32 light STM32WB5MM-DK FLASH 480980 480980 0 0.0
RAM 141388 141388 0 0.0
telink bridge-app tl7218x FLASH 730744 729736 -1008 -0.1
RAM 95852 95852 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 855346 855346 0 0.0
RAM 44264 44264 0 0.0
tl7218x FLASH 846756 846756 0 0.0
RAM 99652 99652 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 727538 727538 0 0.0
RAM 55832 55832 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 790106 790106 0 0.0
RAM 75008 75008 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 727532 727532 0 0.0
RAM 33312 33312 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 618484 618484 0 0.0
RAM 118320 118320 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 845526 845530 4 0.0
RAM 97360 97360 0 0.0

@andy31415 andy31415 added the sdk-maintainer-approved PR marked by `matter-sdk-maintainers` as suitable for MERGE - meets guideline & sufficient reviews. label Mar 27, 2026
@mergify mergify Bot merged commit 5d8985b into project-chip:master Mar 27, 2026
80 of 81 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in [Platform] Darwin Mar 27, 2026
khodya pushed a commit to khodya/connectedhomeip that referenced this pull request Apr 3, 2026
…43471)

* Move Actions cluster to be code driven

* Linter error fix

* Fix includes and dependencies

* Refactor ActionsCluster
Get rid of unnecessary checks
Move private functions to be helper functions
Cleanup code

* Read SetURL from ember

* Add docs, fix test build

* Restyled by clang-format

* Actions cluster: address code review feedback

  - Rename OnStateChanged/OnActionFailed to GenerateEvent overloads taking
    the event struct directly, reducing parameter count and matching the
    underlying eventsGenerator API.
  - Wrap ActionsCluster.cpp in namespace chip::app::Clusters to reduce
    using-namespace boilerplate.
  - Replace DispatchActionCommand template with inline decode/validate/
    dispatch logic in InvokeCommand, as the template generalization added
    complexity without benefit.
  - Move BuildOptionalAttributes and BuildSetupURL (renamed ReadSetupURL)
    to anonymous-namespace free functions in CodegenIntegration.cpp;
    replace the fixed-size char[] buffer with std::string.
  - Add singleton guard (sInstanceCount) to ActionsServer: the Actions
    cluster is Node-scoped per the Matter spec and must live on a single
    aggregator endpoint. Log an error on double-instantiation.
  - Guard ActionListModified/EndpointListModified against calls for a
    mismatched endpoint.
  - Make Init/Shutdown idempotent via mRegistered flag to prevent spurious
    error logs when the destructor calls Shutdown after an explicit call.
  - Add README.md documenting the Node-scope constraint, per-endpoint

* Revisit the comments of the cluster, separate the backward compatability tests

* Enable and fix backwards-compatibility tests

* Move the backward compatability tests to the same definintion

---------

Co-authored-by: Restyled.io <commits@restyled.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app documentation Improvements or additions to documentation review - pending scripts sdk-maintainer-approved PR marked by `matter-sdk-maintainers` as suitable for MERGE - meets guideline & sufficient reviews. tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Decouple Actions cluster

5 participants