Skip to content

Sync csa branch with main - #1148

Open
silabs-matter-ci-bot[bot] wants to merge 142 commits into
mainfrom
automation/update_main
Open

Sync csa branch with main#1148
silabs-matter-ci-bot[bot] wants to merge 142 commits into
mainfrom
automation/update_main

Conversation

@silabs-matter-ci-bot

Copy link
Copy Markdown

This PR syncs the csa branch with the main branch.

PR MUST BE MERGED WITH MERGE COMMIT - ADMIN MUST ENABLE THE OPTION

…nterfaces (#73438)

On LwIP-based platforms, network interfaces are commonly identified by their
netif name. Name-based lookup is fragile, as interfaces are usually
named by vendor specific implementation.
These new accessors let a platform report its Thread and external
interfaces explicitly, avoiding name comparisons and the need for a
possible lookup update when interface names change.

These accessors have also a default implementation, so platforms that do
not override them are unaffected.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
…m-bot)

* add ota for stm32wba platform with oemirot

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Restyled by gn

* add apache 2 license

* add c++ balise

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix include for hal driver and fix IA comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update readme for spell check job

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update readme for ota

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix include order

* update readme with st link

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update readme with comments on flag for ota

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix misspell

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* silabs/zephyr: fix Kconfig indentation

Apply the same rules than the Zephyr and the Linux projects:
  - Indent with tab
  - Indent help with tab + 2 spaces
  - Limit on 80 columns (In fact, 84 columns because Matter uses 4
    spaces for a tab)
  - No indentation inside choice/if statements
  - No trailing spaces

* silabs/zephyr: fix promptless symbol

Silicon Labs Kconfigs provide default values for plenty of options.
However, if the type of the symbol is provided, the symbol is a new
instance, which is generally not the intention.

This patch is specifically fixing BT_HOST_CRYPTO because Gemini is
complaining about it. However, this change should be applied to the
others symbols.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: fix DeviceInfoProvider initialization order

Server::Init() triggers various callbacks (e.g. attribute reads, fabric
enumeration) that can call DeviceLayer::GetDeviceInfoProvider(). If
gExampleDeviceInfoProvider is registered *after* Server::Init() returns,
those callbacks silently get a NULL provider and fail to retrieve device
info (product name, vendor ID, etc.), leading to incorrect behaviour
during commissioning.

Fix by moving the SetStorageDelegate() / SetDeviceInfoProvider() calls to
before Server::Init(), using initParams.persistentStorageDelegate directly
(which is the same object that Server::GetPersistentStorage() would
return afterwards).

Also guard the OperationalKeystore::Init() call under
CONFIG_OPERATIONAL_KEYSTORE since persistentStorage is only needed in
that context.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* silabs/zephyr: update overlays for siwx917

ulpuart and sram was already configured with the configuration in
Zephyr. So these entries were useless.

In addition, the offset of the storage_partition overlapped with
ota_swap_partition. So the OTA process would probably overwrite the
data. The available flash ends at 0x00400000.

So, we slightly reduced the size of the code_partition to allocate the
storage_partition at the end of the available area:

  0x00400000 -- end --
  0x003e9000 storage
  0x003e1000 settings
  0x003e0000 factory
  0x00202000 code

This patch also align the size of the storage partitions on brd4338 and
brd4342 (was 68kB, updated to 92kB).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: fix PSA_CRYPTO_SW_ONLY dependency

Currently, Zephyr compilation fails with:

    warning: default on the choice symbol PSA_CRYPTO_SW_ONLY will have
    no effect, as defaults do not affect choice symbols

Indeed PSA_CRYPTO_SW_ONLY should be selected either with

    choice PSA_CRYPTO_DRIVER_IMPLEMENTATION
           default PSA_CRYPTO_SW_ONLY
    endchoice

or with:

    depends on PSA_CRYPTO_SW_ONLY

BTW, since v2026.06 PSA_CRYPTO_SW_ONLY is the default for swix91x. So
this statement can be removed.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: fix CMSIS dependency

Currently, the compilation may fail with:

    In file included from .../zephyr/arch/arm/asm_inline.h:18,
                     from .../zephyr/arch/arm/arch.h:30,
                     from .../zephyr/arch/cpu.h:19,
                     from .../zephyr/kernel_includes.h:36,
                     from .../zephyr/kernel.h:17,
                     from .../matter/src/system/SystemMutex.h:60,
                     from .../matter/src/system/SystemMutex.cpp:26:
    .../zephyr/arch/arm/asm_inline_gcc.h:24:10: fatal error: cmsis_core.h: No such file or directory
       24 | #include <cmsis_core.h>
          |          ^~~~~~~~~~~~~~
    compilation terminated.

By specifying cmsis_6 and mbedtls explicitly, we guarantee their
CMakeLists.txt will be included first. Thus,
INTERFACE_INCLUDE_DIRECTORIES is properly filled when Matter
CMakelists.txt is included.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: fix support for WiFi

During my tests, the commissioning failed without
CONFIG_CHIP_ENABLE_WIFI_STATION=y.

In addition, the "select" statement only select the specified symbol
without taking the dependencies into account. It is better to reverse
the dependency (CHIP_WIFI is default y but depends on WIFI).

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: relocate POSIX_AEP_CHOICE_NONE

POSIX_AEP_CHOICE_NONE is global to the whole Matter project, is not
specific to the lighting sample. So, relocate the option.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: drop useless USE_SEGGER_RTT=n

Many board in Matter explicitly disable USE_SEGGER_RTT=n. It seems it is
because these board enable RTT by default in their _defconfig. Silabs
board don't do that (the user has to explicitly reference
rtt-console/rtt-console.conf snippet).

So, the current USE_SEGGER_RTT=n is either useless or error prone for
the user who really want to use RTT.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: drop explicit dependency on TLS

CONFIG_THREAD_LOCAL_STORAGE=y is already the default in Zephyr. Explicit
selection in prj.conf does not seem useful.

The origin of this setting maybe related to CONFIG_SLOW_FLASH_DATA
(which is suggested for siwx91x). Help of SILABS_SIWX91X_SLOW_FLASH_DATA
says:

    With current GCC versions (14.x), this option is incompatible with
    Thread Local Storage (TLS). User may either:
      - Use a patched version of gcc (preferred option), or
      - Rebuild libc (CONFIG_PICOLIBC_USE_MODULE=y) without TLS support
        (CONFIG_THREAD_LOCAL_STORAGE=n). In this case, access to
        "errno" will no longer be thread-safe.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: drop useless dependency on UART_ASYNC_API

Lighting application does not seems to rely on UART async API. BTW,
siwx91x does not support this API. So, CONFIG_UART_ASYNC_API=y seems to
be a mistake.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: drop useless dependency on SECURE_STORAGE_..._AES_GCM

SECURE_STORAGE_ITS_TRANSFORM_AEAD_SCHEME_AES_GCM is already the default
in Zephyr.

(BTW, SECURE_STORAGE_ITS_TRANSFORM_AEAD_SCHEME_CHACHA20_POLY1305 is
probably a faster alternative)

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: group Kconfig options

Order Kconfig options:
  1. Subsystems. Because of "depends on", many options are automatically
     selected with these options.
  2. Application related options
  3. Shell commands. It makes sense to easily add remove shell commands
     during the development
  4. Stack sizes. It makes sense to group them since the user often has
     to tune them.
  5. Debug and temporary options (empty in this sample)

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

* silabs/zephyr: drop debug features

lighting-app/silabs/zephyr/prj.conf contain a bunch of option related to
the log and the shell threads. These option are probably not required
for the sample. The defaults parameters should be sufficient and we
don't expect to see a such level of details in a sample project.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>

---------

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com>
* [AVAnalysis] Add AV Analysis Node device type (0x0149) to matter-devices.xml

Generated with Alchemy from the spec's AVAnalysisNode.adoc

* [AVAnalysis] Regenerate code for the AV Analysis Node device type
* Update TCP transport test label in PICS.yaml

* Update ci-pics-values

* Update TCP_Tests.py

* Refactor TCP session handling in TC_SEPR_2_3

* Update TC_SC_4_3.py

* Update TC_SC_4_1.py

* Fixing review comments

