Skip to content

Scope source map uploads and flush fatal Node errors - #672

Merged
cursor[bot] merged 2 commits into
developfrom
cursor/source-map-and-crash-flush-f4fb
Sep 25, 2026
Merged

cursor[bot] merged 2 commits into
developfrom
cursor/source-map-and-crash-flush-f4fb

Conversation

@unjica

@unjica unjica commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Verified four research findings against the repo. SEO page is not in this PR.

  1. Source map uploads used the ingest API key. Confirmed. A browser key could replace maps or fill the plan quota. New keys are ingest-only unless Allow source map uploads is checked. Existing keys stay upload-capable so current CI keeps working; rotate any key embedded in a client.
  2. Bundle URL assumed <file>.map → <file>. Confirmed for Next.js 16 Turbopack (foo.abc123.js references bar.def456.js.map). The Vite plugin and GitHub Action now follow sourceMappingURL, with the old strip as fallback.
  3. Free plan stores 25 maps per project and has no delete API. Confirmed, not changed here. One Next.js production build often has more than 25 chunks, and retention (14 days, and longer while that release still has errors) does not free slots between deploys. Smallest product change before touching plan limits: delete maps for an old release from Settings, so a new build can reuse the 25 slots.
  4. Node uncaughtException rethrew before ingest finished. Confirmed. The handler now waits up to 2s for the error request, then exits 1. It does not keep running after a fatal error.

How to test

  • pnpm --filter api exec vitest run src/lib/source-map-upload-auth.test.ts
  • pnpm --filter @telemetry-tracker/vite-plugin test
  • pnpm --filter @telemetry-tracker/node test
  • pnpm --filter @telemetry-tracker/core test

Checklist

  • Tests pass for the touched packages
  • CHANGELOG updated under [Unreleased]
  • Migration 20260925130000_api_key_source_map_upload (existing keys set to upload-capable)
  • Apply the migration before relying on the new column in production
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 25, 2026 12:57
Reject ingest-only API keys for source map upload, resolve bundle URLs from sourceMappingURL, and flush Node uncaughtException reports before exit.

Co-authored-by: Sanja Malovic <[email protected]>
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.

2 participants