Skip to content

Fix DM percent rendering, add checks for limits - #88

Merged
AryaHassanli merged 2 commits into
project-chip:mainfrom
hasty:granbery/limit_validation
Oct 1, 2026
Merged

AryaHassanli merged 2 commits into
project-chip:mainfrom
hasty:granbery/limit_validation

Conversation

@hasty

@hasty hasty commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the incorrect rendering of percent limits in the data model.

It also adds a new framework for checking constraint limits and fallbacks, and adds a couple checks:

  1. That limits on percentage and percentage100ths fields should be expressed as percentages
  2. That limits on percentage fields must be whole percentages
  3. That limits on percentage100ths fields can not have more than two decimals
  4. That null fallbacks can't exist on non-nullable fields

That last one causes a failure on the current spec: the AmbientContextDetectStarted event has a non-nullable ObjectCount field with a fallback of null. We should fix that before merging this.

@hasty
hasty requested a review from a team as a code owner September 30, 2026 18:25
@hasty
hasty requested a review from AryaHassanli September 30, 2026 18:25
@mergify

mergify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@AryaHassanli

Copy link
Copy Markdown
Contributor

Thank you @hasty for the PR. Could you please fix the failing test?

@hasty

hasty commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @hasty for the PR. Could you please fix the failing test?

Done!

@AryaHassanli
AryaHassanli merged commit ba892a7 into project-chip:main Oct 1, 2026
4 checks passed
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