Updated test case steps and removed MCORE.SC.S.TCP from PICS definitions.
… API (#73533)

* Fixing the wifi ICD behavior

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…for Linux and NuttX, and fixing potential use-after-free. (#39392)

* Prevent segfaults in MdnsAvahi::Resolve for Linux and NuttX

* Fixed commit mistake
* fix(tv-casting-app): scope R8 proguard keeps to the 19 slim TLV decoder clusters

* docs(tv-casting-app): add measured SDK size impact and update R8 shrinking notes

* fix(tv-casting-app): replace Messages with MediaFileManagement in R8 proguard keeps

* docs(tv-casting-app): corrections to doc and comments

* docs(tv-casting-app): prettier formatting corrections as mandated by CI

* fix: add proguard to spell-check wordlist

* fix(tv-casting-app): document sources of truth for chip.devicecontroller R8 keeps

* docs(tv-casting-app): prettier formatting corrections by pre-commit
…Release wrapper (#73546)

* Convert group cluster CommonIterator consumers to RAII

Replace manual Iterate*()/Release() call sites in GroupKeyManagementCluster,
GroupcastCluster and GroupsCluster with AutoRelease, so early returns cannot
leak pooled iterators (see #73331, #73296). Sites that treat a null iterator
as an empty result keep that behavior via an explicit IsNull() check.

Delete the file-local AutoReleaseIterator wrapper in GroupsCluster.cpp
in favor of the shared AutoRelease.

Reference the wrappers from the GroupDataProvider::Iterate*() doc
comments and fix the IterateGroupInfo retval typo (EndpointIterator ->
GroupInfoIterator).

* add copyright header

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…#73200)

* Refactor ZoneManagement

* Refactor BooleanStateConfig and FanControl

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Replace calls on AmbientContext, OccupancySensing and OnOff clusters

* Change Humidistat, OnOffLightning and WindowCovering clusters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update Chime, LevelControl and CameraAVStream clusters

* Update ResourceMonitoring, TimeFormatLocalization, UnitLocalization and ValveConfiguration clusters

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Removed parameter ota_image_expected_version from test TC_SU_2_7 added method to read the software version from the ota image

* Updated TC SU 2.5 to read the software version from the ota image

* Typo in message for not found

* Fix from code review

* Added MAGIC compare to check if is ota IMAGE. Removed path exists

* Updated step 1 to ensure the transition from Download to kApplying was instant ( or almost )

* Revert "Updated step 1 to ensure the transition from Download to kApplying was instant ( or almost )"

This reverts commit 2bfcb36764f131d0ceea70baa407614088c1e431.

* Solving cconflict for TC_SU_2_2

* Removed f strings at log statements.

* fix: Added docstring to new methods and fixed typos.
…#73556)

* Convert IterateX/Release calls in the core with AutoRelease wrapper

Replace manual Iterate*()/Release() calls in WriteHandler,
CommandHandlerImpl and Server::RejoinExistingMulticastGroups with
AutoRelease, so early returns cannot leak pooled iterators (#73331).

remove WriteHandler's file-local AutoReleaseGroupEndpointIterator
wrapper.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…560)

#72559 stopped minimal-mDNS from sending into the Thread mesh by skipping wpan*
interfaces, but only in AddressPolicy_DefaultImpl. The libnl policy, which a
Linux build selects with chip_minmdns_default_policy = "libnl", filters on the
link flags and has no equivalent, so it still hands wpan0 to the mDNS server and
the traffic #72559 set out to avoid goes out over the mesh.

Apply the same rule there. Matching on the interface name is not satisfying and
libnl could offer something better, but OpenThread presents wpan0 as a tun
device, so the link type does not identify it either -- and keeping the two
policies in agreement matters more than the shape of the test.

Untested at runtime: this policy is not the default and is not what my build
selects. Compiled against libnl-3.

Assisted-By: Claude Opus 5

Signed-off-by: Christian Glombek <c.glombek@cosa.systems>
…s, commands, and events to reduce Flash footprint (#73545)

* [app] Monomorphic forwarding in DataModel::Encode and Decode for enum types

Update DataModel::Encode and DataModel::Decode for C++ enum types (std::is_enum)
to forward directly to underlying integer types (std::underlying_type_t<X> / to_underlying(x))
rather than instantiating TLVWriter::Put<EnumType> and TLVReader::Get<EnumType> templates
per enum type.

This eliminates redundant per-enum template instantiations across server cluster implementations,
reducing Flash binary footprint.

* [app] Monomorphic forwarding in DataModel::Encode and Decode for BitFlags types

Update DataModel::Encode and DataModel::Decode for BitFlags<X> bitmap types to
forward directly to raw integer storage (x.Raw() / x.SetRaw()) rather than
instantiating TLVWriter::Put<BitFlags<X>> and TLVReader::Get<BitFlags<X>> templates
per bitmap type.

This eliminates redundant per-bitmap template instantiations, reducing Flash binary
footprint.

* [app] Monomorphize response command payload encoding using non-virtual callback descriptor

Replace the templated virtual class EncodableResponseCommandPayload<CommandData> in
CommandHandler with a lightweight, non-virtual EncodableResponsePayload descriptor struct
containing a data pointer and a type-erased EncodeFn function pointer.

Previously, every response command type in the SDK instantiated a distinct class subclassing
DataModel::EncodableToTLV, generating virtual function tables (vtables), RTTI metadata, and virtual
destructors for ~200 response command types across cluster implementations.

Using EncodableResponsePayload:
- Eliminates vtables and RTTI structures for command responses.
- Reduces .rodata section footprint by ~1.02 KiB on nRF52840DK (all-clusters-app).
- Reduces overall Flash binary footprint by -824 B.
- Reduces symbol/string metadata by ~134 KiB.

[app] Enhance doc comments detailing virtual destructor and vtable bloat elimination

Add explicit header documentation explaining the design rationale behind replacing templated
virtual class instantiations with POD descriptors and standalone function pointer callbacks:
- Avoids compiler-generated virtual class constructors and destructors (both complete object and deleting destructors).
- Eliminates per-type vtable arrays and RTTI/typeinfo metadata across command response and event payload instantiations.

* [app] Monomorphize event payload writer using non-templated callback class

Replace the templated virtual class SimpleEventPayloadWriter<T> in EventsGenerator.h with a
single, non-templated SimpleEventPayloadWriter class that takes a data pointer and a type-erased
EncodeFn function pointer callback.

Previously, every event type T across all clusters instantiated a distinct class subclassing
EventLoggingDelegate, generating virtual function tables (vtables), RTTI metadata, and virtual
destructors for dozens of event payload types.

Using the non-templated callback wrapper:
- Reduces .rodata section footprint by -508 bytes on nRF52840DK (all-clusters-app).
- Reduces overall Flash binary footprint by -340 bytes.
- Reduces symbol/string metadata by -13.4 KiB.

* [app] Add null pointer validation checks for callback descriptors and type_traits header

- Add VerifyOrReturnError null check for function pointer callbacks in EncodableResponsePayload::EncodeTo
  and SimpleEventPayloadWriter::WriteEvent to prevent null pointer dereferences.
- Add explicit #include <type_traits> in Decode.h to ensure header self-sufficiency.

* [app] Document non-null requirement for encoding callbacks instead of runtime null checks

- Remove redundant runtime null checks on mEncodeFn in EncodableResponsePayload::EncodeTo
  and SimpleEventPayloadWriter::WriteEvent.
- Add Doxygen notes documenting that function pointer callbacks must be non-null and are
  guaranteed non-null when constructed via internal inline helpers (EncodeTypedCommandPayload / EncodeTypedEventPayload).

* [app] Remove static internal linkage from EncodeTypedEventPayload function template

- Remove static keyword from free-standing function template EncodeTypedEventPayload in EventsGenerator.h
  to allow COMDAT template deduplication across translation units by the linker.

* [app] Add error logging parity to CommandHandlerImpl::AddResponse for EncodableResponsePayload

- Log CHIP_ERROR format string on encoding failure in EncodableResponsePayload overload,
  matching established behavior of EncodableToTLV overload.

* [app] Deduplicate TryAddResponseData and MockCommandHandler::AddResponseData overloads

- Delegate CommandHandlerImpl::TryAddResponseData and MockCommandHandler::AddResponseData for
  EncodableResponsePayload to their respective EncodableToTLV overloads using PayloadAdapter.
- Eliminates ~50 lines of duplicate framing and session setup logic across production and test double code.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [app] Fix Doxygen comment placement for AddResponseData and EncodableResponsePayload

- Relocate AddResponseData Doxygen documentation block to directly precede
  AddResponseData(..., EncodableToTLV &) declaration.
- Prevents Doxygen parser from misassociating AddResponseData @PARAM documentation with
  EncodableResponsePayload struct.

* [app] Restore compile-time abstract class protection for EncodableToTLV

- Restore pure virtual (= 0) declaration for EncodeTo(TLV::TLVWriter &, TLV::Tag) in EncodableToTLV.
- Default FabricAwareTLVWriter overload delegates to mTLVWriter.
- Updates class Doxygen documentation to clearly state abstract interface contract.

* [app] Consolidate duplicate PayloadAdapter into nested EncodableResponsePayload::Adapter

- Consolidate local PayloadAdapter struct definitions into a single nested
  EncodableResponsePayload::Adapter struct in CommandHandler.h.
- Simplifies call sites across CommandHandler.h, CommandHandlerImpl.cpp, and MockCommandHandler.cpp.
- Reduces code repetition and maintains clean API boundaries.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [app] Add Doxygen non-null precondition note to EncodeTypedEventPayload

- Document non-null precondition for data parameter in EncodeTypedEventPayload.
- Explain rationale for omitting redundant runtime null checks to prevent
  per-event-type template Flash growth.

* [app/tests] Add unit test for EncodableResponsePayload::Adapter

- Add TestEncodableResponsePayloadAdapter to TestCommandInteraction.cpp.
- Verifies encoding via both FabricAwareTLVWriter and standard TLVWriter overloads.

* [app] Return CHIP_ERROR_INCORRECT_STATE for plain TLVWriter in EncodableResponsePayload::Adapter

- Return CHIP_ERROR_INCORRECT_STATE for non-fabric-aware TLVWriter overload in
  EncodableResponsePayload::Adapter.
- Prevents accidental encoding of server command responses with an undefined fabric
  index (kUndefinedFabricIndex) which could mis-encode fabric-scoped response fields.
- Updates unit test in TestCommandInteraction.cpp to assert CHIP_ERROR_INCORRECT_STATE.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [docker] Build the stage images in CI again

The stage-1, stage-2 and stage-3 jobs have been disabled with '&& false'
since 2023, on the grounds that images either exceed the runner's disk or
fail to resolve their parent. Both halves are now addressable.

A per-image probe measured what each image actually costs when it is the
only thing on a runner. Of 30 images, 26 build inside the 14GB GitHub
guarantees, most using under 60% of it. Only efr32 (17.8GB) and nxp
(14.6GB) exceed it, and those are commented out individually with their
measured cost, matching how imx was already handled.

imx is re-enabled. It was excluded for 'no space left on device' and
peaks at 8.9GB on its own runner, so the original failure was an artifact
of sharing a runner rather than a property of the image.

vscode stays disabled. It does not merely fail: on a dedicated runner
with 88GB free it killed the runner after ~12 minutes, leaving no logs.

Also give the newly enabled jobs the same permissions as the base job,
and correct the vscode build step, which pointed at a vscode-3 directory
that does not exist.

* [docker] Run this workflow when this workflow changes

The trigger watched integrations/docker/** but not the workflow file, so
a change to which images CI builds could not demonstrate that they build.
This PR is the case in point: it enables three stages and triggered none
of them.

* [docker] Run the image builds on namespace runners

A GitHub-hosted runner guarantees 14GB of free space and frequently
supplies far more, so an image needing more than the guarantee does not
fail cleanly. It fails according to which runner it draws, which is a
flake rather than a result. Two images measured above that line, efr32 at
17.8GB and nxp at 14.6GB.

A namespace shape has a fixed disk size, so that becomes something to
size for rather than to babysit. With the runner changed, efr32 and nxp
no longer need excluding: they were only ever over GitHub's guarantee,
not over any inherent limit, so both are enabled here.

vscode remains disabled. It killed a runner outright with 88GB free, so
it needs its own investigation rather than a larger shape.

* [docker] Log in to ghcr.io before pushing from the stage jobs

Only the base job authenticated. The stage and vscode jobs call
build.sh --latest --push, which runs docker push directly, so a dispatch
with push_images=true would fail on authentication. The path was
unreachable while those jobs were disabled and becomes reachable here.

Gated on the same condition as the push step it precedes, so pull
requests and ordinary pushes still build without authenticating.

* [docker] Add a concurrency group so superseded runs are cancelled

Without one, every push starts another full build of every image in
parallel with the runs it supersedes. This PR demonstrated it: two runs,
roughly twenty jobs each, were in flight at once with only the newer one
of any use.

Uses the same group expression as the majority of workflows here.

* [docker] Correct the vscode note and drop historical comments

The note claimed nothing depends on chip-build-vscode. That is wrong:
integrations/cloudbuild/ runs its steps in that image, and maintainers
use it locally in place of one image per platform. Replaced with what the
image is for, how to refresh it by hand, and a TODO for giving it a shape
large enough to build on.

Also rephrased the remaining comments against the current state rather
than how things used to be, and dropped ones that only described how the
figures were obtained.

---------

Co-authored-by: Andrei Litvin <andy314@gmail.com>
…it (Auto-merged by platform-bot)

* [NXP] Upate non-EL2GO factorydataImpl to import the DAC key during init

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Martin Girardot <martin.girardot@nxp.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
… codes (#73461)

* eval setup code

* address pr comment
* [docker] Do not rebuild an image that already exists

These images fetch SDKs and toolchains from vendor servers while
building, and those fetches fail for reasons this repository does not
control. A build that does not happen cannot fail that way, so skip it
when the image already exists at this version, locally or published.

When a build is needed, seed the layer cache from the previous version,
since usually only one step has changed and the layers before it are
still valid. Record inline cache metadata so that published images can
serve as a cache source: existing images do not carry it, so this takes
effect from the next published version onward.

--no-cache still forces a rebuild, and a missing previous version is not
an error.

* [docker] Read the version in base ten when deriving the previous tag

Bash treats a leading zero as octal, so a version of 08 or 09 aborted the
build outright with 'value too great for base', and 010 would quietly
have looked for tag 8 rather than 9. Force base ten, and skip the
predecessor lookup at version zero, which has none.
An image is published under the tag in its version file, and a build is
skipped when that tag already exists, so changing an image without
bumping the version produces a build that never runs and a green result
that proves nothing.

This is the first item on #30750, which asked for a robot check rather
than relying on reviewers spotting it.

Co-authored-by: Andrei Litvin <andy314@gmail.com>
Signed-off-by: Zibran Khan <kali834x@gmail.com>
* [docker] Do not re-push an image the registry already serves

The publish step pushed the version tag on every run, including runs that
built nothing because the image was already present. Those pushes upload
nothing, and on a runner whose image cache persists they happen on every
merge.

Decide from the registry rather than from whether a build happened. A skipped
build does not imply the image is published: a cached image can be left over
from an earlier run whose push failed, so inferring "published" from the
absence of a build would stop publishing silently while the job stayed green.
latest is compared by digest instead of existence, since the version tag can
be published while latest still points at an older one. An unknown tag, or no
buildx, leaves the answer empty and the push proceeds, so failing to reach the
registry errs towards publishing.

This also puts the BUILT flag added in #73537 to use; it was set but never
read.

* Restyled by shellharden
…by platform-bot)

* [NXP] Implement interface accessor helpers

Make use of interface accessor helpers to set and return OpenThread and
external interfaces when lwIP is used.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>

* [NXP] Improve portability of DnssdImplBr implementation

Refactor the NXP Border Router DNS-SD implementation to remove direct
dependencies on LwIP-specific APIs and types, improving portability across
platforms and networking stacks.

Replace the previous LwIP-specific handling with the platform-agnostic
Inet interface abstraction, so network interfaces are obtained through
generic accessors rather than LwIP netif lookups.

Track outstanding browse and resolve operations using the SDK's
IntrusiveList, removing custom list bookkeeping and reducing coupling to
platform-specific data structures.

No functional change to DNS-SD behavior is intended; this is purely a
portability and maintainability improvement.

---------

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
…rm-bot)

* implemented sysbuild

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* typo

* Gemini suggestion

* Code rabbit suggestions

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…#73587)

The buildx in CI ignores --format and prints the whole human readable record,
so remote_digest returned that record rather than a digest. It still compares
as non-empty, so skipping the version tag kept working, but comparing two of
them never matches because each names its own tag, and latest was therefore
pushed on every run.

Parse the Digest line, which the unformatted output has carried across
versions, so the comparison works whatever buildx is present.
@silabs-matter-ci-bot
silabs-matter-ci-bot Bot requested a review from a team as a code owner August 15, 2026 00:23
@silabs-matter-ci-bot silabs-matter-ci-bot Bot added changing-git-submodules-on-purpose sl-require-admin-action This TAG indicates that an admin must take action. labels Aug 15, 2026
Arkadiusz Bokowy (arkq) and others added 29 commits August 27, 2026 18:59
* Upload chip-cert and chip-tool for x64 and arm64 as artifacts

* Restrict artifacts uploads only for master pushes

* Set retention days to 7 days
…-bot) (#73754)

* [Telink] Add multi-endpoint Identify support

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [Telink] Fix build docs

* [Telink] Refine multi-endpoint Identify configuration

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ter for 1.7 release (#73183)

* Add sensor fusion supported attribute for 1.7 release

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix by following Gemini's review suggestions

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* Fix the build error on Darwin

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* Fix the build error on Darwin

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* Add the boundary check in the unit-test module

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Refine the implementation

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix the reviewed problems: * Accept the empty input FusionSupported string to clear the saved data * Add more checking on the input data * Return null attribute if the delegate function has not been set

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add to check the type before really convert the input data

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>

---------

Signed-off-by: Lo,Chin-Ran <chin-ran.lo@nxp.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Amine Alami <43780877+Alami-Amine@users.noreply.github.com>
* Initial code migration

* Add command lists

* Add command handlers

* Add Codegen files

* Regenerate ZAP

* Remove function from util

* Restyled by whitespace

* Restyled by prettier-json

* Fix clang errors on Darwin

* Add small changes for PR comments

* Add more PR fixes

* add operator for struct

* Use AttributeSet for OptionalCommands

* Add PR comment changes

* Add Config changes

* Remove old implementation file and fix compilation error

---------

Co-authored-by: Restyled.io <commits@restyled.io>
…spec conformance (#73663)

* [AmbientContextSensing] Fix ObjectCountConfig label not being copied

SetObjectCountConfig retained countingObject.label as a CharSpan decoded
from the write request payload. TLVReader::Get(CharSpan &) does not copy,
so the span referenced a PacketBuffer released when the write transaction
completed, and later reads and reports re-encoded from it.

Copy the label into a cluster-owned 64 byte buffer and re-point the stored
span at it, following the PresetStructWithOwnedMembers convention. Apply
the two spec constraints on SemanticTagStruct.Label that were missing: a
max length of 64 characters, and presence when MfgCode is not null. Both
return ConstraintError. Include the label in change detection so a write
that only changes the label is stored and reported.

* [AmbientContextSensing] Include mfgCode in ObjectCountConfig change detection

The change comparison omitted countingObject.mfgCode, so a write that only
changed the manufacturer code returned success without storing or reporting
the new value. The same tag under a different manufacturer namespace denotes
a different object, so that write has to take effect.

Compare the whole SemanticTagStruct through a single IsSemanticTagEqual
helper rather than listing fields at the call site, so a later field cannot
be omitted the same way.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* [tests] Add TC_IDM_1_5 python test for DelayReportData invoke action

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [tests] Update TC_IDM_1_5 to use ArmFailSafe on Endpoint 0 and add subscription settle time check

* [controller][python] Add DelayReportData support and TC_IDM_1_5 test script

* [tests] Update TC_IDM_1_5 to match updated test plan with t_invoke_sent and 3600s MaxInterval

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [tests][python] Complete type annotations and docstrings in TC_IDM_1_5 and fix SendBatchCommands delayReportData

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [controller][python] Add uint16 validation to DelayReportData and cleanup TC_IDM_1_5 in finally block

* [python-testing] Update TC_IDM_1_5 to check EP0 ICD cluster, verify MaxInterval, and calculate window from prime report

- Check EP0 Descriptor ServerList for IcdManagement directly and skip if present
- Remove unnecessary 1-second settling sleep after subscription establishment
- Read and verify negotiated MaxInterval in SubscribeResponseMessage equals requested 3600s
- Compute subscription remaining window relative to priming report receipt timestamp (t_prime)

* [python-testing] Refactor TC_IDM_1_5 timeouts and step 5 teardown error handling

- Calculate subscription headroom in Step 2 with 2x MRP retransmission timeout
- Use 1x MRP timeout for report reception queue timeout in Step 4
- Execute Step 5 disarm in normal test flow with assertions
- Use finally block purely for defensive teardown without masking earlier step failures

* [python-testing] Use @pics decorator and inline step definitions in TC_IDM_1_5

- Add @pics("MCORE.IDM.S") decorator
- Remove boilerplate desc_TC_IDM_1_5, pics_TC_IDM_1_5, and steps_TC_IDM_1_5 methods
- Pass step descriptions inline directly to self.step() calls

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Migrate ColorControl

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add zap files

* Restyled by whitespace

* Restyled by prettier-json

* Fix linter

* Sync zcl.json and zcl-with-test-extensions.json AAI attributes

Mirror the Color Control and Commissioning Proxy
attributeAccessInterfaceAttributes entries into both files so
check_zcl_file_sync.py passes.

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

* Fix zap template CI

* Regenerate zap callback.h to drop stale DynamicLighting callbacks

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

* Fix implicit conversion error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix clang-tidy errors

* Update example app get/set calls

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update Get/Set calls inside namespace

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix chef undefied errors

* Fix timer destruction;delete old files

* Wire default values

* Add symetric shutdown

* Add SceneHandler wiring

* Fix continous vs immidiate hue movement

* Fix clang-tidy;Name changes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Make delegate reassignable

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Minor tweaks

* Remove unused attribute

* Push regenerated matter files

* Replace std::visits

* USe emeber signature accsessors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update json files

* Remove unserved attributes

* Abandon backwards compat

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert old usage

* Regen matter files

* Regen json

* Regen config files

* Resolve comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix comments

* Resolve comments

* Fix minor inconsistencies

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Name/Comment changes;Signature fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix name

* Case changes;Comment tweaks;Conditon changes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix conversion error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Resolve RabbitAI comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix clamps

* Fix clang-tidy error

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Switch to pos aggregates

* Remove scene invalidation logic

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix tests

* Fix comments;Update Delegate

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use helpers

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…tion Alarm Cluster (#72279)

* Add TC-EPALM-2.1 Python test for Electrical Protection Alarm cluster

Adds src/python_testing/TC_EPALM_2_1.py, the attribute test for the
Electrical Protection Alarm cluster (EPALM, 0x00A3). Registered as
not_automated in test_metadata.yaml until an example app integrates the
EPALM server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* TC-EPALM-2.1: skip Latch step when the attribute is absent

EPALM disallows the RESET feature, so Latch (RESET-gated in Alarm Base) is
not part of the cluster and is absent from the generated attribute bindings.
The step referenced attributes.Latch unconditionally, raising AttributeError
against a conformant EPALM server. Guard the access with hasattr so the
optional step is skipped when Latch is not present.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* TC-EPALM-2.1: follow the MaximumDischargeCurrent spelling fix

Spec PR CHIP-Specifications/connectedhomeip-spec#13304 corrected the
misspelling on SurgeProtectionRatingsStruct field 7, and #73621 carries
that through the SDK XML and the generated bindings. This updates the
matching attribute references so the script agrees with the generated
Python once that lands.

The script is listed in test_metadata.yaml and is not run in CI, so this
does not depend on merge order.

* TC-EPALM-2.1: align the script step list with the test plan

The script read the same attributes as the plan but in a different order,
so step n on each side described a different thing throughout. It also
omitted two steps the plan has, and performed one the plan did not.

Reorders to the plan sequence: FeatureMap, then the Alarm Base attributes,
then the seven rating attributes, then the write-rejection probe, then the
subset invariant. Adds the FeatureMap read and the ArcCause write-rejection
probe. The subset check the script already performed is now step 15 in the
plan as well.

* [TC-EPALM-2.1] Correct the not-automated reason

The entry claimed the script self-skips via run_if_endpoint_matches(has_cluster(...)).
It does not: gating is @pics('EPALM.S') plus @async_test_body, which declares a
top-level PICS for the runner to check rather than performing a runtime
endpoint match.

Restates the reason as the actual situation, matching the wording already used
for TC_EPALM_2_3.py.

* Point TC-EPALM-2.1 at electrical-protection-app

The EPALM server is being demonstrated on the Electrical Distribution Enclosure
endpoint of electrical-protection-app rather than on all-clusters-app. The
endpoint number is unchanged, so only the app target moves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Enable TC-EPALM-2.1 in CI

The EPALM server is now on master on the enclosure endpoint of
electrical-protection-app (#73395), which this script's CI directive targets, so
the exclusion is no longer needed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Bound the EPALM measurement fields at the data model maximum

The amperage-mA and voltage-mV fields in this cluster are declared
min 1, max 0x3FFFFFFFFFFFFFFF. matter_asserts.assert_valid_int64 permits values
through 0x7FFFFFFFFFFFFFFF, so a DUT reporting anything in between passed while
violating the data model.

Adds the upper bound to all 21 int64 measurement checks. The two uint64 fields,
ResponseTime and EnergyAbsorptionCapability, declare a minimum and no maximum, so
they are left alone.

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Assert the declared minimum on the EPALM bitmap fields

Five bitmap fields are declared min 1 in the cluster XML: SupportedArcCauses, and
TripMechanism on the OverLoad, OverVoltage, ResidualCurrentFault and
SurgeProtection ratings structs. The script checked only their upper bound, so a
DUT reporting 0 passed.

ShortCircuitRatingsStruct.TripMechanism is deliberately not included: it declares
a maximum and no minimum, unlike the other four TripMechanism fields. That
asymmetry looks unintentional in the data model but is not this script's to
resolve.

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger after a cancelled Chef job

The Chef - Linux CI Examples job on the previous run was cancelled at the
two-hour mark rather than failing. The same job passes on the sibling PRs
72323, 73730, 73731 and 73732, so this is a retrigger rather than a fix.

* Hoist ALARM_BITMAP_MAX to module scope

ALARM_BITMAP_MAX was declared twice inside test_TC_EPALM_2_1 with the same
value. The second assignment was dead: all four uses precede it.

Moves the single declaration to module scope alongside MEASUREMENT_MAX, the
other data-model-derived bound in this file.

Reported by hasty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger after an unrelated TC_JFADMIN_2_2 flake

The TC_[G-M] REPL shard failed on TC_JFADMIN_2_2, which timed out after 60s
waiting for '[CTL] Commissioning complete'. This branch touches only
TC_EPALM_2_1.py, and TC-EPALM runs in the TC_[A-F] shard, so the failing shard
does not execute anything this PR changes.

Master's own TC_[G-M] shard failed earlier today on a different test
(TC_IDM_9_1, run 33168611711), so the instability is in the shard rather than
in this change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Address review: expectation clauses, shared validators, and three real gaps

Docstring now uses the test plan's Purpose text. Dropped the test-plan URL,
since that repo is private and CSA members should be reading the rendered plan,
and dropped the step-numbering note.

Every step carries the plan's Expected Outcome. The framework parameter is
expectation, not expected, so the suggested edit as written raises TypeError.

Repeated validation is now shared. _check_measurement replaces twenty-one
open-coded int64 min-1 and MEASUREMENT_MAX checks; _check_bitmap replaces the
hand-rolled reserved-bit comparisons; _check_current_trip_mechanism,
_check_voltage_trip_mechanism and _check_trip_curve are shared by the structs
that use those types. _check_choice_group enforces that at least one field of
each O.<group>+ struct is present. The six struct validators and the new helpers
are module-level functions rather than methods, since none of them touch self.

Three gaps this closes:

  - FeatureMap bit 0 must be clear. RESET is disallowConform on EPALM, and no
    other test checks it. IDM-10.5 would, but only once a 1.7 data-model XML
    exists; the prebuilt directories stop at 1.6.1 and carry no EPALM.
  - State must be 0 in the no-fault baseline the test setup establishes.
  - Latch must be absent from AttributeList. Latch is RESET-conditional and
    EPALM disallows RESET, so it is disallowed rather than optional. The old
    step was dead code: it guarded on an attribute the bindings never generate.

Two checks removed as unreachable rather than merely redundant. The FeatureMap
uint32 type check was the wrong helper and duplicated IDM. The NullValue guard
on TrippingCharacteristic could never fire: the field is optional and not
nullable, so only None is reachable.

Step 14, the ArcCause write-reject, is dropped per the test plan review, and the
subset-invariant step becomes 14.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger after an unrelated TC_SC_4_3 flake

The TC_[N-S] REPL shard failed on TC_SC_4_3.py, a Secure Channel discovery test,
with a pairing-delegate error out of
ChipDeviceController-ScriptDevicePairingDelegate.cpp. That shard does not run
any EPALM script, and this branch changes only TC_EPALM_2_1.py, which runs in
the TC_[A-F] shard.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Drop the RESET bit check from step 2

Per review: assume the 1.7 data-model XML will be in place, so the generic
conformance test covers a disallowed feature bit, and avoid reworking the script
between TE2 and SVE.

The FeatureMap read stays because the plan step calls for it, but nothing gates
on the value now, so it is logged rather than assigned.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…3730)

* Populate the EPALM rating attributes in electrical-protection-app

Every rating attribute was published as null, so the attribute tests took the
null path and their structure validation never ran.

Publishes representative fixed values for a 100 A / 240 V residential panel
breaker across all seven rating attributes. Currents are amperage-mA and
voltages are voltage-mV per the cluster definition, ResponseTime is in
nanoseconds, and every field satisfies its min 1 constraint. These are
illustrative, not measurements: the app performs none.

Requested by @jamesharrow on #73395, so that the Python scripts exercise the
detailed structure validation rather than confirming a null.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
PICS.yaml carries PWRTL.S and F00-F03, A0000 and A0001, but nothing for the
ElectricalCircuit feature (bit 4) or the ElectricalCircuitNodes attribute
(0x0002), both added to the cluster for 1.7.

check_pics reads a missing key as False, so a test gated on PWRTL.S.F04 does not
error, it silently never runs. TC_PWRTL_2_2.py already carries
@pics('PWRTL.S', 'PWRTL.S.F04') and is affected.

Both default to 0 in ci-pics-values, matching the CI apps, which do not enable
the feature.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…tion Alarm Cluster (FeatureMap and Supported consistency) (#72323)

* Add TC-EPALM-2.3 Python test for Electrical Protection Alarm cluster

Adds src/python_testing/TC_EPALM_2_3.py verifying FeatureMap and Supported
attribute consistency for the Electrical Protection Alarm cluster (EPALM,
0x00A3). Registered as not_automated in test_metadata.yaml until an example
app integrates the EPALM server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* TC-EPALM-2.3: define explicit steps_ method for dynamic step numbers

The test builds steps 4-10 in a loop with a dynamic self.step(step_num).
The step extractor requires constant step numbers when steps are inferred
from the test body, and raised ValueError at setup. Add an explicit
steps_TC_EPALM_2_3() method enumerating all 11 steps so the extractor no
longer parses the dynamic calls; the body now advances with self.step(n).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [TC-EPALM-2.3] Correct the copyright year and the not-automated reason

The copyright header said 2025 while the sibling scripts say 2026, and the
not-automated reason named the electrical-protection-app as the unblocker. The
script's CI directive targets all-clusters-app on endpoint 1, which is what
#73395 provides, so name that instead.

* [TC-EPALM-2.3] Make the orphan-bit check effective and skip absent-feature steps

Two defects in TC_EPALM_2_3.py.

Plan clause 11(a) requires that no bits be set in Supported outside positions
0..6. AlarmBitmap is an IntFlag whose members cover exactly those seven bits,
so `~all_alarm_bits` complements only within the class mask and evaluates to
0. `orphan_bits` was therefore unconditionally 0 and the assertion could never
fail: a DUT reporting Supported=0x80 passed it. Casting both operands to int
restores the full-width complement.

Steps 4-10 are specified as skipped when the corresponding PICS feature is
false, but the script only logged and left the step recorded as PASS. Adds
mark_current_step_skipped() so the certification report matches the plan.

* Point TC-EPALM-2.3 at electrical-protection-app

The EPALM server is being demonstrated on the Electrical Distribution Enclosure
endpoint of electrical-protection-app rather than on all-clusters-app. The
endpoint number is unchanged, so only the app target moves.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Enable TC-EPALM-2.3 in CI

The EPALM server is now on master on the enclosure endpoint of
electrical-protection-app (#73395), which this script's CI directive targets, so
the exclusion is no longer needed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Inline the step descriptions and drop steps_TC_EPALM_2_3

Addresses review on #72323:
- steps_TC_EPALM_2_3 is gone; each self.step() carries its own description and
  an expectation taken from the TC-EPALM-2.3 plan with the adoc macros expanded.
- self.step(1) is no longer bare.
- The steps 4-10 loop is unrolled, because self.step(step_num) is not a literal
  and the AST step extractor cannot read it once steps_ is removed.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…rcuitNodes attribute (#73402)

* [PowerTopology] Add ElectricalCircuit (CIRC) feature + ElectricalCircuitNodes

Add the Matter 1.7 ElectricalCircuit (CIRC) feature to the code-driven
power-topology-server, exposing the ElectricalCircuitNodes attribute
(0x0002): a fabric-scoped, writable, non-volatile List<CircuitNodeStruct>.

- Read is fabric-filtered automatically (fabric-scoped item type).
- Write is fabric-scoped: the accessing fabric is authoritative, ReplaceAll
  replaces only that fabric's slice with full staging/validation before any
  mutation, AppendItem appends one node.
- Non-volatile persistence via an explicit TLV blob (retaining fabricIndex,
  which the generated fabric-scoped write codec omits), restored on Startup.
- Fabric removal purges the removed fabric's nodes via FabricTable::Delegate;
  the FabricTable is an optional nullable field on the cluster Config.

Enable CIRC on the EVSE example app and thread the FabricTable through
PtConfig so fabric-removal cleanup is active. The added FabricTable
parameters are defaulted, so the water-heater app (which shares
ElectricalSensorManager) is unaffected.

Extend TC_PWRTL_2_1 to assert ElectricalCircuitNodes present iff CIRC and to
read, write (round-trip), and verify Non-volatile persistence of the
attribute.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [PowerTopology] Scope TC_PWRTL_2_1 CIRC change to attribute presence

Keep only the AttributeList presence-iff-CIRC assertion for
ElectricalCircuitNodes in TC_PWRTL_2_1 (the attributes test). Functional
read/write coverage of the attribute belongs to the dedicated TC_PWRTL_2_2,
which this PR's CIRC-enabled DUT unblocks; avoid duplicating it here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [PowerTopology] Heap-allocate ElectricalCircuitNodes write staging buffer

WriteElectricalCircuitNodes staged the incoming list in a stack array of
kMaxCircuitNodes StoredCircuitNode entries (~8 KB), which can overflow the
constrained Matter thread stack on embedded platforms. Allocate the staging
buffer on the heap via ScopedMemoryBuffer, sized to the incoming count.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [PowerTopology] Heap-allocate ElectricalCircuitNodes node storage

The ElectricalCircuitNodes storage was an inline StoredCircuitNode array of
kMaxCircuitNodes entries (~8 KB: char label[128] x 50). As a member this
made every stack-allocated PowerTopologyCluster instance ~8 KB, exceeding
the -Wstack-usage=8192 limit on 32-bit embedded builds (Zephyr/ESP32) in
the unit tests, and inflating the cluster's footprint on constrained
platforms generally.

Store the nodes in a ScopedMemoryBuffer allocated on Startup, only when the
CIRC feature is enabled.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* [PowerTopology] Move ElectricalCircuitNodes storage behind an interface

Review feedback: the cluster should not hard-code how ElectricalCircuitNodes is
stored, and holding the entries in a heap buffer rules out platforms with
stricter memory requirements.

Following thread-network-directory-server, which solves the same problem for a
writable persisted list:

- CircuitNodeStorage is an abstract interface: Capacity(), Count(),
  CountForFabric(), GetNodeAtIndex(), ReplaceNodesForFabric() for the ReplaceAll
  write, AppendNode() for AppendItem, and RemoveNodesForFabric() for fabric
  purge.
- DefaultCircuitNodeStorage implements it against the cluster's attribute
  storage, carrying over the previous TLV format unchanged, so existing
  behaviour (durable nodes, same location) is preserved with no application
  work.
- The cluster holds only a CircuitNodeStorage pointer and allocates nothing for
  this attribute. StoredCircuitNode, the ScopedMemoryBuffer member, and
  SaveCircuitNodes()/LoadCircuitNodes() are gone.

A platform without a heap now supplies a fixed-array implementation and reports
its real limit through Capacity(). The unit tests do exactly that, so the
allocation-free path is exercised rather than merely possible.

CircuitNodeStorage::Init() is a no-op by default and exists so an implementation
that persists through the cluster's attribute storage can obtain it at cluster
Startup, which is the earliest point it exists. Implementations with their own
persistence ignore it.

PowerTopology::Instance gains an overload taking application-provided storage;
the existing constructor keeps using DefaultCircuitNodeStorage, so applications
need no change.

Load() stops at Capacity() rather than erroring, so reducing a platform's
capacity cannot prevent startup on previously persisted data.

Testing: unit tests pass (22 cases, up from 21). The added
DefaultCircuitNodeStoragePersistsAcrossInstances covers the TLV round trip that
previously ran through the cluster, since the cluster-level tests now use the
non-persisting fixed-array storage. all-clusters-app builds and links.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [PowerTopology] Shrink the fixed-array test storage to fit the Zephyr stack budget

The FixedCircuitNodeStorage test double held Node[50], roughly 8 KB, and the
tests place it on the stack. That tripped -Werror=stack-usage=8192 on the Zephyr
native_posix unit-test build (worst case 12112 bytes), breaking the nRF Connect
SDK and ESP32_QEMU checks.

Make the capacity a template parameter defaulting to 8 (about 1.3 KB), which
brings the worst case to roughly 5.4 KB. No test stores more than four entries,
and the resource-exhaustion test writes far past any capacity so it still
exercises the limit.

Fittingly, the double was failing the very constraint it exists to demonstrate.

Testing: unit tests pass (22 cases).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [PowerTopology] Require the fabric table for CIRC; bound the ReplaceAll staging write

Two review findings on #73403, which carries this file until #73402 merges.

1. The ElectricalCircuit feature needs the fabric table, not "uses it if
   present". ElectricalCircuitNodes is fabric-scoped, so a removed fabric's
   entries must be purged, and that only happens through the OnFabricRemoved
   callback registered via AddFabricDelegate. Startup() previously skipped the
   registration silently when Config::fabricTable was null, and PowerTopology
   Instance defaults that parameter to nullptr, so an application could enable
   CIRC, compile cleanly, and leak a removed fabric's nodes with no diagnostic.

   Startup() now fails with CHIP_ERROR_INCORRECT_STATE and a log line, matching
   the Config::circuitNodeStorage check three lines above it. Returning an error
   is preferred over VerifyOrDie: Startup() already reports this class of
   misconfiguration through its return value, and a crash would be a harsher
   contract than the surrounding code uses. Shutdown() keeps its null check,
   since it can run on a cluster that never started or does not have CIRC.

   The unit tests construct CIRC clusters, so they now supply a fabric table via
   FabricTestFixture, as ElectricalCircuitNodesPurgedOnFabricRemovalTest already
   did. Added ElectricalCircuitWithoutFabricTableTest to pin the new contract.

2. WriteElectricalCircuitNodes staged the decoded ReplaceAll list into a buffer
   sized from list.ComputeSize() and indexed it with a counter driven by the
   iterator, without checking the two agree. Added a bounds check. Beyond
   decoder inconsistency this also covers newCount == 0, where the staging
   buffer is never allocated at all yet staging[0] would be written if the
   iterator yielded an element.

Testing: TestPowerTopologyCluster 23/23 pass (was 22, plus the new one) and
TestPowerTopologyClusterBackwardsCompatibility 1/1 passes, built natively with
chip_build_tests=true. Confirmed the new guard is actually exercised rather than
merely compiled: its error log appears exactly once across the suite, in the new
test. clang-format clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [PowerTopology] Discard a partially decoded ElectricalCircuitNodes value

Load() appends entries as it decodes them, so a failure part way through a
stored blob left the decoded prefix in place. Init() logs that error and
returns CHIP_NO_ERROR, since a bad stored value must not brick startup, so the
cluster went on to serve an arbitrary fraction of a corrupt list as the
attribute value. Reset the count in that path so the list reads as empty
instead.

Also document the persisted blob's worst case size against the per-value
limits some platforms impose, and move the anonymous namespace close below the
final test so every fixture-derived test sits inside it.

* TC-PWRTL-2.1: align the script step list with the test plan

The script and the plan had drifted: the script combined the AttributeList
read and its composition check into one step, wrote to only one of the two
read-only attributes, and split the reboot and the persistence read across
two steps. Step n in the script and step n in the plan stopped describing
the same thing from step 5 onwards.

Both are now 11 steps and match one for one. The reboot step also moves to
request_device_reboot() with an app-ready-pattern directive, matching
TC-PWRTL-2.2, instead of the is_pics_sdk_ci_only and wait_for_user_input
dispatch, so it runs in CI rather than being skipped.

* [TC-PWRTL-2.1] Make the reserved-bits check effective

Step 4 is specified to validate the CIRC bit and reserved bits 5..31, but the
reserved-bits half was inert. PowerTopology.Feature is an IntFlag whose members
cover exactly bits 0..4, so `~KNOWN_BITS_MASK` complements only within the class
mask and evaluates to 0. `reserved_bits` was therefore unconditionally 0 and a
DUT setting any reserved bit passed.

Casting both operands to int restores the full-width complement.

* Drop the step-numbering remark from the TC-PWRTL-2.1 docstring

It describes the file rather than the test, and goes stale the moment the
plan renumbers.

* Drop the unsupported-write step from TC-PWRTL-2.1

Per James Harrow: unsupported-write checks come out, since the IDM and
low-level SDK tests already cover write access. Step 11 becomes step 10; the
Status import goes with the last use.

* Align TC-PWRTL-2.1 with its test plan

Per James Harrow: align the script to the plan, and pre-existing lines are not
exempt. The merged TC-PWRTL-2.1 plan has three steps; the script had eleven.

It is now the plan's three, each carrying the plan's expected outcome as an
expectation. Implementing the plan literally also adds an assertion the script
never had: the plan requires both endpoint lists to hold no more than 20
entries, and nothing checked that.

Removed: FeatureMap O.a conformance, the CIRC and reserved-bit checks, and the
AttributeList composition checks, all covered by TC_IDM_10_2 per cecille, which
is why the plan rework (chip-test-plans#6166) and its script alignment (#73732)
were closed on 2026-08-28. Also removed the Non-Volatile persistence check,
which the plan does not describe.

* Drop the plan URL from the TC-PWRTL-2.1 docstring

Only 16 of 501 scripts on master embed one, and a hardcoded branch-and-anchor
link goes stale on any renumber.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Make Callback easier to use in non-list contexts

Union mPrev/mNext with void* mContext{A,B} that callees can use to more
easily manage individual callbacks without a CallbackDeque. A common
use case is to hold a callee context pointer so the CancelFn can find
the owning object.

Move mNext = mPrev = this initialization into the sub-classes that
inherit from Cancelable to use it as a list anchor (CallbackDeque,
GroupedCallbackList), and leave the callee context fields uninitialized
in the base class.

Make Cancelable a protected instead of public base class of
CallbackDeque, and tighten the output arguments of
CallbackDeque::DequeueAll and DequeueBy to be a CallbackDeque rather
than a base Cancelable. This ensures target objects retain their
doubly-linked list initialization, and is also semantically the correct
type: a CallbackDeque is exactly a Cancelable where mPrev/mNext form a
doubly linked list. Also tweak DequeueAll() so it appends to a non-empty
target list rather than leaving any existing elements in an orphaned
state, and gracefully handle dequeuing into the same deque as a no-op.
DequeueBy() into the source list makes no sense, so add a VerifyOrDie
for completeness (the method is not used anywhere in the code base).

Adjust OperationalSessionSetup::NotifyRetryHandlers accordingly: use
CallbackDeques for the temporary lists and use IsEmpty() / First()
methods instead of directly accessing mNext. Also add a test case to
TestCHIPCallback that validates the logic used in NotifyRetryHandlers
for dealing with persistent callbacks that can deallocate themselves.

* Put back invalidation to make clang-tidy happy

This could be changed to actually poison the pointers at some point.

* Add / reword documentation

* Fix comment grammar

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…otiate TCP capabilities (#71876)

* Add TCP config fields to the Session parameters to allow nodes to negotiate TCP capabilities
during session establishment.

 - Add `SupportedTransports` and `MaxTCPPayloadSize` to `SessionParameters`
 - Set local session parameters in `Server::Init` for `CASESessionManager` and `CASEServer`.
 - Encode and decode new parameters in `PairingSession` and `CASESession`.
 - Use `MaxTCPPayloadSize` in `SessionManager::PrepareMessage` for message length validation
   when large payloads are allowed.
 - Add unit tests in `TestCASESession` and `TestPairingSession` for the new parameters.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Refactor to address review comments.

* Address review comments

Refactor SessionParameters to reduce #if directives
- Refactor `SessionParameters` into `BasicSessionParameters` and a derived `SessionParameters` class to minimize `#if
  INET_CONFIG_ENABLE_TCP_ENDPOINT` directives.
  - Remove `#if` guards around `SupportsLargePayload()` in `SecureSession.h` and in `SessionManager::PrepareMessage` by relying on
    default behaviors of `BasicSessionParameters`.
- Fix a potential issue in `SessionManager::PrepareMessage` where a peer-advertised large payload size could override local limits
  now clamped to `min(maxPayload, kMaxLargeAppMessageLen)`.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Relocate to consolidate #if block.

* Apply suggestions from code review

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Adjust Max TCP Payload size by the framing header length of 4 bytes.

* Add an enable TCP server flag on the controller side in the init params.

* Use kTCPFramingHeaderSize instead of SizeOfMaxTCPPayloadSize.

* Address more review comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address review comments.

Consolidate BasicSessionParameters and SessionParameters into a single
SessionParameters class, removing the conditional compilation based on
INET_CONFIG_ENABLE_TCP_ENDPOINT.

Increase CHIP_SYSTEM_CONFIG_MAX_LARGE_BUFFER_SIZE_BYTES to 64004 to keep
the default max TCP payload size at 64000 (subtracting 4 bytes for TCP
framing).

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove INET_CONFIG_ENABLE_TCP_ENDPOINT conditional compile around
SetLocalSessionParameters() in CASEServer.h.

* Remove INET_CONFIG_ENABLE_TCP_ENDPOINT conditional compile around
SetLocalSessionParameters() in CASEClient.h.

* Remove #if INET_CONFIG_ENABLE_TCP_ENDPOINT in some of the Test Session
logic.

* Set local session parameters for CASEServer in controller factory

Configure and set the local session parameters for both the CASE
client and CASE server instances(server interactions enabled)
initialized by the DeviceControllerFactory.

Previously, the TCP parameters (supported transports and max payload size)
were only applied to the CASE client (outgoing).
Now, they are also applied to
the CASEServer (incoming) when server interactions are enabled, ensuring
consistent capability advertisement.

* Address review comments.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Define `kLegacyDefaultMaxLargeAppMessageLen` in
MessageHeader.h to represent the maximum message payload size we can safely
assume a legacy peer (one that does not negotiate session parameters) can
receive over TCP.

* Clean up TCP session parameter code and PASE tests

- Remove unused dead method `PeerAdvertisedTcpSupport` from `SecureSession`.
- Assert `SupportedTransports == 0` in PASE test to verify that TCP
  parameters are not negotiated over PASE.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Support TCP session parameter negotiation in PASE and refine buffer size constants.

- Promote `mLocalSessionParams` and accessors to `PairingSession` to enable
  symmetrical session parameter negotiation in `PASESession`.
- Update `CommissioningWindowManager` and `Server::Init` to configure local
  session parameters for PASE commissioning sessions.
- Add `SecurePairingHandshakeTCPParamsTest` in `TestPASESession.cpp` to verify
  session parameter negotiation during PASE handshakes.
- Make `CHIP_SYSTEM_CONFIG_MAX_LARGE_BUFFER_SIZE_BYTES` explicitly evaluate
  `(64000 + 4)` with documentation for the 4-byte framing prefix.
- Define `kLegacyDefaultMaxLargeAppMessageLen` as `64000 - 256` to provide a
  conservative header margin for unadvertised legacy TCP peers.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Clamp legacy TCP payload limit to local buffer capacity in SessionManager.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…otection Alarm state machine (#73812)

* TC-EPALM-2.2: Add Python automation test script for the EPALM alarm state machine

TC-EPALM-2.2 ("Primary functionality (alarm state machine) with Server as DUT")
has had a merged test plan since 2026-07-16 in chip-test-plans #6157, but no
Python automation was ever filed for it. TC-EPALM-2.1 and 2.3 both have scripts;
2.2 is the gap in the set.

Implements all 14 steps against the merged plan. Steps 4 to 10 drive each fault
bit through the General Diagnostics TestEventTrigger codes that the EPALM server
already ships (ElectricalProtectionAlarmTestEventTriggerHandler, 0x00A3...0000
through 0007) and verify the corresponding State bit via a subscription report.
Step 11 checks State is a subset of Supported. Step 14 clears the alarms.

EPALM disallows the inherited RESET feature, so no Reset command is generated
into the Python bindings and step 12 declares it locally to exercise the
UNSUPPORTED_COMMAND path. TC_REFALM_2_2.py does the same for Refrigerator Alarm.

Step 13 follows chip-test-plans #6364: ModifyEnabledAlarms is optional in Alarm
Base rather than disallowed, so the script expects UNSUPPORTED_COMMAND only when
the DUT does not list the command, and success when it does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger after an unrelated TC_AccessChecker flake

The TC_[A] REPL shard failed on TC_AccessChecker.py, which timed out in
setup_class with CHIP Error 0x00000032. That shard does not run TC-EPALM, and
this branch adds only TC_EPALM_2_2.py.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Do not wait for a State report when the trigger causes no transition

ElectricalProtectionAlarmCluster::SetState returns early when the effective
State is unchanged, with "no transition: no report, no event". The script waited
for a subscription report after every trigger, so two paths could hang against a
real DUT rather than fail:

  - a DUT that already has a fault raised when the test starts, where the set
    trigger for that alarm changes nothing;
  - the clear-all trigger in step 14 when nothing was raised, which happens when
    every feature-gated step was skipped.

Both now read State instead of waiting when no transition is expected. The
assertions are unchanged.

The example app always boots with State clear and raises each alarm in turn, so
CI does not reach either path; it matters for real DUTs.

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Inline the step descriptions and drop steps_TC_EPALM_2_2

Moves each step's description and expectation into its self.step() call and
removes the steps_ method, matching the current style.

The feature-gated triggers were a loop over a table, which the AST step
extractor cannot read: it requires constant arguments and points at a steps_
method as the alternative for dynamic ones. Steps 4 to 10 are now written out.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Move the EPALM TestEventTrigger handling into a shared TestBase

The trigger codes were duplicated per script: this one carried all eight, and
the seven TC-EPALM-3.x scripts each hard-code their own set and clear pair, so
the same fifteen codes are spread across eight files.

TC_EPALM_TestBase.py now owns them, keyed by AlarmBitmap rather than by raw
value, so callers name the alarm and the mapping lives in one place:

    await self.send_test_event_trigger_set_alarm(AlarmBitmap.kArcFault)
    await self.send_test_event_trigger_clear_alarm(AlarmBitmap.kArcFault)
    await self.send_test_event_trigger_clear_all()

It also carries read_state(), which was duplicated the same way.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Annotate the TestBase trigger helpers and document read_state

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Replace desc_TC_EPALM_2_2 with a docstring matching the test plan

The docstring carries the test case title and the plan's Purpose text with the
adoc macros expanded, so the script reads the same as the rendered plan.

The Purpose text is the wording chip-test-plans #6364 lands: the Reset command
is rejected, and ModifyEnabledAlarms is optional in Alarm Base and checked
against whichever behavior the DUT declares. That PR is still open, so the
docstring is ahead of master until it merges.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Use the generated command id, the read_state helper, and plan-matching expectations

Addresses review on #73812:
- accepts_modify now reads Commands.ModifyEnabledAlarms.command_id instead of a
  hand-declared constant.
- The three inline State reads go through the TestBase read_state helper.
- Every step expectation is now the TC-EPALM-2.2 plan text with the adoc macros
  expanded, so the script and PR6364 read the same.

* Verify Mask changes on ModifyEnabledAlarms; drop the latch clause

Tracks the matching PR6364 plan edits:
- New step 13b checks that a DUT accepting ModifyEnabledAlarms actually changes
  Mask, rather than only returning SUCCESS.
- The docstring no longer claims latch verification; no step exercises it.

* Bring the CodeRabbit fixes for TC-EPALM-2.2 into its own PR

These four landed on the TC-EPALM-3.x branch because that is where CodeRabbit
reviewed them, but they belong here:

- the whole subscription lifetime is now inside try/finally, so a failure in
  steps 4 to 13b cannot leave alarms latched or the subscription registered
- step 13b drains the State report that masking off an active bit produces,
  which step 14 would otherwise dequeue instead of the clear-all report
- step 14 branches on the live State rather than the step 11 snapshot
- Mask is captured before step 13a and restored best effort from finally

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
* [EPALM] Add per-alarm clear TestEventTriggers

The Electrical Protection Alarm trigger handler can set each of the seven alarm
bits individually, but the only way to clear one is kClearAll, which clears them
all at once.

TC-EPALM-3.1 through 3.7, added by chip-test-plans #6302, each drive one alarm up
and then back down to observe the Notify event carrying that bit in Active and
then in Inactive. They reference clear codes 0x00A3...0011 through 0017, which do
not exist, so none of those seven test cases can be automated today.

Adds those seven codes and routes them to the cluster's existing
DeactivateAlarms(), leaving kClearAll in place.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger the Darwin test suites

Both Darwin jobs died about three minutes into 'Build Apps Using Unified Build'
with orphaned xcodebuild, ccache and llvm processes and no compile error in
either log. The same job passes on master and on five sibling PRs, only two
files reference the enum this branch extends and both are updated together, and
the app builds clean locally from this branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Call the cluster directly from each trigger case

Drops the activate flag: every case now returns the ActivateAlarms or
DeactivateAlarms result, and default: return false; is the only fallthrough.
66 lines to 48.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ed by platform-bot) (#73707)

WiFi diagnostic functions (GetWiFiChannelNumber, GetWiFiCurrentMaxRate, etc.)
access WLAN state without checking if STA is connected, causing crash when
a wildcard read is performed before the device connects to an AP.

Add IsWiFiStaConnected() guard function and return CHIP_ERROR_INCORRECT_STATE
when WiFi STA is not connected before accessing WLAN diagnostic data.

### Testing

TC-IDM-13.1, TC-IDM-14.1, TC-DESC-2.3 passed, verified on NXP platform.
* silabs/zephyr: declare requirements.zephyr.txt in module.yml

Declare scripts/setup/requirements.zephyr.txt as a pip requirement file
via the package-managers/pip/requirement-files schema, so that
'west packages pip --install' installs it automatically. Without this,
none of matter's own Python dependencies (e.g. python-path, needed by
scripts/codegen_paths.py) were ever picked up, and had to be installed
manually into the west pipx venv.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* silabs/zephyr: add python-path to requirements.zephyr.txt

scripts/codegen_paths.py imports the python-path package (the
'python_path' module), but requirements.zephyr.txt only listed west,
intelhex, cbor, cbor2 and jsonschema. python-path was only declared in
requirements.build.txt, which is used by Matter's own GN/ninja build
flow, not by the Zephyr module path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* silabs/zephyr: drop obsolete CONFIG_BT_RECV_WORKQ_BT

Zephyr removed the BT_RECV_CONTEXT Kconfig choice (and its
BT_RECV_WORKQ_SYS/BT_RECV_WORKQ_BT options) in commit 3b379ec594e
("Bluetooth: Host: Remove the BT_RECV_CONTEXT choice"): low-priority
HCI packets now always run on the dedicated Bluetooth RX workqueue
unconditionally, so the choice - and CONFIG_BT_RECV_WORKQ_BT with it -
no longer exists.

Setting the now-undefined CONFIG_BT_RECV_WORKQ_BT makes recent Zephyr
abort the build with a Kconfig warning-as-error. Since the option is
gone and its former behavior is now the only supported one, simply
drop the two (duplicate) occurrences of the setting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* silabs/zephyr: rename NET_SOCKETS_POLL_MAX to ZVFS_POLL_MAX

CONFIG_NET_SOCKETS_POLL_MAX was deprecated in Zephyr 4.0 in favor of
CONFIG_ZVFS_POLL_MAX, and removed entirely by commit b3d4e29e088
("net: sockets: Remove deprecated CONFIG_NET_SOCKETS_POLL_MAX").
Setting the now-undefined symbol makes recent Zephyr abort the build
with a Kconfig warning-as-error.

Rename to the new symbol, which has existed since Zephyr 4.0 and carries
the same meaning, so this is a safe drop-in replacement for any
currently supported Zephyr revision.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* scripts: fix crash in clang-format version check when pigweed absent

getClangFormatBinary() wraps the pigweed clang-format version comparison
in a try/except meant to just print a warning and continue if anything
goes wrong (e.g. pigweed.json is missing). However it called
traceback.print_last(), which requires an exception to have already
passed through sys.excepthook; inside a live except block there is no
'last exception' yet, so print_last() itself raises ValueError, which
escapes the except and aborts the whole zap codegen step.

Use traceback.print_exc() instead, which prints the currently-handled
exception. This lets the version check degrade gracefully (falling back
to the system clang-format with just a printed warning) instead of
hard-failing when third_party/pigweed/repo is not checked out.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ion Alarm Notify event (#73816)

* TC-EPALM-2.2: Add Python automation test script for the EPALM alarm state machine

TC-EPALM-2.2 ("Primary functionality (alarm state machine) with Server as DUT")
has had a merged test plan since 2026-07-16 in chip-test-plans #6157, but no
Python automation was ever filed for it. TC-EPALM-2.1 and 2.3 both have scripts;
2.2 is the gap in the set.

Implements all 14 steps against the merged plan. Steps 4 to 10 drive each fault
bit through the General Diagnostics TestEventTrigger codes that the EPALM server
already ships (ElectricalProtectionAlarmTestEventTriggerHandler, 0x00A3...0000
through 0007) and verify the corresponding State bit via a subscription report.
Step 11 checks State is a subset of Supported. Step 14 clears the alarms.

EPALM disallows the inherited RESET feature, so no Reset command is generated
into the Python bindings and step 12 declares it locally to exercise the
UNSUPPORTED_COMMAND path. TC_REFALM_2_2.py does the same for Refrigerator Alarm.

Step 13 follows chip-test-plans #6364: ModifyEnabledAlarms is optional in Alarm
Base rather than disallowed, so the script expects UNSUPPORTED_COMMAND only when
the DUT does not list the command, and success when it does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* [EPALM] Add per-alarm clear TestEventTriggers

The Electrical Protection Alarm trigger handler can set each of the seven alarm
bits individually, but the only way to clear one is kClearAll, which clears them
all at once.

TC-EPALM-3.1 through 3.7, added by chip-test-plans #6302, each drive one alarm up
and then back down to observe the Notify event carrying that bit in Active and
then in Inactive. They reference clear codes 0x00A3...0011 through 0017, which do
not exist, so none of those seven test cases can be automated today.

Adds those seven codes and routes them to the cluster's existing
DeactivateAlarms(), leaving kClearAll in place.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* TC-EPALM-3.1 to 3.7: Add Python automation for the EPALM Notify event

chip-test-plans #6302 adds seven Notify event test cases, one per alarm bit,
sharing a parameterized test procedure. This adds the seven scripts.

Each raises its alarm through the TestEventTrigger that sets it, checks the
Notify event carries that bit in Active with State updated, then lowers it
through the matching clear trigger and checks the event carries the bit in
Inactive with State cleared. Step 3a doubles as cleanup, so the seven are
order-independent.

Each script is gated on the feature that owns its alarm bit, so a DUT that
implements only some alarms runs only the applicable cases.

Depends on the per-alarm clear triggers, which this branch carries.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger the Darwin test suites

Both Darwin jobs died about three minutes into 'Build Apps Using Unified Build'
with orphaned xcodebuild, ccache and llvm processes and no compile error in
either log. The same job passes on master and on five sibling PRs, only two
files reference the enum this branch extends and both are updated together, and
the app builds clean locally from this branch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* ci: retrigger after an unrelated TC_AccessChecker flake

The TC_[A] REPL shard failed on TC_AccessChecker.py, which timed out in
setup_class with CHIP Error 0x00000032. That shard does not run TC-EPALM, and
this branch adds only TC_EPALM_2_2.py.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Do not wait for a State report when the trigger causes no transition

ElectricalProtectionAlarmCluster::SetState returns early when the effective
State is unchanged, with "no transition: no report, no event". The script waited
for a subscription report after every trigger, so two paths could hang against a
real DUT rather than fail:

  - a DUT that already has a fault raised when the test starts, where the set
    trigger for that alarm changes nothing;
  - the clear-all trigger in step 14 when nothing was raised, which happens when
    every feature-gated step was skipped.

Both now read State instead of waiting when no transition is expected. The
assertions are unchanged.

The example app always boots with State clear and raises each alarm in turn, so
CI does not reach either path; it matters for real DUTs.

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Clear the alarm in a finally block so a failure cannot latch the DUT

Step 3a doubles as cleanup, which the test plan relies on to keep the seven
cases order-independent. That only holds when 3a is reached: an assertion or a
timeout anywhere after the set trigger skipped both the clear and the
subscription teardown, leaving the DUT latched into a fault for whatever ran
next.

Steps 2a to 3b now run inside a try, with the clear trigger and sub.cancel() in
a finally. The cleanup trigger is itself guarded so a failure there cannot
replace the original exception, and a second clear after a successful 3a is a
no-op because no transition means no report.

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Consume the baseline Notify before flushing, and prove the alarm starts clear

flush_events() drains the handler's queue but does not wait for callback
delivery. Step 1e fired the clear trigger and flushed immediately, so on a DUT
that already had this alarm raised the resulting inactive Notify could arrive
after the flush and still be queued when step 2a waits. Step 2a would then read
the baseline event instead of the set-transition and fail its Active assertion.

Step 1e now reads State first. If the alarm was already raised it consumes the
inactive Notify deterministically, and either way it asserts the alarm is clear
before the set trigger, so the precondition the rest of the case depends on is
verified rather than assumed.

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Inline the step descriptions and drop steps_TC_EPALM_2_2

Moves each step's description and expectation into its self.step() call and
removes the steps_ method, matching the current style.

The feature-gated triggers were a loop over a table, which the AST step
extractor cannot read: it requires constant arguments and points at a steps_
method as the alternative for dynamic ones. Steps 4 to 10 are now written out.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Move the EPALM TestEventTrigger handling into a shared TestBase

The trigger codes were duplicated per script: this one carried all eight, and
the seven TC-EPALM-3.x scripts each hard-code their own set and clear pair, so
the same fifteen codes are spread across eight files.

TC_EPALM_TestBase.py now owns them, keyed by AlarmBitmap rather than by raw
value, so callers name the alarm and the mapping lives in one place:

    await self.send_test_event_trigger_set_alarm(AlarmBitmap.kArcFault)
    await self.send_test_event_trigger_clear_alarm(AlarmBitmap.kArcFault)
    await self.send_test_event_trigger_clear_all()

It also carries read_state(), which was duplicated the same way.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Use the shared TestBase in the TC-EPALM-3.x scripts and inline the steps

Each of the seven scripts carried its own SET_TRIGGER and CLEAR_TRIGGER pair, an
_await_notify and a _read_state. They now inherit all of that from
TC_EPALM_TestBase and name the alarm rather than a raw trigger code.

await_notify moves into the base as well, since all seven use it and 2.2 does
not, and the ValueDecodeFailure guard it carries is worth stating once.

Also drops steps_TC_EPALM_3_x in favour of the description and expectation
inline at each self.step() call.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Annotate the TestBase trigger helpers and document read_state

Reported by coderabbitai.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Replace desc_TC_EPALM_2_2 with a docstring matching the test plan

The docstring carries the test case title and the plan's Purpose text with the
adoc macros expanded, so the script reads the same as the rendered plan.

The Purpose text is the wording chip-test-plans #6364 lands: the Reset command
is rejected, and ModifyEnabledAlarms is optional in Alarm Base and checked
against whichever behavior the DUT declares. That PR is still open, so the
docstring is ahead of master until it merges.

Reported by jamesharrow.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Use the generated command id, the read_state helper, and plan-matching expectations

Addresses review on #73812:
- accepts_modify now reads Commands.ModifyEnabledAlarms.command_id instead of a
  hand-declared constant.
- The three inline State reads go through the TestBase read_state helper.
- Every step expectation is now the TC-EPALM-2.2 plan text with the adoc macros
  expanded, so the script and PR6364 read the same.

* Verify Mask changes on ModifyEnabledAlarms; drop the latch clause

Tracks the matching PR6364 plan edits:
- New step 13b checks that a DUT accepting ModifyEnabledAlarms actually changes
  Mask, rather than only returning SUCCESS.
- The docstring no longer claims latch verification; no step exercises it.

* Replace desc_TC_EPALM_3_x with docstrings matching the test plan

Same treatment as TC-EPALM-2.2: the desc_ method goes and the test method carries
the PR6302 Purpose for its alarm, with the adoc macros expanded.

* Call the cluster directly from each trigger case

Drops the activate flag: every case now returns the ActivateAlarms or
DeactivateAlarms result, and default: return false; is the only fallthrough.
66 lines to 48.

* Match the step expectations to the TC-EPALM-3.x plan text

Same treatment as TC-EPALM-2.2: each expectation is now the PR6302
epalm_alarm_testcase.adoc text with the macros expanded, rather than a
paraphrase. 49 expectations across the seven scripts.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cover the whole subscription lifetime with try/finally

Addresses CodeRabbit on #73816:
- TC_EPALM_2_2 had no try/finally at all, so a failure in any of steps 4 to 13b
  left the DUT with alarms latched and the subscription registered.
- TC_EPALM_3_3 and 3_7 opened their try after the baseline clear, so a failure
  in steps 1c to 1e skipped cleanup. The try now starts at the subscription.
- Annotate await_notify with its return type, matching the other TestBase helpers.

* Restore Mask and drain its State report in step 13b

Alarm Base SetMask clears any active State bit the new mask no longer covers
and reports the transition. Step 13b masks off a bit that steps 4-10 raised, so
it produced a State report that step 14 would dequeue instead of the one from
the clear-all trigger, and it left the reduced Mask on the DUT.

Step 13b now saves the original Mask, drains that report when one is expected,
and restores the Mask. Step 14 branches on the live State rather than the step
11 snapshot, which would otherwise be stale once 13b changes it.

* Branch step 14 on the live State, not the step 11 snapshot

This belongs with the previous commit, whose message already described it: the
edit silently failed to apply and I pushed without noticing. Step 14 tested
'state', read back at step 11, which goes stale as soon as 13b masks off an
active bit. If 13b cleared the last active bit, clear-all becomes a no-op that
reports nothing and step 14 would block until the report timeout.

* Restore Mask from finally, and capture it before step 13a

The success-path restore left the DUT with a modified Mask whenever the
command, the read-back, the assertion or the report drain failed. Capture now
happens before 13a, which is the first write, and the restore is best effort
in finally alongside the alarm cleanup.

* Factor the TC-EPALM-3.x body into one parameterized base function

Per James Harrow: seven near-identical 148-line scripts are hard to review, and
the plan already expresses this as one parameterized include. The scripts now
mirror that structure.

TC_EPALM_TestBase gains alarm_notify_steps(), which builds the nine TestSteps
with the epalm_alarm_testcase.adoc text and the alarm name and bit substituted,
and run_alarm_notify_test(), which holds the body once.

Each script drops from 148 lines to 79, of which 41 are the licence and CI
arguments header. What remains is the alarm parameters, the PICS list, a
two-line steps_ method and a one-line test body.

steps_ comes back deliberately. step_extractor reads self.step() calls from the
test method's own source and does not follow calls into a base class, so a
delegating body would yield an empty step list with no error. The extractor
documents this case: tests with dynamic steps should define an explicit steps_
method.

Also fixes an inconsistency: 3_1, 3_2, 3_4, 3_5 and 3_6 still opened their try
block after the baseline clear, so a failure in steps 1c to 1e skipped cleanup.
Only 3_3 and 3_7 had been corrected. There is now one body and one placement.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Test scripts for AVANLY 2.1 and 2.2

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Exclude the helper class from CI

* Address Code Comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address code comments, fix bad cut-n-paste

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address code comments

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Address code comment re: finally block

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…(#73251)

* Added code to JNI to manage ThreadCredentialsNeeded and
WifiCredentialsNeeded events.
Added Listeners that can be notified when those events happen.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixes

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fixes from copilot.

* Fixes suggested by copilot

* Fixes

* Fix

* Replaced Wifi by WiFi.

* Fixes

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix from Copilot

* Use JniGlobalReference instead of jobject

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Notify listeners asynchronously.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix problem reported during AI review.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Fix following Andrei's review.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* TC_MOD_1_2: accept null StartUpMode per spec

* Update src/python_testing/TC_MOD_1_2.py

Co-authored-by: Juan Erasmo Trejo <jtrejoespinoza@griddynamics.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* TC_MOD_1_2: add missing matter_asserts import and fix tuple bug

---------

Co-authored-by: Juan Erasmo Trejo <jtrejoespinoza@griddynamics.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Reject out-of-range SmokeSensitivityLevel writes

SensitivityEnum is 0..2, but DataModel::Decode maps any other value onto
kUnknownEnumValue and returns success, so a write of 3-255 was answered
Success and the sentinel was stored. Reject those with CONSTRAINT_ERROR,
matching the existing convention in FanControlCluster.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…(#73728)

* Add the mandatory Power Topology server to electrical-protection-app

Endpoint 1 declares the Electrical Distribution Enclosure device type (0x0517),
which lists Power Topology (0x009C) as a mandatory server cluster, but the app
did not implement it.

Of the NODE/TREE/SET choice, TreeTopology is the one that describes an
enclosure: it provides power to itself and its child endpoints. TREE gates none
of the cluster's attributes, so the delegate reports empty endpoint lists rather
than inventing topology this app does not model.

Also gives the app a TC_DeviceBasicComposition run, which it did not have. That
test checks composition and attribute-list consistency, not device-type
mandatory clusters, so it would not by itself have caught this.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Trim the doc comments to what the code needs

The comments restated this PR's rationale, which the description already
carries verbatim. Keeps what a reader of the code needs and drops the
device-type conformance argument and the feature-gating enumeration.

Reported by malbert-silabs.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
… (#73835)

* Add build time selection of default device behavior

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* apply comments

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changing-git-submodules-on-purpose sl-require-admin-action This TAG indicates that an admin must take action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.