feat(registry): emit resolve usage-telemetry event (Spec 015) - #270
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
resolve_version_range(the caret-range/semver resolutionpath used by
registry syncand equivalent callers) to accept anoptional
ResolveTelemetry<'a>— aUsageTelemetrySink(fromtraverse-contracts) paired with a caller-suppliedresolved_attimestamp, so this crate never depends on a wall clock or gains new
dependencies (matches every other
registered_at-style field already inthis crate).
once with a
resolveevent carrying{capability_id}@{version}andnothing else. A failed or ambiguous resolution never invokes it. Omitting
the parameter (
None) is byte-for-byte identical to the pre-existingbehavior.
(
dependency_resolver.rs's own call intoresolve_version_range)untelemetered — spec 015 FR-006 explicitly restricts this spec to the
top-level resolution path, not a further behavior change.
traverse-contractsdependency resolution to0.9.1(already permitted by the existing
>=0.8.1, <0.10.0range inCargo.toml) to pick up theUsageTelemetrySinktrait, now thattraverse-framework/traverse#927 has shipped and published it —unblocking this ticket.
traverse-registryto0.15.0(existing public function signaturechanged shape).
Closes #145.
Governing Spec
015-runtime-usage-telemetry-resolve-hook010-crate-publish-pipelineProject Item
Registry Project — issue #145
Definition of Done
crates/traverse-registry's public resolution API accepts an optionalUsageTelemetrySinkparameter; omitting it produces byte-identical behavior to today.namespace/id@versionand nothing else.traverse-contracts(cargo tree -p traverse-registryshows no new crate).traverse-registrypublished 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 warningscargo tree -p traverse-registryreviewed manually — dependency set unchanged beyondtraverse-contracts0.8.1 → 0.9.1python3 scripts/ci/capability_validation.pyTest plan
v0.15.0and push to triggerpublish-crate.ymlafter merge, per spec 010