Skip to content

[Draft] Unify validation system - #98

Draft
hasty wants to merge 11 commits into
project-chip:mainfrom
hasty:granbery/validation
Draft

hasty wants to merge 11 commits into
project-chip:mainfrom
hasty:granbery/validation

Conversation

@hasty

@hasty hasty commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

This PR is in draft, as it's based on top of #106. Once #106 merges, it will be easier to read.

This builds on the changes in #106 to complete the unification of the validation system:

  1. All errors are generated during the validation process (except for catastrophic errors that exclude an entire document from parsing).
  2. Device types have their own validation flow
  3. Creates a generic findEntityByReference which allows referring to entities across the spec by either name or reference
  4. Merges many of the existing error types into common generic ones (e.g. ErrorTypeUnknownElementRequirementCluster, ErrorTypeComposingDeviceTypeClusterRequirementUnknownDeviceType, ErrorTypeConditionRequirementUnknownCondition are just ErrorTypeUnknownEntity with a type)
  5. Adds new checks to element requirements to ensure that references point to the correct element types
  6. Adds new checks to element requirements for composed devices types, to ensure that the referenced clusters exist in the composition

@hasty
hasty force-pushed the granbery/validation branch from be05aa8 to cd594b5 Compare November 4, 2026 16:41
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.

1 participant