Skip to content

fix(codegen): handle 'Field ID' header in command param tables#3692

Merged
Apollon77 merged 1 commit intomainfrom
fix-1.5.1model
May 6, 2026
Merged

fix(codegen): handle 'Field ID' header in command param tables#3692
Apollon77 merged 1 commit intomainfrom
fix-1.5.1model

Conversation

@Apollon77
Copy link
Copy Markdown
Collaborator

@Apollon77 Apollon77 commented May 6, 2026

Summary

  • Matter 1.5.1 AudioOutput cluster (06-05-audio-output-cluster.md) is the only spec file using | Field ID | as the column header for command parameter tables — every other cluster uses | ID |. Header normalization stripped non-word chars and lowercased, producing column key fieldid. FieldSchema.id in translate-datatype.ts was bare Integer (no alias), so the lookup failed and SelectOutput / RenameOutput generated with no parameters.
  • Added Alias(Integer, "fieldid") so the parser recognizes the variant header. Regenerated support/models/src/v1.5.1/spec.ts and the standard model — AudioOutput.SelectOutput now has Index, AudioOutput.RenameOutput now has Index + Name, and packages/types/src/clusters/audio-output.d.ts exposes SelectOutputRequest / RenameOutputRequest with the proper signatures.

🤖 Generated with Claude Code

Matter 1.5.1 AudioOutput cluster spec uses "Field ID" column header in
SelectOutput and RenameOutput parameter tables. Header normalizes to
column key "fieldid", but FieldSchema.id was bare Integer with no alias,
so the lookup failed and both commands generated with no parameters.

Add "fieldid" alias so the parser recognizes that header. Regenerated
intermediate spec and standard model — AudioOutput SelectOutput now has
Index and RenameOutput has Index + Name as the spec defines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 6, 2026 07:18
@Apollon77 Apollon77 added the automerge Set this label if the PR is ready to automatically merged after approval label May 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes Matter spec codegen to recognize command/struct field tables that use a non-standard Field ID column header (normalized to fieldid), which previously caused the AudioOutput cluster’s SelectOutput / RenameOutput commands to be generated without request parameters.

Changes:

  • Updated the spec table field schema to alias fieldidid during table translation.
  • Regenerated the Matter 1.5.1 spec model and standard model so AudioOutput command request fields are emitted.
  • Regenerated TypeScript cluster typings so selectOutput / renameOutput now require the correct request payload types.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
support/codegen/src/mom/spec/translate-datatype.ts Adds fieldid alias for the canonical id column when translating field tables.
support/models/src/v1.5.1/spec.ts Regenerated v1.5.1 spec model to include AudioOutput command request fields.
packages/model/src/standard/elements/audio-output.element.ts Regenerated standard element model to include command parameter fields for AudioOutput.
packages/model/src/standard/resources/audio-output.resource.ts Regenerated resource metadata; SelectOutput now includes its Index field documentation.
packages/types/src/clusters/audio-output.d.ts Regenerated cluster typings; adds request types and updates command signatures to accept them.

@Apollon77 Apollon77 merged commit 43d0df6 into main May 6, 2026
37 of 38 checks passed
@Apollon77 Apollon77 deleted the fix-1.5.1model branch May 6, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Set this label if the PR is ready to automatically merged after approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants