Skip to content

feat(drift): watch the Rust crate pins in the weekly drift check (#118) - #163

Merged
radra23 merged 1 commit into
mainfrom
feat/rust-drift-check
Oct 3, 2026
Merged

radra23 merged 1 commit into
mainfrom
feat/rust-drift-check

Conversation

@radra23

@radra23 radra23 commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the Rust crates to the weekly drift check. Follow-up to #162 (part of #118).

What changed

  • scripts/drift_check.py reads the marked Cargo.toml block in instrumentation-gen.md (the single source of the Rust pins) and reports each crate against crates.io
  • New behind_compatible follows Cargo's caret rules, so 0.33 is not behind 0.33.9 but is behind 0.34
  • A BEHIND report adds a note that the crates bump as a group and the golden Cargo.lock needs regenerating
  • tests/drift-check.test.sh checks the parser, the comparison, that the golden crate's Cargo.toml matches the pins, and the group rule (opentelemetry* share a minor, tracing-opentelemetry is one ahead)

Test plan

  • bash tests/drift-check.test.sh passes, and so do all the other hook and snapshot tests

  • Teeth: bumping tracing-opentelemetry back to 0.33, and separately downgrading opentelemetry-otlp to 0.32, each fail the test

  • Ran python3 scripts/drift_check.py against crates.io: all 8 crates current, no false BEHIND on tracing 0.1.44 or tracing-subscriber 0.3.23

  • No version bump: only a script, a test and ROADMAP.md changed

  • Vendor, SDK and semantic-convention facts were verified against the source, not recalled — linked where it isn't obvious.

  • Nothing hardcoded that has a single source of truth (SEMCONV_VERSION, backends.txt, hooks/otel-paths.sh).

scripts/drift_check.py now reads the marked Cargo.toml block in the Rust section of
instrumentation-gen.md and reports each crate against crates.io. The comparison follows
Cargo's caret rules: 0.33 is not behind 0.33.9, but is behind 0.34. A BEHIND report says the
crates move as a group, because a partial bump does not compile.

tests/drift-check.test.sh checks the parser, the comparison, that the golden crate's
Cargo.toml carries the same pins, and the documented group invariant: opentelemetry* share a
minor and tracing-opentelemetry is exactly one ahead. Both mutations of that invariant were
confirmed to fail the test.
@radra23
radra23 merged commit e06cc2e into main Oct 3, 2026
11 checks passed
@radra23
radra23 deleted the feat/rust-drift-check branch October 3, 2026 13:38
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