Skip to content

Handle obsolete Matter conformance in loader, GUI, and codegen. - #1731

Open
paulr34 wants to merge 2 commits into
project-chip:masterfrom
paulr34:feat/handle-obsolete-conformance
Open

paulr34 wants to merge 2 commits into
project-chip:masterfrom
paulr34:feat/handle-obsolete-conformance

Conversation

@paulr34

@paulr34 paulr34 commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Parse as tag Z, hide obsolete attributes/commands/events from configurator views, and expose an obsolete flag so templates can skip them.

#1695

paulr34 and others added 2 commits September 17, 2026 09:19
Parse <obsoleteConform/> as tag Z, hide obsolete attributes/commands/events from configurator views, and expose an obsolete flag so templates can skip them.

Co-authored-by: Cursor <cursoragent@cursor.com>
The test fixture and Matter data model use <obsoleteConform/>, which xml-validate rejected because zcl.xsd only listed deprecateConform.

Co-authored-by: Cursor <cursoragent@cursor.com>
@paulr34
paulr34 force-pushed the feat/handle-obsolete-conformance branch from 99b8322 to aa95a1c Compare September 17, 2026 13:19
function isObsoleteConformance(conformance) {
return conformance === dbEnums.conformanceTag.obsolete
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't put this function here. Add it to conformance-expression-evaluator.js

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed

* - manufacturerCode
* - mustUseTimedInvoke
* - name
* - obsolete

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

zcl-commands helper still does not have the obsolete access. You need to update update functions like query-command.js#selectAllCommands to get access to obsolete through zcl_commands and you need to do this for all the other helpers here as well.
Your alternate option which is way better and a lot more scalable where you will not need to update so many of these helpers and use existing infrastructure we have for conformance every where is to add this to existing conformance and none of the helpers will need to be updated. Will save you a ton of changes here. @ethanzhouyc would that be the correct assumption?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Functionality wise this should be very similar to disallowConformance

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed. Using the existing conformance infrastructure is cleaner and more scalable. is already parsed into the existing CONFORMANCE field as Z, and the conformance evaluator treats Z as notSupported, similar to disallowConform.

I’ll remove the separate obsolete property and use conformance as the source of truth.

One note: the main zcl_commands helper already has access to conformance because both selectAllCommands and selectCommandsByClusterId select COMMAND.CONFORMANCE. I’ll check the other helper query paths for consistency, but they should not need a separate obsolete field.

* @param {*} conformance optional conformance string
* @returns boolean
*/
function isObsolete(conformance) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This helper is not needed. Will be retrieved from existing helpers or conformance.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Understood. I’ll remove this helper and use the existing conformance value instead. Obsolete elements will remain represented as Z, and templates can check it using the existing string comparison helper.

Comment thread src-shared/db-enum.js
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