Repository navigation
Conversation
Pull request dashboard statusWaiting on reviewers · refreshed 2026-12-05 20:05 UTC Review the latest changes. Status above doesn't look right?
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1929 +/- ##
=====================================
Coverage 88.1% 88.2%
=====================================
Files 169 170 +1
Lines 19574 19591 +17
=====================================
+ Hits 17263 17291 +28
+ Misses 2311 2300 -11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Active template issues cause rename entries to run together and explicitly empty deprecation notes to render replacement messages with empty targets.
2 open issues
What changed in this PR
This PR introduces a dedicated structured deprecation type for v2 semantic conventions, addressing #1828 and #988 while preserving the separate v1 model.
Changes:
- Removes
unspecifiedfrom v2 and enforces reason-specific fields, with conversion support for legacy v1 deprecations. - Updates schemas, diff output, documentation templates, and UI handling for optional rename notes.
- Changes live-check advice to expose a structured
deprecatedobject and documents the migration requirements.
| File | Description |
|---|---|
ui/src/lib/api.ts |
Removes the explicit unspecified reason literal. |
ui/src/components/StabilityBadge.tsx |
Adds replacement names to deprecation tooltips. |
src/serve/server.rs |
Uses the v2 deprecation type. |
schemas/semconv.schema.v2.json |
Enforces structured, reason-specific deprecations. |
schemas/semconv.resolved.v2.json |
Updates resolved deprecation constraints. |
schemas/semconv.materialized.v2.json |
Updates materialized deprecation constraints. |
schemas/semconv.diff.v2.json |
Makes rename notes optional. |
schemas/semconv-syntax.v2.md |
Documents supported reasons and note requirements. |
defaults/diff_templates/markdown/diff.md.j2 |
Conditionally renders rename notes. |
defaults/diff_templates/ansi/diff.txt.j2 |
Conditionally renders terminal rename notes. |
crates/weaver_version/src/schema_changes.rs |
Represents rename notes as optional. |
crates/weaver_semconv/src/v2/span.rs |
Uses v2 deprecations for spans. |
crates/weaver_semconv/src/v2/mod.rs |
Exposes the new type in common fields. |
crates/weaver_semconv/src/v2/metric.rs |
Uses v2 deprecations for metrics. |
crates/weaver_semconv/src/v2/event.rs |
Uses v2 deprecations for events. |
crates/weaver_semconv/src/v2/entity.rs |
Uses v2 deprecations for entities. |
crates/weaver_semconv/src/v2/deprecated.rs |
Defines and tests validation, display, and conversions. |
crates/weaver_semconv/src/v2/attribute.rs |
Requires structured enum-member deprecations. |
crates/weaver_semconv/src/convert.rs |
Converts between v1 and v2 deprecation types. |
crates/weaver_search/src/types.rs |
Uses v2 deprecations in search types. |
crates/weaver_search/src/lib.rs |
Updates search test fixtures. |
crates/weaver_resolver/src/imports.rs |
Converts deprecations at import boundaries. |
crates/weaver_resolver/src/dependency.rs |
Converts dependency deprecation metadata. |
crates/weaver_resolver/src/attribute.rs |
Converts deprecations during attribute lookup. |
crates/weaver_resolved_schema/src/v2/registry.rs |
Updates registry test fixtures. |
crates/weaver_resolved_schema/src/v2/mod.rs |
Preserves absent rename notes in diffs. |
crates/weaver_resolved_schema/src/v1/mod.rs |
Preserves populated notes in v1 diffs. |
crates/weaver_resolved_schema/src/convert.rs |
Updates resolved-schema conversions and tests. |
crates/weaver_live_check/tests/livecheck_emit.rs |
Updates emitted advice context fixtures. |
crates/weaver_live_check/src/live_checker.rs |
Updates deprecation fixtures and assertions. |
crates/weaver_live_check/src/lib.rs |
Normalizes versioned deprecations to v2. |
crates/weaver_live_check/src/advice/deprecated_advisor.rs |
Serializes structured deprecation advice. |
crates/weaver_forge/templates/registry/markdown/spans.md.j2 |
Uses shared deprecation formatting. |
crates/weaver_forge/templates/registry/markdown/metrics.md.j2 |
Uses shared deprecation formatting. |
crates/weaver_forge/templates/registry/markdown/events.md.j2 |
Uses shared deprecation formatting. |
crates/weaver_forge/templates/registry/markdown/entities.md.j2 |
Uses shared deprecation formatting. |
crates/weaver_forge/templates/registry/markdown/attributes.md.j2 |
Imports and uses shared deprecation formatting. |
crates/weaver_forge/templates/registry/markdown/_macros.j2 |
Adds fallback text for note-less renames. |
CHANGELOG.md |
Records breaking changes and regeneration requirements. |
Review effort: Balanced
141df06 to
c22dad8
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Formal schema changes and breaking persisted v2 and live-check contracts require specification-approver review and maintainer confirmation of downstream compatibility and the registry regeneration rollout.
No open issues 🎉
2 resolved since last review
Review effort: Balanced
…precation # Conflicts: # CHANGELOG.md

Fixes #1828
Fixes #988 (for v2)
v2 now has its own
Deprecatedtype, separate from the shared v1 one.unspecifiedis gone from the v2 definition, resolved and materialized schemas. A plain stringdeprecatedis rejected in v2 definitions.noteis required onobsoletedanduncategorized, optional onrenamed. Weaver doesn't store a default note anymore. Fields that don't belong to the reason, likerenamed_toonuncategorized, are rejected.uncategorized. v1 output doesn't change.Displayprints the note, or "Replaced byx." for arenamedwithout one. Forge markdown templates use a matchingdeprecated_notemacro.noteon renamed items that don't have one.deprecatedadvice context now has a structureddeprecatedobject, serialized from the v2 type, instead ofdeprecation_reason/deprecation_note. New fields onDeprecatedshow up there with no extra code.Breaking: resolved v2 registries built by older versions can contain
reason: unspecifiedand need to be regenerated.