Skip to content

Comments

fix(telemetry): fix commands importing buildCommand directly from @stricli/core#275

Merged
BYK merged 1 commit intomainfrom
fix/buildcommand-telemetry-imports
Feb 23, 2026
Merged

fix(telemetry): fix commands importing buildCommand directly from @stricli/core#275
BYK merged 1 commit intomainfrom
fix/buildcommand-telemetry-imports

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 23, 2026

Summary

trace/list, trace/view, log/view, and api.ts were importing buildCommand directly from @stricli/core, silently bypassing the telemetry wrapper in src/lib/command.ts that captures flag and arg context as Sentry tags.

Changes

  • Switch all four commands to import from ../../lib/command.js (or ../lib/command.js)
  • Add a prominent JSDoc comment in command.ts documenting the requirement and the exception for help.ts

Not changed

help.ts is intentionally left on @stricli/core — it also imports run from there, and the help command has no meaningful flags to capture for telemetry.

Notes

A Biome noRestrictedImports lint rule to enforce this statically was investigated but the rule is not available in the version of Biome used here. The JSDoc comment in command.ts serves as the documented convention instead.

…ricli/core

trace/list, trace/view, log/view, and api.ts were importing buildCommand
directly from @stricli/core, bypassing the telemetry wrapper in lib/command.ts
that captures flag and arg context for Sentry. Switch all four to the local
wrapper. Adds a prominent comment in command.ts documenting this requirement.

help.ts is intentionally left on @stricli/core since it also needs `run`
and has no meaningful flags to capture.
@github-actions
Copy link
Contributor

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • (help) Document target patterns and trailing-slash significance by BYK in #272
  • (npm) Add Node.js >= 22 version guard to npm bundle by BYK in #269
  • (telemetry) Fix commands importing buildCommand directly from @stricli/core by BYK in #275

Internal Changes 🔧

  • (org) Use shared list-command constants in org list by BYK in #273

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 3585 uncovered lines.
✅ Project coverage is 74.61%. Comparing base (base) to head (head).

Files with missing lines (69)
File Patch % Lines
human.ts 58.39% ⚠️ 394 Missing
resolve-target.ts 37.26% ⚠️ 325 Missing
api-client.ts 70.96% ⚠️ 237 Missing
oauth.ts 30.94% ⚠️ 183 Missing
list.ts 30.18% ⚠️ 155 Missing
plan.ts 19.37% ⚠️ 154 Missing
list.ts 72.48% ⚠️ 120 Missing
resolver.ts 3.23% ⚠️ 120 Missing
help.ts 19.85% ⚠️ 109 Missing
upgrade.ts 61.37% ⚠️ 107 Missing
view.ts 41.90% ⚠️ 104 Missing
interactive-login.ts 9.17% ⚠️ 99 Missing
errors.ts 5.94% ⚠️ 95 Missing
view.ts 25.81% ⚠️ 92 Missing
view.ts 41.50% ⚠️ 86 Missing
clipboard.ts 4.49% ⚠️ 85 Missing
status.ts 24.07% ⚠️ 82 Missing
migration.ts 47.44% ⚠️ 82 Missing
list.ts 21.88% ⚠️ 75 Missing
browser.ts 4.11% ⚠️ 70 Missing
list.ts 86.12% ⚠️ 59 Missing
span-tree.ts 5.00% ⚠️ 57 Missing
explain.ts 33.33% ⚠️ 56 Missing
api.ts 89.80% ⚠️ 47 Missing
upgrade.ts 66.91% ⚠️ 46 Missing
seer.ts 75.54% ⚠️ 45 Missing
schema.ts 91.51% ⚠️ 40 Missing
refresh.ts 40.63% ⚠️ 38 Missing
seer.ts 79.87% ⚠️ 30 Missing
preload.ts 53.23% ⚠️ 29 Missing
view.ts 87.39% ⚠️ 28 Missing
telemetry.ts 93.01% ⚠️ 27 Missing
utils.ts 88.94% ⚠️ 25 Missing
view.ts 61.54% ⚠️ 25 Missing
fix.ts 89.43% ⚠️ 24 Missing
org-list.ts 93.60% ⚠️ 22 Missing
detector.ts 90.10% ⚠️ 20 Missing
arg-parsing.ts 90.67% ⚠️ 18 Missing
binary.ts 88.67% ⚠️ 17 Missing
help.ts 57.14% ⚠️ 15 Missing
sentry-client.ts 92.17% ⚠️ 13 Missing
dsn-cache.ts 94.62% ⚠️ 12 Missing
code-scanner.ts 96.25% ⚠️ 12 Missing
logout.ts 56.00% ⚠️ 11 Missing
token.ts 52.17% ⚠️ 11 Missing
qrcode.ts 33.33% ⚠️ 10 Missing
fs-utils.ts 57.14% ⚠️ 9 Missing
view.ts 94.89% ⚠️ 7 Missing
project-root.ts 97.73% ⚠️ 7 Missing
version-check.ts 92.47% ⚠️ 7 Missing
feedback.ts 84.21% ⚠️ 6 Missing
auth.ts 95.56% ⚠️ 6 Missing
shell.ts 96.23% ⚠️ 6 Missing
app.ts 94.05% ⚠️ 5 Missing
setup.ts 97.84% ⚠️ 4 Missing
project-aliases.ts 97.40% ⚠️ 2 Missing
project-root-cache.ts 96.92% ⚠️ 2 Missing
output.ts 89.47% ⚠️ 2 Missing
login.ts 98.72% ⚠️ 1 Missing
list.ts 99.03% ⚠️ 1 Missing
alias.ts 99.42% ⚠️ 1 Missing
completions.ts 99.37% ⚠️ 1 Missing
index.ts 98.99% ⚠️ 1 Missing
env-file.ts 99.19% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
colors.ts 98.21% ⚠️ 1 Missing
trace.ts 99.16% ⚠️ 1 Missing
region.ts 97.30% ⚠️ 1 Missing
helpers.ts 94.74% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    74.61%    74.61%        —%
==========================================
  Files          115       115         —
  Lines        14120     14120         —
  Branches         0         0         —
==========================================
+ Hits         10535     10535         —
- Misses        3585      3585         —
- Partials         0         0         —

Generated by Codecov Action

@BYK BYK marked this pull request as ready for review February 23, 2026 12:45
@BYK BYK merged commit 0a8e649 into main Feb 23, 2026
23 checks passed
@BYK BYK deleted the fix/buildcommand-telemetry-imports branch February 23, 2026 12:49
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.

1 participant