feat(interaction): reassemble chunked list-attribute reports for cluster read - #101
Merged
Merged
Conversation
…t.Read Devices split a list attribute too large for one AttributeDataIB into an empty/partial-array marker followed by ListIndex=null "append" fragments. Merge these into one AttributeReport per logical attribute after the existing MoreChunkedMessages loop collects the full response, so cluster read always returns one row per attribute regardless of chunking. Fragment contiguity (never interleaved with another path's reports) is verified against the C++ reference implementation's reporting engine, which drains one dirty path to exhaustion via AttributeEncodeState before moving to the next. A malformed append with no preceding marker passes through unmerged rather than failing the whole read. Closes #96 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #100
This PR is stacked on #100 (
tlv.Optional[T]) and targets that branch instead ofmain. Once #100 merges, GitHub will retarget this PR tomainautomatically.Summary
AttributeDataIBinto an empty/partial-array marker followed byListIndex=null"append" fragments;cluster readpreviously surfaced these as separate rows instead of one reassembled value.AttributeReportper logical attribute insideinternal/interaction.Client.Read, after its existingMoreChunkedMessageschunk-collection loop, operating on raw TLV bytes (no dependency on theclusterspackage).Engine::BuildSingleReportDataAttributeReportIBs/AttributeEncodeStateinconnectedhomeip) before writing the merge algorithm.cli/cluster.goandinternal/daemonare untouched — both already produce one row per report, so fewer, fully-merged reports fromClient.Readfixcluster readfor free.Closes #96
Test plan
mise run test(table-driven tests ininternal/interaction/reassemble_test.gowith hand-built TLV fixtures, including a malformed-sequence case)mise run lintmise run build/code-review(Standards + Spec) run against this diff — no hard findings on either axis🤖 Generated with Claude Code