Don't allow signal definition to reference attributes with lower stability than the signal itself#3752
Merged
lmolkova merged 8 commits intoJun 1, 2026
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR tightens the repository’s policy enforcement so that semantic convention signal groups (spans/metrics/events/entities, etc.) cannot reference attributes that have a lower stability than the group itself—unless those attributes are opt_in. This addresses cases where a signal was promoted but some referenced attributes remained less stable.
Changes:
- Extend the Rego policy from “stable-only” checks to a general stability ordering check using a stability ranking map.
- Update and expand policy tests to cover the generalized stability comparison behavior.
- Update documentation to describe the rule at the group level, and add a changelog entry for the change.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
policies/group_stability.rego |
Implements stability-rank comparison and adds a new exception. |
policies_test/group_stability_test.rego |
Refactors/extends tests for the new policy behavior. |
docs/general/semantic-convention-groups.md |
Documents the new “no lower-stability attributes unless opt_in” guidance. |
.chloggen/group-stability-check.yaml |
Adds a changelog entry describing the enhancement. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
kamphaus
approved these changes
May 31, 2026
trask
approved these changes
Jun 1, 2026
3 tasks
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(unless attribute is opt-in)
Currently we only check stable groups, but in #3693 we marked a metric as stable leaving some of its attributes as development - #3739
Let's extend policy to cover all stability levels.