Skip to content

feat: Matter 1.6.0 support#3941

Open
Apollon77 wants to merge 62 commits into
mainfrom
specparse-160
Open

feat: Matter 1.6.0 support#3941
Apollon77 wants to merge 62 commits into
mainfrom
specparse-160

Conversation

@Apollon77

Copy link
Copy Markdown
Collaborator

Brings matter.js up to the Matter 1.6.0 specification. Backward compatible — newly-mandatory attributes are seeded with conservative defaults and new/provisional clusters stay behind feature guards, so existing code needs no changes.

Highlights

  • @matter/*: Upgraded to Matter specification version 1.6.0 (regenerated models, clusters, devices, tags; spec references now resolve to MatterSpecification.v16.*)
  • @matter/types: NFC Transport Layer (NTL, bit 4) added to the onboarding payload Discovery Capabilities bitmap
  • @matter/model: cluster-variance rules for the Matter 1.6 conformance idioms
  • @matter/node:
    • Newly-mandatory 1.6 diagnostics attributes implemented
    • BooleanState StateChange event enabled by default again; OccupancySensing OccupancyChanged emitted when its OccupancyEvent feature is enabled
    • BasicInformation CapabilityMinima defaults advertised + read/subscribe path-count ceiling enforced
    • ConfigurationVersion increment convenience API; bumps rejected on bridged devices without the attribute enabled
    • Preparations for Groupcast (provisional)
    • GroupKeyMap entries pruned on key-set removal; MEI attributes tagged WildcardSkipCustomElements
  • @matter/protocol:
    • Preparations for Groupcast (provisional)
    • Client read path-count hint sourced from the peer's advertised CapabilityMinima floors

See CHANGELOG.md for the full list.

🤖 Generated with Claude Code

Apollon77 and others added 30 commits May 31, 2026 12:33
Generated from matter-spec 1.6.0 markdown. Identical validation-error
baseline to 1.5.1 (no scraper changes needed). Adds clusters
AmbientContextSensing (0x431), TemperatureAlarm (0x64), Groupcast (0x65);
namespaces IdentifiedObject/Sound/HumanActivity (0x49-0x4b); 15
ClusterRevision bumps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Generated via generate-model --revision 1.6 from the 1.6.0 intermediate
spec model. Adds clusters AmbientContextSensing, Groupcast,
TemperatureAlarm; namespaces IdentifiedObject/Sound/HumanActivity; global
CertificationTypeEnum. Includes 15 ClusterRevision bumps and the
associated element/resource updates (new rev-gated mandatory attributes
on BasicInformation and GeneralDiagnostics, new optional/provisional
features, JointFabric provisional->certified promotion).

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

generate-clusters failed on three conformance forms introduced in 1.6:

- comma "otherwise" feature lists (e.g. "HA, OI, AUD"), including mixed
  lists with a conjunction term ("HA, OI, AUD, OC & OI")
- bracketed feature gate with a negated field reference and choice marker
  ("[FOO & !field].b+")
- revision gates joined to other terms inside brackets/otherwise lists,
  which the previous Rev-stripping mangled

Add matchers for the new forms and rework Rev-gate stripping to drop the
Rev term together with its adjacent connector while preserving the
bare-vs-bracketed mandatory/optional fallback.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Regenerate the type layer from the 1.6 model: new clusters
AmbientContextSensing, Groupcast and TemperatureAlarm, the
CertificationType global and IdentifiedObject/Sound/HumanActivity
namespaces, plus revision and attribute updates across existing clusters
(e.g. ConfigurationVersion and CapabilityMinima fields on BasicInformation,
DeviceLoadStatus on GeneralDiagnostics). Includes matching main forwards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add behaviors for the new AmbientContextSensing, Groupcast and
TemperatureAlarm clusters and the IdentifiedObject/Sound/HumanActivity
semantic tags, and regenerate device types and existing behaviors affected
by the 1.6 model (new features, attributes and cluster revisions).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Make a default node conformant at the bumped cluster revisions:

- BasicInformationServer: seed ConfigurationVersion and the four new
  CapabilityMinima fields (SimultaneousInvocations/Writes, Read/Subscribe
  paths) with conservative valid minimums
- GeneralDiagnosticsServer: implement DeviceLoadStatus as a dynamic getter
  backed by live SessionManager subscription counts and new cumulative
  InteractionServer counters
- InteractionServer: track total IM messages sent/received per message
  (excluding MRP retransmissions and duplicates) across both request and
  subscription-push exchanges, plus total subscriptions established
- MessageExchange: add onReceive/onSend setters so a handler can observe an
  exchange obtained after construction

ConfigurationVersion currently uses a static default; monotonic increment
on configuration change is left as a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adjust attribute counts, cluster revisions and ACL entry shape
(auxiliaryType) in node test fixtures for the new BasicInformation
(ConfigurationVersion, CapabilityMinima) and GeneralDiagnostics
(DeviceLoadStatus) attributes, and give the device-onoff-advanced dummy
Thread scan result concrete panId/channel values now that those fields are
mandatory.

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

- BooleanStateServer: enable the ChangeEvent feature by default so the
  StateChange event is available and emitted on state change, as it was
  before 1.6 gated the event behind this feature
- OccupancySensingServer: emit OccupancyChanged automatically when the
  OccupancyEvent feature is enabled, and log an info hint when it is not
  (the feature cannot be forced by default because OccupancySensing
  requires explicit detector-feature selection, which replaces the feature
  set)
- add server tests covering both behaviors

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Port the protocol-level Groupcast infrastructure: per-group multicast
address policy in Groups/FabricGroups, group session handling and the
SessionManager group-message observable, auxiliary ACL awareness in
FabricAccessControl, exchange options passthrough and group message
reporting in ExchangeManager, and client interaction adjustments.
Includes the Groups multicast policy test.

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

Take over the Groupcast feature from the groupcast branch: the full
GroupcastServer (membership, key management, auxiliary ACL provider,
legacy-Groups migration, testing support), the AccessControl Auxiliary
feature handling and the GroupKeyManagement Groupcast extension, plus
Groups/ScenesManagement/ServerGroupNetworking integration and group-session
reporting in the InteractionServer.

Groupcast and its AccessControl/GroupKeyManagement extensions are
provisional in Matter 1.6, so the implementations are inert by default and
guarded by hard throws (each marked with a TODO for removal once the spec
finalizes them):

- GroupcastServer.initialize always throws
- AccessControlServer.initialize throws if the Auxiliary feature is enabled
- GroupKeyManagementServer.initialize throws if GroupcastAdoption is set

Default nodes are unaffected: the server bases do not enable the
provisional features; the feature-gated state and events are typed via
declare-only State/Events extensions and accessed defensively. Guard tests
pin the three throws.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code TODOs pairing with the tracked tasks to derive realistic
CapabilityMinima defaults and enforce them as actual interaction limits.

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

Strengthen the GroupKeyManagement provisional guard to reject the whole
Groupcast feature at initialize (not only a set GroupcastAdoption
attribute), and uncomment the Groups cluster rev-5 "Groupcast adopted"
checks (addGroup/viewGroup/getGroupMembership/addGroupIfIdentifying).

These checks read GroupKeyManagement's GroupcastAdoption state, which is
never populated while the Groupcast feature is provisional and guarded, so
they are inert and backward-compatible today and ready once Groupcast is
promoted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump Specification.REVISION to 1.6.0 and SPECIFICATION_VERSION to
0x01060000, update the SpecificationVersion schema test, and enable the
GeneralDiagnostics DeviceLoadStatus (A000a) PICS now that it is supported.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- GroupKeyManagement KeySetRemove no longer auto-prunes GroupKeyMap entries
  that reference the removed key set; the administrator manages those
  entries (Matter 1.6 §11.2.7).
- mDNS advertisement only emits the T (transport modes) TXT key during
  operational discovery, not for commissionable/commissioner nodes
  (Matter 1.6 §4.3.1/§4.3.4).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add increaseConfigurationVersion() to BasicInformationServer and
BridgedDeviceBasicInformationServer: it runs a configuration-change
callback and bumps ConfigurationVersion once afterwards, wrapping at the
uint32 maximum. A configurationVersion$Changing reactor rejects any
decrease (except the overflow wrap).

The bridged-node variant also bumps the bridge's BasicInformation version.
To group changes across multiple bridged nodes into one transaction with a
single bridge increment, the BasicInformation callback receives the acting
context which is passed to each bridged-node call; a passed context applies
the change in that shared transaction and leaves the bridge increment to
the enclosing call.

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

Add the WildcardFilterConfigurationVersion field to AttributePathIB and
gate WildcardPathFlags on it: the skip flags only suppress paths while the
client's filter version is at or above the node's current
ConfigurationVersion. Once the configuration has advanced past the filter
the flags no longer apply and all paths are reported (an omitted filter or
0xFFFFFFFF is treated as the current version).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Seed the four Matter 1.6 CapabilityMinimaStruct fields
(simultaneousInvocations/WritesSupported, read/subscribePathsSupported)
with meaningful default minimums, leaving caller-provided values intact.

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

Add readPathsSupported/subscribePathsSupported getters (base = spec
floors) so interaction code can source the peer's advertised path
minimums; PeerExchangeProvider returns the peer's reported values.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the hardcoded 9/3 path-count warning thresholds in
ClientInteraction read/subscribe with the peer's advertised
readPathsSupported/subscribePathsSupported (spec floors as fallback).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Block reads and subscribes whose requested path count exceeds a fixed
hard ceiling (10000, the model constraint maximum) with PathsExhausted.
The ceiling is decoupled from the advertised CapabilityMinima minimums.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	packages/protocol/src/session/GroupSession.ts
#	packages/protocol/src/session/SessionManager.ts
…acyNonce, privacyTransform)

Implement low-level AES-CTR obfuscation/deobfuscation for Matter message privacy (P-flag, spec §4.8).
Provides cryptographic operations for header obfuscation with HKDF-derived keys and MIC-based nonces.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…ecode

Complete the merge of message privacy into the Groupcast 1.6 work:

- GroupSession decode-failure telemetry reports the result code only.  Per
  the Groupcast spec the GroupID is set solely for a properly authenticated
  message, so NoAvailableKey/FailedAuth carry no group id; the success and
  message-replay paths use the authenticated post-decode group id (privacy
  obfuscates it in the wire header).
- MessageCodec.decodePacket delegates the shared cleartext-header parse to
  decodeFixedHeader, removing the duplicated parsing.

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

Add class-level usage guidance for the Matter 1.6 ConfigurationVersion
support to BasicInformationServer and BridgedDeviceBasicInformationServer
(bump via increaseConfigurationVersion, monotonic, bridge coalescing).

Also drop a resolved TODO on group destination-id derivation in
MessageExchange.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the non-null assertion on #peerNodeId in the group send path with
an explicit undefined check that throws InternalError, narrowing the type
without a cast.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Re-run generate-spec/generate-model against the final 1.6.0 spec scrape.
Content deltas vs the prior scrape: OnOff OFFONLY conformance precedence
fix, BasicInformation/BridgedDeviceBasicInformation ConfigurationVersion
now Rev >= v6 (BDBI de-provisionalized), PowerTopology CircuitNodeStruct
removed with §11.8 xref renumbering, and Oven/Refrigerator device
revision/conformance adjustments. Validation error profile unchanged.

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

ConfigurationVersion is optional on BridgedDeviceBasicInformation.  When it
is not enabled, increaseConfigurationVersion now throws an ImplementationError
instructing the developer to seed an initial value, instead of silently
skipping the increment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apollon77 and others added 12 commits June 11, 2026 14:33
PrivacyEnhancements was a duplicate of MessagePrivacy (@matter/protocol),
dead in production with only its own test referencing it. MessagePrivacy
is the shipped §4.9 privacy primitive wired into GroupSession/FabricGroups.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Manufacturer-specific attributes in standard clusters were tagged with
WildcardSkipGlobalAttributes during wildcard path expansion. Per core
spec 8.2.1.7.1 the WildcardSkipCustomElements flag (bit 5) covers MEI
attributes "even if included in a standard cluster". Add regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	packages/node/src/node/server/InteractionServer.ts
…tiesBitmap

Matter 1.6 §5.1 Table 60 defines bit 4 = NFC Transport Layer (NTL).
Definition layer only; no NTL transport support yet. Aligns with CHIP
kNFC = 1 << 4.

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

Bump the hardcoded spec-reference namespace in the TS emitter and cluster
generator from v151 to v16, then regenerate clusters, endpoints and tags.
Hand-written non-generated references are handled in a separate pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 17, 2026 13:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Apollon77 and others added 11 commits June 17, 2026 16:24
…dates

#applyDelayedAclUpdateFor runs from the interactionEnd reactor after the
interaction context has exited, where reading the managed auxiliaryAcl
state throws expired-reference. That aborted the reactor so the delayed
real ACL was never applied, letting a denied access succeed
(Test_TC_ACE_1_1 / Test_TC_ACL_2_1). Source the auxiliary entries from the
registered providers instead, which is context-free.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump every hand-written @see {@link MatterSpecification.vXX.*} tag to v16
and correct section numbers that drifted across the 1.6 reorganization
(data types moved to §7.19, cluster sections shifted by the Power Topology
insert, secure-channel CASE/PASE/session renumbering, interaction-model
wildcard-path inserts). Verified each reference by topic against the 1.6.0
spec; also fixes two refs pointing at the wrong document and one § XXX
placeholder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PairingCodeSchema cited 1.3-era table numbers (38/39/40); 1.6.0 renumbered
them to Table 59 (Packed Binary Data Structure), Table 60 (Discovery
Capabilities Bitmask) and Table 62/63/64 (Manual Pairing Code).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert symbol-documenting spec references in JSDoc blocks from inline prose
(e.g. "(Matter spec §4.9.1)") to the canonical @see {@link
MatterSpecification.v16.Core} § X form, so they render as links and are
caught by future version sweeps. Inline reasoning comments are left as prose.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
§8.5.6.3 (no longer exists) → §10.6.4.3.1 (Lists / chunked-list encoding);
§10.7.5 (SubscribeResponseMessage) → §10.6.2.1 (EnableTagCompression).

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

CHIP's all-devices-app cert tests (e.g. TC_BOOL_2_1) now launch device types
the matter.js harness did not register, failing with "unsupported --device".
Add the six referenced by cert tests, built on standard Matter 1.6 clusters:
rain-sensor and water-freeze-detector (BooleanState), pressure-sensor,
light-sensor, humidity-sensor and flow-sensor (measurement clusters).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TC_FLW/ILL/PRS/RH_2_1 read MinMeasuredValue/MaxMeasuredValue with a numeric
(int16) constraint, so the default null fails the check. Seed non-null
min/max (and a measured value within range) per each cluster's valid range.

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

The cert tests read Tolerance (and Illuminance LightSensorType) gated by
PICS that ci-pics-values enables: FLW/ILL/RH .A0003=1 and ILL.A0004=1,
while PRS.A0003=0. Seed those optional attributes so each device's
AttributeList matches the PICS (verified: light [0-4], flow/humidity [0-3],
pressure [0-2]).

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

Surface a peer's ConfigurationVersion changes as an EndpointLifecycle event
(inherited by NodeLifecycle), wired in Peers from BasicInformation on the
node root and BridgedDeviceBasicInformation on bridged endpoints. Plain
event — consumers re-read the peer; no payload.

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

mergify Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Apollon77 and others added 4 commits June 20, 2026 14:23
…sCommissioningWithoutPower

The 1.6.0 spec incorrectly marks the attribute as provisional ("P, O").
Add a local codegen override setting conformance to "O", scoped to 1.6.0
(asOf "1.6", until "1.6.1") on the assumption upstream corrects it in 1.6.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dead export with no consumer. The 64-byte SHA-256 block size is not a
spec-defined constant; it was misattributed under the §3.3 @see, which
correctly covers only CRYPTO_HASH_LEN_BYTES.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants