Skip to content

feat(registry): emit resolve usage-telemetry event (Spec 015) - #270

Merged
enricopiovesan merged 1 commit into
mainfrom
claude/issue-145-resolve-usage-telemetry
Aug 18, 2026
Merged

feat(registry): emit resolve usage-telemetry event (Spec 015)#270
enricopiovesan merged 1 commit into
mainfrom
claude/issue-145-resolve-usage-telemetry

Conversation

@enricopiovesan

Copy link
Copy Markdown
Contributor

Summary

  • Instruments resolve_version_range (the caret-range/semver resolution
    path used by registry sync and equivalent callers) to accept an
    optional ResolveTelemetry<'a> — a UsageTelemetrySink (from
    traverse-contracts) paired with a caller-supplied resolved_at
    timestamp, so this crate never depends on a wall clock or gains new
    dependencies (matches every other registered_at-style field already in
    this crate).
  • On a successful resolution, if a sink was supplied, it is invoked exactly
    once with a resolve event carrying {capability_id}@{version} and
    nothing else. A failed or ambiguous resolution never invokes it. Omitting
    the parameter (None) is byte-for-byte identical to the pre-existing
    behavior.
  • Left the crate's internal transitive-dependency walk
    (dependency_resolver.rs's own call into resolve_version_range)
    untelemetered — spec 015 FR-006 explicitly restricts this spec to the
    top-level resolution path, not a further behavior change.
  • Bumps the pinned traverse-contracts dependency resolution to 0.9.1
    (already permitted by the existing >=0.8.1, <0.10.0 range in
    Cargo.toml) to pick up the UsageTelemetrySink trait, now that
    traverse-framework/traverse#927 has shipped and published it —
    unblocking this ticket.
  • Bumps traverse-registry to 0.15.0 (existing public function signature
    changed shape).

Closes #145.

Governing Spec

  • 015-runtime-usage-telemetry-resolve-hook
  • 010-crate-publish-pipeline

Project Item

Registry Project — issue #145

Definition of Done

  • crates/traverse-registry's public resolution API accepts an optional UsageTelemetrySink parameter; omitting it produces byte-identical behavior to today.
  • A successful resolution with a sink supplied invokes it exactly once with the correct namespace/id@version and nothing else.
  • A failed/ambiguous resolution never invokes the sink.
  • No new dependency beyond the version-bumped traverse-contracts (cargo tree -p traverse-registry shows no new crate).
  • New patch/minor version of traverse-registry published per this repo's crate-publish pipeline (spec 010).

Validation

  • cargo test -p traverse-registry --locked (184 lib + 94 application_manifest + 10 connector_activation + 130 other integration tests, all passing — including new SC-001/SC-002/SC-003 unit tests)
  • cargo clippy -p traverse-registry --all-targets --locked -- -D warnings
  • cargo tree -p traverse-registry reviewed manually — dependency set unchanged beyond traverse-contracts 0.8.1 → 0.9.1
  • python3 scripts/ci/capability_validation.py

Test plan

  • CI green
  • Tag v0.15.0 and push to trigger publish-crate.yml after merge, per spec 010

Instruments resolve_version_range's public resolution path to accept an
optional ResolveTelemetry (a UsageTelemetrySink from traverse-contracts
plus a caller-supplied timestamp, keeping this crate free of any wall-clock
or network dependency). On a successful resolution the sink is invoked
exactly once with a resolve event carrying id@version; failed/ambiguous
resolutions never invoke it, and omitting the parameter is byte-for-byte
identical to prior behavior.

Bumps the traverse-contracts pin to 0.9.1 (already permitted by the
existing >=0.8.1, <0.10.0 range) to pick up the UsageTelemetrySink trait
now that traverse-framework/traverse#927 has shipped it. No new dependency
(cargo tree unchanged beyond the version bump). Bumps traverse-registry to
0.15.0.

Closes #145.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@enricopiovesan
enricopiovesan enabled auto-merge (squash) August 18, 2026 04:49
@enricopiovesan
enricopiovesan merged commit df83727 into main Aug 18, 2026
9 checks passed
@enricopiovesan
enricopiovesan deleted the claude/issue-145-resolve-usage-telemetry branch August 18, 2026 04:50
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.

crates/traverse-registry: emit resolve usage-telemetry event (Spec 015)

1 participant