Skip to content
This repository was archived by the owner on Oct 23, 2026. It is now read-only.

fix(resolution): prevent duplicate org in trace ID resolution - #1289

Merged
BYK merged 1 commit into
mainfrom
seer/fix/cli-1ef-resolution-error
Jul 24, 2026
Merged

BYK merged 1 commit into
mainfrom
seer/fix/cli-1ef-resolution-error

Conversation

@sentry

@sentry sentry Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

The looksLikeSlug function in src/lib/hex-id-recovery.ts was incorrectly returning true for full target paths (e.g., org/project/id) because it only checked for alphanumeric characters and dashes, not the presence of slashes.

This caused buildSlugHint to prepend the organization slug to an input that already contained it, resulting in an invalid trace ID with a duplicated organization segment (e.g., org/org/project/id). This malformed ID then led to a ResolutionError.

This fix adds an early return to looksLikeSlug if the input string contains a / character. This ensures that full paths are correctly identified as not being bare slugs, preventing the erroneous prepending of the organization slug and resolving the ResolutionError.

Fixes CLI-1EF

Comment @sentry <feedback> on this PR to have Autofix iterate on the changes.

@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1289/

Built to branch gh-pages at 2026-07-24 10:42 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

❌ Patch coverage is 50.00%. Project has 5493 uncovered lines.
✅ Project coverage is 81.71%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/lib/hex-id-recovery.ts 50.00% ⚠️ 1 Missing and 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    81.71%    81.71%        —%
==========================================
  Files          427       427         —
  Lines        30036     30038        +2
  Branches     19526     19528        +2
==========================================
+ Hits         24544     24545        +1
- Misses        5492      5493        +1
- Partials      2049      2050        +1

Generated by Codecov Action

@BYK
BYK merged commit 3ddfb22 into main Jul 24, 2026
31 checks passed
@BYK
BYK deleted the seer/fix/cli-1ef-resolution-error branch July 24, 2026 22:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant