Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate for a valid cluster path when Invoke is called #37207

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

andy31415
Copy link
Contributor

This fixes #37184

When we are performing an invoke, our logic allows for CommandHandlerInterface to do the first processing and if that fails, we fall back to ember. In the SoftwareDiagnostics case (and probably other) we register them as wildcard endpoints so we always find the CHI in that case.

Existing code would do "find CHI and if found, let it process" and because SoftwareDiagnostics was available on any endpoint, we would just accept any endpoint. Added code to pre-validate we have a good endpoint/cluster combination before even attempting CHI.

Testing

Unit test and integration test added.

Copy link

semanticdiff-com bot commented Jan 27, 2025

Review changes with  SemanticDiff

Changed Files
File Status
  src/data-model-providers/codegen/CodegenDataModelProvider.cpp Unsupported file format
  src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp Unsupported file format
  src/python_testing/TestInvokeReturnCodes.py  0% smaller

Copy link

github-actions bot commented Jan 27, 2025

PR #37207: Size comparison from d21aaa5 to 325ac8a

Full report (3 builds for cc32xx, stm32)
platform target config section d21aaa5 325ac8a change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538405 538453 48 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572269 572301 32 0.0
RAM 205344 205344 0 0.0
stm32 light STM32WB5MM-DK FLASH 482552 482592 40 0.0
RAM 144672 144672 0 0.0

Copy link

github-actions bot commented Jan 27, 2025

PR #37207: Size comparison from d21aaa5 to 31e5ee7

Full report (20 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32, tizen)
platform target config section d21aaa5 31e5ee7 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093530 1093530 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650142 650142 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828050 828050 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056602 1056602 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888036 888036 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971022 971022 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837944 837992 48 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823364 823412 48 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770580 770628 48 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754824 754872 48 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538405 538453 48 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572269 572301 32 0.0
RAM 205344 205344 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913600 913644 44 0.0
RAM 143168 143168 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888464 888596 132 0.0
RAM 141355 141355 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848640 848688 48 0.0
RAM 142080 142080 0 0.0
qpg lighting-app qpg6105+debug FLASH 661928 661976 48 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619724 619772 48 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482552 482592 40 0.0
RAM 144672 144672 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751452 1751732 280 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11024 11024 0 0.0
FLASH 18211390 18212894 1504 0.0
RAM 7953724 7954940 1216 0.0

Copy link

github-actions bot commented Jan 27, 2025

PR #37207: Size comparison from d21aaa5 to 63fcea0

Full report (44 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, nrfconnect, psoc6, qpg, stm32, telink, tizen)
platform target config section d21aaa5 63fcea0 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093530 1093530 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650142 650142 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828050 828050 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056602 1056602 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888036 888036 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971022 971022 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837944 837992 48 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823364 823412 48 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770580 770628 48 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754824 754872 48 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538405 538453 48 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572269 572301 32 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679353 679393 40 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699205 699245 40 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699205 699245 40 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656133 656173 40 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615737 615785 48 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635365 635413 48 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635365 635413 48 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635209 635257 48 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654917 654965 48 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654917 654965 48 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611653 611693 40 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631513 631553 40 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631513 631553 40 0.0
RAM 71252 71252 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913600 913644 44 0.0
RAM 143168 143168 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888464 888596 132 0.0
RAM 141355 141355 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848640 848688 48 0.0
RAM 142080 142080 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1646308 48 0.0
RAM 211560 211560 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1553100 64 0.0
RAM 208376 208376 0 0.0
light cy8ckit_062s2_43012 FLASH 1468700 1468764 64 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466748 1466796 48 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661928 661976 48 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619724 619772 48 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482552 482592 40 0.0
RAM 144672 144672 0 0.0
telink bridge-app tlsr9258a FLASH 681300 681366 66 0.0
RAM 91084 91084 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621330 621396 66 0.0
RAM 31484 31484 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 770184 770250 66 0.0
RAM 49344 49344 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 774600 774666 66 0.0
RAM 99648 99648 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708502 708568 66 0.0
RAM 73376 73376 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625610 625676 66 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812982 813048 66 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751452 1751732 280 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11024 11024 0 0.0
FLASH 18211390 18212894 1504 0.0
RAM 7953724 7954940 1216 0.0

