Repository navigation
Fix telemetry for commands that don't require login - #607
Merged
Merged
Conversation
|
👋 ejacquier, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Credential attachment must not retain or recreate credentials across login and logout.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes telemetry for login-exempt commands by silently attaching available credentials without affecting unauthenticated usage.
Changes:
- Adds best-effort credential attachment.
- Integrates credential loading into command initialization.
- Adds credential-loading tests and a patch changeset.
| File | Summary |
|---|---|
internal/runtime/runtime_context.go |
Adds silent credential loading. |
internal/runtime/runtime_context_test.go |
Tests credential attachment scenarios. |
cmd/root.go |
Attaches credentials for excluded commands; critical handling issue remains for login and logout. |
.changeset/fix-offline-command-telemetry.md |
Documents the telemetry fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
tarcisiozf
force-pushed
the
fix-binding-tracking
branch
from
September 28, 2026 21:36
67ce9e2 to
89f1d45
Compare
timothyF95
approved these changes
Sep 29, 2026
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
Telemetry events for cre generate-bindings (and all other login-exempt commands) were built but silently dropped before being sent. These commands are in the isLoadCredentials exclusion list, so runtimeContext.Credentials is nil at emit time, and SendEvent bails out early with "skipping telemetry: no credentials" — the GraphQL API only accepts authenticated events.
Last recorded generate-bindings event: 2026-03-25. The break shipped in v1.18.0 (2026-06-04) via #455, which added cre generate-bindings evm / solana to the credential exclusion list. Before that, only the non-runnable parent path was excluded, so credentials loaded and events flowed.
Fix
Best-effort silent credential attach in PersistentPreRunE for commands excluded from isLoadCredentials: