Skip to content

Add test for chunked list attribute reassembly#3534

Merged
Apollon77 merged 2 commits intomainfrom
fix/chunked-list-test-3533
Apr 6, 2026
Merged

Add test for chunked list attribute reassembly#3534
Apollon77 merged 2 commits intomainfrom
fix/chunked-list-test-3533

Conversation

@Apollon77
Copy link
Copy Markdown
Collaborator

@Apollon77 Apollon77 commented Apr 4, 2026

Summary

  • Adds ClientChunkedListTest.ts that creates a device with 50 channels in the Channel cluster's channelList attribute, forcing the data to be chunked across multiple ReportData messages
  • Tests both subscription initial report path and explicit remote read path
  • Verifies all 50 channels are correctly reassembled on the client side

Closes #3533

Context

Investigation of #3533 revealed the client-side decode error ("When no current value is supplied the first chunked element needs to have a list index of undefined, but received null") was caused by a bug in the handleAttributeReportEntries function in 0.15.x that failed to buffer chunked list items when all entries in a report belonged to the same attribute. This was fixed on main with the leftoverAttributeReports mechanism in normalizeAndDecodeReadAttributeReport.

The server-side "pack-and-add" chunking behavior (packing items into the initial REPLACE ALL array, overflow as individual items) is correct per Matter 1.5.1 spec section 10.6.4.3.1 (Pattern 3).

🤖 Generated with Claude Code

Validates that large list attributes (50-item channelList) are correctly
reassembled on the client side when split across multiple ReportData
messages. Tests both the subscription initial report path and explicit
remote read path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Apollon77 Apollon77 requested a review from lauckhart as a code owner April 4, 2026 21:12
Copilot AI review requested due to automatic review settings April 4, 2026 21:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a node-level regression test to ensure chunked list attributes (specifically Channel.channelList) are correctly reassembled on the client side across multiple ReportData messages.

Changes:

  • Introduces ClientChunkedListTest.ts to create a device with a large channelList intended to force chunking.
  • Validates correct client-side list reassembly via both subscription initial report and explicit remote read paths.

Comment thread packages/node/test/node/ClientChunkedListTest.ts
Comment thread packages/node/test/node/ClientChunkedListTest.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Apollon77 Apollon77 merged commit 39eca88 into main Apr 6, 2026
37 checks passed
@Apollon77 Apollon77 deleted the fix/chunked-list-test-3533 branch April 6, 2026 18:34
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.

Long list chunking or unchunking error

2 participants