Copy link

github-actions bot commented Jan 27, 2025

PR #37207: Size comparison from d21aaa5 to e94b6a7

Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section d21aaa5 e94b6a7 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093530 1093530 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650142 650142 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828050 828050 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056602 1056602 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888036 888036 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971022 971022 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837944 837992 48 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823364 823412 48 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770580 770628 48 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754824 754872 48 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538405 538453 48 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572269 572317 48 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679353 679401 48 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699205 699253 48 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699205 699253 48 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656133 656181 48 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615737 615785 48 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635365 635413 48 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635365 635413 48 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635209 635257 48 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654917 654965 48 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654917 654965 48 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611653 611701 48 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631513 631561 48 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631513 631561 48 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936168 936232 64 0.0
RAM 159904 159904 0 0.0
BRD4338a FLASH 729580 729620 40 0.0
RAM 234768 234768 0 0.0
window-app BRD4187C FLASH 1029128 1029152 24 0.0
RAM 128040 128040 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97296 0 0.0
FLASH 1576974 1577032 58 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116092 0 0.0
FLASH 1544918 1544954 36 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2707793 2708187 394 0.0
RAM 132800 132800 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5973848 5974242 394 0.0
RAM 531616 531616 0 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5322534 5322926 392 0.0
RAM 242728 242728 0 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4680722 4681116 394 0.0
RAM 221464 221464 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 13041760 13042154 394 0.0
RAM 596178 596178 0 0.0
chip-tool-ipv6only arm64 unknown 21776 21776 0 0.0
FLASH 11118640 11119120 480 0.0
RAM 647920 647920 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11387841 11388235 394 0.0
RAM 596522 596522 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4505320 4505714 394 0.0
RAM 208648 208648 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5611557 5611957 400 0.0
RAM 483520 483520 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5623505 5623905 400 0.0
RAM 231744 231744 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4729772 4730164 392 0.0
RAM 207712 207712 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4358348 4358742 394 0.0
RAM 201352 201352 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4495852 4496244 392 0.0
RAM 205936 205936 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3003933 3004333 400 0.0
RAM 160504 160504 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4097952 4098432 480 0.0
RAM 246136 246136 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5951189 5951589 400 0.0
RAM 606920 606920 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11268573 11268957 384 0.0
RAM 710864 710864 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913600 913648 48 0.0
RAM 143168 143168 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888464 888600 136 0.0
RAM 141355 141355 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848640 848692 52 0.0
RAM 142080 142080 0 0.0
nxp contact k32w0+release FLASH 584240 584288 48 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599568 599616 48 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610668 610716 48 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685136 685184 48 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748600 748648 48 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1646292 32 0.0
RAM 211560 211560 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1553084 48 0.0
RAM 208376 208376 0 0.0
light cy8ckit_062s2_43012 FLASH 1468700 1468748 48 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466748 1466780 32 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661928 661976 48 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619724 619772 48 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482552 482600 48 0.0
RAM 144672 144672 0 0.0
telink bridge-app tlsr9258a FLASH 681300 681358 58 0.0
RAM 91084 91084 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621330 621388 58 0.0
RAM 31484 31484 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 770184 770242 58 0.0
RAM 49344 49344 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 774600 774658 58 0.0
RAM 99648 99648 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708502 708560 58 0.0
RAM 73376 73376 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625610 625668 58 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812982 813040 58 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751452 1751732 280 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11024 11024 0 0.0
FLASH 18211390 18212894 1504 0.0
RAM 7953724 7954940 1216 0.0

Copy link

github-actions bot commented Jan 27, 2025

