Skip to content

Skip elements with provisional ancestors#59

Merged
AryaHassanli merged 5 commits into
project-chip:mainfrom
AryaHassanli:fix-provisionality-parent-resolving
Apr 7, 2026
Merged

Skip elements with provisional ancestors#59
AryaHassanli merged 5 commits into
project-chip:mainfrom
AryaHassanli:fix-provisionality-parent-resolving

Conversation

@AryaHassanli
Copy link
Copy Markdown
Contributor

Description

This change modifies the violation reporting logic in the provisional package. It adds a check to skip reporting violations for an entity if any of its ancestors are marked as provisional.
The goal is to avoid reporting violations for entities that are part of provisional features or clusters, as they may not be subject to full validation rules yet.

Details

  • File: provisional/compare.go
  • Logic added to walk up the parent chain and check for provisional conformance.
  • If a provisional ancestor is found, the violation is skipped.

@AryaHassanli AryaHassanli requested a review from a team as a code owner April 7, 2026 20:17
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the violation reporting logic in provisional/compare.go to skip entities that have a provisional ancestor. The review feedback correctly identifies that the current implementation misses checking the entity itself for provisional status and provides a code suggestion to include this check, ensuring that violations are not reported for any provisional feature.

Comment thread provisional/compare.go Outdated
@AryaHassanli
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modifies the comparison logic in provisional/compare.go to skip reporting non-provisional violations when an entity has a provisional ancestor. A review comment identifies that violationType is a bitmask, making the direct equality check unreliable if multiple bits are set. The reviewer suggests using bitwise operations to clear the ViolationTypeNonProvisional bit and only skipping the entity if no other violation types remain.

Comment thread provisional/compare.go Outdated
@AryaHassanli AryaHassanli merged commit 2ecad6f into project-chip:main Apr 7, 2026
3 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.

1 participant