v2: Support requirement levels on public v2 groups#1584
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the v2 resolved/materialized schema model so public v2 attribute groups preserve per-attribute requirement_level on their attribute references, and threads that value through generation, resolver import logic, fixtures, and tests.
Changes:
- Introduce v2 public attribute-group attribute reference/value wrappers (
AttributeGroupAttributeRef/AttributeGroupAttribute) that carryrequirement_level. - Propagate group-specific
requirement_levelthrough semconv generation, forge materialization, and dependency importing (with updated tests/fixtures). - Update v2 JSON schemas and schema documentation to reflect the new attribute-group attribute reference shape.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| schemas/semconv.resolved.v2.json | Resolved v2 schema: attribute-group attributes[] now uses an object ref that includes requirement_level. |
| schemas/semconv.materialized.v2.json | Materialized v2 schema: attribute-group attributes[] now includes requirement_level alongside attribute fields. |
| schemas/semconv-schemas.md | Docs updated to describe the new attribute-group attribute reference shape. |
| crates/weaver_semconv_gen/src/v2.rs | Generator updated to emit attribute-group attributes with group-specific requirement_level. |
| crates/weaver_resolver/src/dependency.rs | Dependency import path updated to preserve per-ref requirement_level when importing v2 public attribute groups; tests updated accordingly. |
| crates/weaver_resolver/data/registry-test-v2-5-published/registry/main.yaml | Test registry updated to author a non-default requirement_level on an attribute-group ref. |
| crates/weaver_resolver/data/registry-test-v2-5-published/published/resolved_schema.yaml | Updated published resolved-schema fixture to include { base, requirement_level } shape. |
| crates/weaver_resolver/data/registry-test-v2-5-published/expected-schema.yaml | Updated expected schema fixture to include { base, requirement_level } shape. |
| crates/weaver_resolver/data/registry-test-published-2/published/resolved_schema.yaml | Updated published resolved-schema fixture to include { base, requirement_level } shape. |
| crates/weaver_resolved_schema/src/v2/mod.rs | v1→v2 conversion updated so public attribute-group refs carry requirement_level; new test added. |
| crates/weaver_resolved_schema/src/v2/attribute_group.rs | Resolved-schema v2 attribute-group model updated so attribute refs include requirement_level. |
| crates/weaver_forge/src/v2/registry.rs | Forge materialization updated to carry per-ref requirement_level into materialized attribute-group attributes. |
| crates/weaver_forge/src/v2/attribute_group.rs | Forge v2 attribute-group model updated so attributes carry requirement_level. |
| CHANGELOG.md | Adds an Unreleased entry for this behavior change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
This PR has review comments. Review suggestions, whether from maintainers or automated reviewers, aren't always correct or required. Please evaluate each comment on its merits, then make sure each thread has a clear outcome. For example, link to the commit if you applied a suggestion, explain why it wasn't applied, or ask a follow-up question. Automation flags a PR for human review once every review thread has a reply or is marked as resolved. Status across open PRs is visible on the pull request dashboard. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1584 +/- ##
=======================================
- Coverage 81.1% 81.1% -0.1%
=======================================
Files 130 130
Lines 11514 11519 +5
=======================================
+ Hits 9347 9349 +2
- Misses 2167 2170 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Public v2 attribute groups now keep per-attribute requirement_level on their refs in the resolved and materialized schemas; internal groups and v1 are unaffected.