PR #37207: Size comparison from d21aaa5 to a605a2c

Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section d21aaa5 a605a2c change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093530 1093530 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650142 650142 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828050 828050 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056602 1056602 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888036 888036 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971022 971022 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837944 837992 48 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823364 823412 48 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770580 770628 48 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754824 754872 48 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538405 538453 48 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572269 572317 48 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679353 679401 48 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699205 699253 48 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699205 699253 48 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656133 656181 48 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615737 615785 48 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635365 635413 48 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635365 635413 48 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635209 635257 48 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654917 654965 48 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654917 654965 48 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611653 611701 48 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631513 631561 48 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631513 631561 48 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936168 936232 64 0.0
RAM 159904 159904 0 0.0
BRD4338a FLASH 729580 729620 40 0.0
RAM 234768 234768 0 0.0
window-app BRD4187C FLASH 1029128 1029152 24 0.0
RAM 128040 128040 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97296 0 0.0
FLASH 1576974 1577032 58 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116092 0 0.0
FLASH 1544918 1544954 36 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2707793 2708187 394 0.0
RAM 132800 132800 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5973848 5974242 394 0.0
RAM 531616 531616 0 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5322534 5322926 392 0.0
RAM 242728 242728 0 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4680722 4681116 394 0.0
RAM 221464 221464 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 13041760 13042154 394 0.0
RAM 596178 596178 0 0.0
chip-tool-ipv6only arm64 unknown 21776 21776 0 0.0
FLASH 11118640 11119120 480 0.0
RAM 647920 647920 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11387841 11388235 394 0.0
RAM 596522 596522 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4505320 4505714 394 0.0
RAM 208648 208648 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5611557 5611957 400 0.0
RAM 483520 483520 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5623505 5623905 400 0.0
RAM 231744 231744 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4729772 4730164 392 0.0
RAM 207712 207712 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4358348 4358742 394 0.0
RAM 201352 201352 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4495852 4496244 392 0.0
RAM 205936 205936 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3003933 3004333 400 0.0
RAM 160504 160504 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4097952 4098432 480 0.0
RAM 246136 246136 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5951189 5951589 400 0.0
RAM 606920 606920 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11268573 11268957 384 0.0
RAM 710864 710864 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913600 913648 48 0.0
RAM 143168 143168 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888464 888600 136 0.0
RAM 141355 141355 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848640 848692 52 0.0
RAM 142080 142080 0 0.0
nxp contact k32w0+release FLASH 584240 584288 48 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599568 599616 48 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610668 610716 48 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685136 685184 48 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748600 748648 48 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1646292 32 0.0
RAM 211560 211560 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1553084 48 0.0
RAM 208376 208376 0 0.0
light cy8ckit_062s2_43012 FLASH 1468700 1468748 48 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466748 1466780 32 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661928 661976 48 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619724 619772 48 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482552 482600 48 0.0
RAM 144672 144672 0 0.0
telink bridge-app tlsr9258a FLASH 681300 681358 58 0.0
RAM 91084 91084 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621330 621388 58 0.0
RAM 31484 31484 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 770184 770242 58 0.0
RAM 49344 49344 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 774600 774658 58 0.0
RAM 99648 99648 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708502 708560 58 0.0
RAM 73376 73376 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625610 625668 58 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812982 813040 58 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751452 1751732 280 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11024 11024 0 0.0
FLASH 18211390 18212894 1504 0.0
RAM 7953724 7954940 1216 0.0

