Skip to content

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

Description

@enricopiovesan

Summary

Instrument crates/traverse-registry's resolution path to accept an optional UsageTelemetrySink (from traverse-contracts) and invoke it with a resolve event on successful version resolution, per Spec 015 (specs/015-runtime-usage-telemetry-resolve-hook).

Why

Spec 015 authorizes this as the one real behavior change decision 47 (docs/decision-log.md entry 47) requires of this extracted crate. Without it, traverse-framework/traverse's Spec 088 has no real resolve counter — only the execute counter (implemented entirely in that repo's traverse-cli) would ever fire.

Depends on

Blocked by

  • traverse-framework/traverse#927 must ship and publish a new traverse-contracts version before this crate can bump its pinned dependency (Cargo.toml's workspace.dependencies.traverse-contracts) and implement against the real trait.

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

  • Unit tests for SC-001 through SC-004 in Spec 015.
  • cargo test -p traverse-registry passes.
  • cargo tree -p traverse-registry reviewed manually to confirm no new dependency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedWork is blocked and the issue body must say why

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions