Skip to content

ci(release): inject Sentry debug IDs before packing the CLI - #211

Merged
ElbertePlinio merged 2 commits into
mainfrom
fix/140-sentry-debug-ids
Sep 27, 2026
Merged

ElbertePlinio merged 2 commits into
mainfrom
fix/140-sentry-debug-ids

Conversation

@ElbertePlinio

@ElbertePlinio ElbertePlinio commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Closes #140.

The 0.5.0 and 0.6.0 publish runs uploaded their sourcemaps to pickforge/picklab, but the published JavaScript has no debug IDs. The SDK reports frames with absolute install paths such as ~/.bun/install/global/node_modules/pickforge/dist/chunk-X.js, which the uploaded ~/chunk-X.js artifacts cannot be matched against, so fatal reports would not symbolicate.

The candidate pack step now runs sentry-cli sourcemaps inject on packages/cli/dist before npm pack and fails if any JS file lacks a //# debugId= line. The smoked tarball is still the published tarball, and the publish job still uploads it unmodified. @sentry/cli is pinned to 3.8.0 for both inject and upload. The optional local smoke in the checklist runs the same inject, and step 10 gains a one-command symbolication check against the published package. The release note is in UNRELEASED.md.

Validation, run locally on this branch:

  • bun run build, then the new step's script verbatim: all seven JS files and maps got debug IDs and the entry shebangs stayed first.
  • npm pack, global install into a temp prefix, pickforge-lab --version printed 0.6.0; the tarball carries 7 maps.
  • A local SDK probe (no network, beforeSend capture) on an injected chunk produced debug_meta.images with the chunk's debug ID, while the frame filename was the absolute install path.
  • The checklist command, run against published 0.6.0 without telemetry, exits 1 through the top-level catch that calls captureFatal (error: Invalid --interval "invalid"). An independent review caught that my first choice, takeover status, is swallowed by runReported and never reports.
  • bun run lint clean; PickCheck has no findings (no source changes).

Not verified: server-side symbolication of a real event. That needs the next release's upload plus the step 10 check, since the local Sentry token has upload scope only.

Installed frames carry machine-specific absolute paths, which the uploaded
~/-prefixed sourcemaps cannot match. Injecting debug IDs before npm pack lets
Sentry resolve them by ID. Pin @sentry/cli for inject and upload, keep the
local smoke in step, and add a symbolication check to the release checklist.

Refs #140
takeover status reports Session not found through runReported, so it never
reaches captureFatal. An invalid watchdog interval throws to the top level.

Refs #140
@ElbertePlinio
ElbertePlinio merged commit 6717f8b into main Sep 27, 2026
10 checks passed
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.

release: Sentry sourcemap upload runs with empty SENTRY_ORG and SENTRY_PROJECT

1 participant