@@ -159,6 +159,16 @@ std::optional<DataModel::ActionReturnStatus> CodegenDataModelProvider::Invoke(co
TLV::TLVReader & input_arguments,
CommandHandler * handler)
{
// Ensure the command actually exists on the relevant cluster instance.
Copy link
Contributor

@bzbarsky-apple bzbarsky-apple Jan 28, 2025

Choose a reason for hiding this comment

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

This does not in fact ensure that. This is ensuring the cluster exists. It does not ensure that the cluster instance involved exposes this command. That would involve interrogating the CHI instance to see what commands it supports for this specific cluster path.

Note that just doing InvokeCommand on the CHI might not do that check, because the invariant so far has been that InvokeCommand is only called if you claim to have the command at all....

So either we need to end up checking the AcceptedCommands thing from here anyway, or we need a change in the CHI contract....

More generally, I think we should try to minimize the amount of logic that providers have to implement (and hence get wrong). That's why we currently have the existence checks in the IM engine...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated comment, I think in this case I would say "this makes it better than before" and would follow up on changing things.

From a processing logic perspective, I think we should not require invoke to accept invalid paths, but not preventing them from double-checking them either. I am a fan of trust but verify in this case.

The current contract in CHI is that commands that are not handled are silently skipped (to allow for ember fallback) so it should handle commands that are unknown. However actually double checking this is probably not practical.

Copy link

github-actions bot commented Jan 28, 2025

PR #37207: Size comparison from b082219 to 7052ac5

Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
platform target config section b082219 7052ac5 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1093546 1093546 0 0.0
RAM 103298 103298 0 0.0
bl702 lighting-app bl702+eth FLASH 650158 650158 0 0.0
RAM 25265 25265 0 0.0
bl702+wifi FLASH 828066 828066 0 0.0
RAM 13981 13981 0 0.0
bl706+mfd+rpc+littlefs FLASH 1056618 1056618 0 0.0
RAM 23861 23861 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 888052 888052 0 0.0
RAM 18504 18504 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 971038 971038 0 0.0
RAM 16368 16368 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 837952 838000 48 0.0
RAM 123464 123464 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 823372 823420 48 0.0
RAM 125344 125344 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 770596 770644 48 0.0
RAM 113804 113804 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 754840 754888 48 0.0
RAM 114012 114012 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 538413 538461 48 0.0
RAM 205192 205192 0 0.0
lock CC3235SF_LAUNCHXL FLASH 572277 572325 48 0.0
RAM 205344 205344 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 679361 679409 48 0.0
RAM 78532 78532 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 699213 699261 48 0.0
RAM 81172 81172 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 699213 699261 48 0.0
RAM 81172 81172 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 656149 656197 48 0.0
RAM 73600 73600 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 615745 615793 48 0.0
RAM 71516 71516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 635381 635429 48 0.0
RAM 74060 74060 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 635381 635429 48 0.0
RAM 74060 74060 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 635217 635265 48 0.0
RAM 74524 74524 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 654925 654973 48 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 654925 654973 48 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 611669 611717 48 0.0
RAM 68612 68612 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 631529 631577 48 0.0
RAM 71252 71252 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 631529 631577 48 0.0
RAM 71252 71252 0 0.0
efr32 lock-app BRD4187C FLASH 936200 936264 64 0.0
RAM 159904 159904 0 0.0
BRD4338a FLASH 729580 729620 40 0.0
RAM 234768 234768 0 0.0
window-app BRD4187C FLASH 1029128 1029152 24 0.0
RAM 128040 128040 0 0.0
esp32 all-clusters-app c3devkit DRAM 97296 97296 0 0.0
FLASH 1576990 1577048 58 0.0
IRAM 83820 83820 0 0.0
m5stack DRAM 116092 116092 0 0.0
FLASH 1544926 1544962 36 0.0
IRAM 117039 117039 0 0.0
linux air-purifier-app debug unknown 4760 4760 0 0.0
FLASH 2707835 2708229 394 0.0
RAM 132800 132800 0 0.0
all-clusters-app debug unknown 5568 5568 0 0.0
FLASH 5973890 5974284 394 0.0
RAM 531616 531616 0 0.0
all-clusters-minimal-app debug unknown 5464 5464 0 0.0
FLASH 5322576 5322968 392 0.0
RAM 242728 242728 0 0.0
bridge-app debug unknown 5480 5480 0 0.0
FLASH 4680764 4681158 394 0.0
RAM 221464 221464 0 0.0
chip-tool debug unknown 5984 5984 0 0.0
FLASH 13041802 13042196 394 0.0
RAM 596178 596178 0 0.0
chip-tool-ipv6only arm64 unknown 21776 21776 0 0.0
FLASH 11118672 11119152 480 0.0
RAM 647920 647920 0 0.0
fabric-admin debug unknown 5808 5808 0 0.0
FLASH 11387883 11388277 394 0.0
RAM 596522 596522 0 0.0
fabric-bridge-app debug unknown 4736 4736 0 0.0
FLASH 4505362 4505756 394 0.0
RAM 208648 208648 0 0.0
fabric-sync debug unknown 4976 4976 0 0.0
FLASH 5611605 5612005 400 0.0
RAM 483520 483520 0 0.0
lighting-app debug+rpc+ui unknown 6144 6144 0 0.0
FLASH 5623521 5623921 400 0.0
RAM 231744 231744 0 0.0
lock-app debug unknown 5416 5416 0 0.0
FLASH 4729814 4730206 392 0.0
RAM 207712 207712 0 0.0
ota-provider-app debug unknown 4776 4776 0 0.0
FLASH 4358390 4358784 394 0.0
RAM 201352 201352 0 0.0
ota-requestor-app debug unknown 4728 4728 0 0.0
FLASH 4495894 4496286 392 0.0
RAM 205936 205936 0 0.0
shell debug unknown 4256 4256 0 0.0
FLASH 3003981 3004365 384 0.0
RAM 160504 160504 0 0.0
thermostat-no-ble arm64 unknown 9536 9536 0 0.0
FLASH 4097984 4098464 480 0.0
RAM 246136 246136 0 0.0
tv-app debug unknown 5744 5744 0 0.0
FLASH 5951237 5951621 384 0.0
RAM 606920 606920 0 0.0
tv-casting-app debug unknown 5320 5320 0 0.0
FLASH 11268605 11269005 400 0.0
RAM 710864 710864 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 913616 913664 48 0.0
RAM 143168 143168 0 0.0
nrf7002dk_nrf5340_cpuapp FLASH 888468 888604 136 0.0
RAM 141355 141355 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 FLASH 848644 848696 52 0.0
RAM 142080 142080 0 0.0
nxp contact k32w0+release FLASH 584240 584288 48 0.0
RAM 70860 70860 0 0.0
mcxw71+release FLASH 599584 599632 48 0.0
RAM 63080 63080 0 0.0
light k32w0+release FLASH 610684 610732 48 0.0
RAM 70252 70252 0 0.0
k32w1+release FLASH 685152 685200 48 0.0
RAM 48664 48664 0 0.0
lock mcxw71+release FLASH 748616 748664 48 0.0
RAM 67476 67476 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1646260 1646308 48 0.0
RAM 211560 211560 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1553036 1553084 48 0.0
RAM 208376 208376 0 0.0
light cy8ckit_062s2_43012 FLASH 1468716 1468764 48 0.0
RAM 200352 200352 0 0.0
lock cy8ckit_062s2_43012 FLASH 1466748 1466796 48 0.0
RAM 224688 224688 0 0.0
qpg lighting-app qpg6105+debug FLASH 661944 661992 48 0.0
RAM 105204 105204 0 0.0
lock-app qpg6105+debug FLASH 619740 619788 48 0.0
RAM 99648 99648 0 0.0
stm32 light STM32WB5MM-DK FLASH 482568 482616 48 0.0
RAM 144672 144672 0 0.0
telink bridge-app tlsr9258a FLASH 681316 681374 58 0.0
RAM 91084 91084 0 0.0
contact-sensor-app tlsr9528a_retention FLASH 621348 621406 58 0.0
RAM 31484 31484 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 770186 770244 58 0.0
RAM 49344 49344 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 774616 774674 58 0.0
RAM 99648 99648 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 708520 708578 58 0.0
RAM 73376 73376 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 625626 625684 58 0.0
RAM 142016 142016 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 812998 813056 58 0.0
RAM 99560 99560 0 0.0
tizen all-clusters-app arm unknown 5116 5116 0 0.0
FLASH 1751476 1751756 280 0.0
RAM 93524 93524 0 0.0
chip-tool-ubsan arm unknown 11024 11024 0 0.0
FLASH 18211518 18213022 1504 0.0
RAM 7953776 7954992 1216 0.0

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

Successfully merging this pull request may close these issues.

[BUG] Crash in ProcessCommandDataIB due to incorrect endpoint validation and VerifyOrDie assertion
6 participants