Skip to content

[Darwin] add implementations for Darwin cluster extensions#43498

Merged
woody-apple merged 2 commits intoproject-chip:masterfrom
kiel-apple:darwin-extension-template-implementation-updates
Mar 6, 2026
Merged

[Darwin] add implementations for Darwin cluster extensions#43498
woody-apple merged 2 commits intoproject-chip:masterfrom
kiel-apple:darwin-extension-template-implementation-updates

Conversation

@kiel-apple
Copy link
Copy Markdown
Contributor

@kiel-apple kiel-apple commented Mar 5, 2026

Summary

Before changes, headers were correctly generated, but not matching implementations. Add matching implementations for codegen.

Testing

  • ./scripts/tools/zap_regen_all.py --type all; check for no changes. (no darwin-specific cluster extensions are specified in config.)

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

headers were correctly generated, but not matching implementations
Copilot AI review requested due to automatic review settings March 5, 2026 21:50
@kiel-apple kiel-apple requested a review from a team as a code owner March 5, 2026 21:50
@github-actions github-actions bot added the darwin label Mar 5, 2026
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

Adds missing Objective-C implementation generation for “Darwin cluster private extensions” so generated private headers have matching .mm implementations in the Darwin framework codegen pipeline.

Changes:

  • Generate private-extension implementations for manufacturer-specific command params payload objects.
  • Generate PrivateExtensions categories for MTRCluster* and MTRBaseCluster* to support private manufacturer-specific commands/attributes.
  • Extend private attribute decoding and “attribute specified” checks to cover private-extension attributes.

Reviewed changes

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

Show a summary per file
File Description
src/darwin/Framework/CHIP/templates/MTRCommandPayloadsObjc_Private-src.zapt Adds implementations for manufacturer-specific command payload param classes for private extensions.
src/darwin/Framework/CHIP/templates/MTRClusters_Private-src.zapt Adds MTRCluster* (PrivateExtensions) command + attribute read/write implementations for private extensions.
src/darwin/Framework/CHIP/templates/MTRBaseClusters_Private-src.zapt Adds MTRBaseCluster* (PrivateExtensions) command + attribute implementations for private extensions.
src/darwin/Framework/CHIP/templates/MTRAttributeTLVValueDecoder_Private-src.zapt Adds private-extension attribute TLV decoding and dispatch for those clusters.
src/darwin/Framework/CHIP/templates/MTRAttributeSpecifiedCheck_Private-src.zapt Adds private-extension attribute “is specified” checks and dispatch for those clusters.

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 adds implementations for Darwin cluster extensions, which are manufacturer-specific, within the Matter (CHIP) framework. A security audit found no significant vulnerabilities, with the implementation adhering to project security architecture and best practices. The changes are consistent and appear correct, though I have a few suggestions to improve conciseness in the templates by combining nested if conditions, in line with the repository's style guide.

Prevents generating a (PrivateMethods) category on a params class
that was never implemented when isSupported returns false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 5 out of 5 changed files in this pull request and generated no new comments.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 5, 2026

PR #43498: Size comparison from aba5ca5 to c9571d3

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 aba5ca5 c9571d3 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1089642 1089708 66 0.0
RAM 144762 144762 0 0.0
bl616 lighting-app bl616+thread FLASH 1100044 1100108 64 0.0
RAM 104184 104184 0 0.0
bl616+wifi+shell FLASH 1586900 1586972 72 0.0
RAM 98080 98080 0 0.0
bl702 lighting-app bl702+eth FLASH 1052746 1052812 66 0.0
RAM 108357 108357 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 890748 890814 66 0.0
RAM 105748 105748 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 779160 779220 60 0.0
RAM 103324 103324 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 786516 786576 60 0.0
RAM 108508 108508 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 732752 732812 60 0.0
RAM 97316 97316 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 716188 716248 60 0.0
RAM 97476 97476 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 558062 558130 68 0.0
RAM 204504 204504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 591194 591262 68 0.0
RAM 204744 204744 0 0.0
efr32 lock-app BRD4187C FLASH 972268 972332 64 0.0
RAM 125220 125220 0 0.0
BRD4338a FLASH 769396 769476 80 0.0
RAM 236552 236552 0 0.0
window-app BRD4187C FLASH 1074992 1075056 64 0.0
RAM 126440 126440 0 0.0
esp32 all-clusters-app c3devkit DRAM 98356 98356 0 0.0
FLASH 1593726 1594976 1250 0.1
IRAM 93514 93514 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 855296 856072 776 0.1
RAM 161999 161999 0 0.0
nxp contact mcxw71+release FLASH 735832 735904 72 0.0
RAM 66936 66936 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1705500 1706756 1256 0.1
RAM 213940 213940 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1606316 1607524 1208 0.1
RAM 210812 210812 0 0.0
light cy8ckit_062s2_43012 FLASH 1470564 1470652 88 0.0
RAM 196988 196988 0 0.0
lock cy8ckit_062s2_43012 FLASH 1497276 1497364 88 0.0
RAM 224732 224732 0 0.0
qpg lighting-app qpg6200+debug FLASH 840696 840748 52 0.0
RAM 127780 127780 0 0.0
lock-app qpg6200+debug FLASH 779340 779408 68 0.0
RAM 118728 118728 0 0.0
realtek light-switch-app rtl8777g FLASH 720712 720776 64 0.0
RAM 113448 113448 0 0.0
lighting-app rtl8777g FLASH 767896 767960 64 0.0
RAM 114688 114688 0 0.0
stm32 light STM32WB5MM-DK FLASH 478820 478880 60 0.0
RAM 141324 141324 0 0.0
telink bridge-app tl7218x FLASH 728196 728880 684 0.1
RAM 95768 95768 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 852960 853022 62 0.0
RAM 44184 44184 0 0.0
tl7218x FLASH 844360 844422 62 0.0
RAM 99572 99572 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 725664 725726 62 0.0
RAM 55740 55740 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 788228 788290 62 0.0
RAM 74924 74924 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725664 725726 62 0.0
RAM 33228 33228 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 615416 615478 62 0.0
RAM 118232 118232 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 843182 843248 66 0.0
RAM 97280 97280 0 0.0

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.05%. Comparing base (aba5ca5) to head (c9571d3).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #43498      +/-   ##
==========================================
+ Coverage   54.03%   54.05%   +0.01%     
==========================================
  Files        1546     1549       +3     
  Lines      106642   106695      +53     
  Branches    13316    13318       +2     
==========================================
+ Hits        57627    57673      +46     
- Misses      49015    49022       +7     

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

@woody-apple woody-apple merged commit 10df0b1 into project-chip:master Mar 6, 2026
89 of 92 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in [Platform] Darwin Mar 6, 2026
Alami-Amine pushed a commit to Alami-Amine/connectedhomeip that referenced this pull request Mar 16, 2026
…hip#43498)

* add implementations for DarwinClustersWithPrivateExtensions

headers were correctly generated, but not matching implementations

* Move command_params_internal_methods inside isSupported guard

Prevents generating a (PrivateMethods) category on a params class
that was never implemented when isSupported returns false.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants