Skip to content

fix: detect issue short IDs passed to issue list (CLI-C3)#488

Merged
BYK merged 2 commits intomainfrom
fix/cli-c3-short-id-in-issue-list
Mar 20, 2026
Merged

fix: detect issue short IDs passed to issue list (CLI-C3)#488
BYK merged 2 commits intomainfrom
fix/cli-c3-short-id-in-issue-list

Conversation

@BYK
Copy link
Member

@BYK BYK commented Mar 20, 2026

Problem

When users run sentry issue list CONVERSATION-SVC-F or similar commands with an issue short ID, the CLI interprets it as a project slug to search for. Since project slugs are always lowercase and short IDs are uppercase, no project is found and the user sees:

ResolutionError: Project 'CONVERSATION-SVC-F' not found.

This affects 24 users (CLI-C3).

Fix

Added a pre-flight check in the project-search handler of issue list that uses the existing looksLikeIssueShortId() utility to detect when the input looks like an issue short ID (all-uppercase, dash-separated with alphanumeric suffix). When detected, throws a helpful ResolutionError that suggests using sentry issue view instead:

'CONVERSATION-SVC-F' looks like an issue short ID, not a project slug.

Try:
  sentry issue view CONVERSATION-SVC-F

Or:
  - To view this issue: sentry issue view CONVERSATION-SVC-F
  - To list issues in a project: sentry issue list <org>/<project>

Key Design Decisions

  • Uses the existing looksLikeIssueShortId() pattern which requires all-uppercase with dash separators — this avoids false positives on legitimate lowercase project slugs
  • Check runs before the API call to findProjectsBySlug, saving a round trip
  • Uses ResolutionError (not ContextError) because the user provided a value that couldn't be matched

When users pass an issue short ID like 'CONVERSATION-SVC-F' or 'CLI-BM'
to `sentry issue list`, the CLI interprets it as a project slug and fails
with 'Project not found'. Short IDs are all-uppercase with a dash-separated
suffix — a pattern that never occurs in project slugs (which are always
lowercase).

This adds a pre-flight check using the existing looksLikeIssueShortId()
helper to detect this pattern and throw a helpful ResolutionError that
suggests using `sentry issue view` instead.

Fixes CLI-C3 (24 users affected).
@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

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).


New Features ✨

  • (telemetry) Track TTY vs non-TTY invocations via metric by betegon in #482
  • Dynamic cache-backed shell completions with fuzzy matching by BYK in #465

Bug Fixes 🐛

  • (project) Fallback to org listing when bare slug matches an organization by betegon in #475
  • Detect issue short IDs passed to issue list (CLI-C3) by BYK in #488
  • Add Glob.match() polyfill + improve auto-detect diagnostics (CLI-7T) by BYK in #487
  • Add org-slug pre-check to dispatchOrgScopedList (CLI-9A) by BYK in #485

Internal Changes 🔧

  • (issue) Skip getProject round-trip in project-search resolution by betegon in #473
  • (resolve) Carry project data through resolution to eliminate redundant getProject calls by BYK in #486
  • Switch from @sentry/bun to @sentry/node-core/light (~170ms startup savings) by BYK in #474
  • Regenerate skill files by github-actions[bot] in b7b240ec

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

Codecov Results 📊

126 passed | Total: 126 | Pass Rate: 100% | Execution Time: 0ms

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

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

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    95.77%    95.77%        —%
==========================================
  Files          180       180         —
  Lines        24534     24536        +2
  Branches         0         0         —
==========================================
+ Hits         23497     23499        +2
- Misses        1037      1037         —
- Partials         0         0         —

Generated by Codecov Action

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Address Cursor Bugbot review: the first suggestion duplicated the
primary hint command. Kept only the genuinely different alternative.
@BYK BYK merged commit a26e3f4 into main Mar 20, 2026
22 checks passed
@BYK BYK deleted the fix/cli-c3-short-id-in-issue-list branch March 20, 2026 00:17
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