Repository navigation
Release v1.3.0: Source maps v1 - #126
Conversation
Sync develop with main after v1.2.0
Add docs/source-maps.md phased plan, migration for release on ErrorGroup/Occurrence, ingest + dashboard display — foundation for upload and symbolication. Co-authored-by: Cursor <[email protected]>
Source maps v1 (phase 1): release on errors + design doc
Introduce schema and migration for per-release map JSON, lookup helpers, and nightly retention aligned with plan retentionDays. Co-authored-by: Cursor <[email protected]>
Delete SourceMapArtifact only when uploaded_at is past the plan cutoff and no ErrorGroup for the same app/release still has last_seen in window. Co-authored-by: Cursor <[email protected]>
GitHub cannot skip approvals for the PR author only; use maintainer-review status check on develop like main, document settings, and require /review-bugbot before opening PRs. Co-authored-by: Cursor <[email protected]>
…-review-gate develop: maintainer-review gate + 0 human approvals
…ase2 Source maps v1 (phase 2): SourceMapArtifact storage + retention
Expose POST/GET /api/project/source-maps for JSON map upload keyed by app, release, and bundle URL so CI can register maps before symbolication lands in phase 4. Co-authored-by: Cursor <[email protected]>
Raise per-route Fastify bodyLimit for POST /project/source-maps above the 10 MB map cap and trim app/release in Zod so whitespace-only keys are rejected before upsert. Co-authored-by: Cursor <[email protected]>
Share trim helpers between source map storage and POST /ingest/error so padded SDK labels match uploaded artifacts for retention and symbolication lookups. Co-authored-by: Cursor <[email protected]>
Use assertIngestAppAllowed and normalizeMapAppLabel for /ingest/batch so padded app fields match restricted API keys the same way as single-event and error ingest. Co-authored-by: Cursor <[email protected]>
Parse V8 and Firefox stack frames, resolve positions with uploaded source maps, and expose symbolicated_stack fields on GET /api/errors/:id for display-only de-minification. Co-authored-by: Cursor <[email protected]>
Derive symbolicated_top_stack from the first resolvable frame in occurrence stacks instead of top_stack (error message line), and dedupe concurrent listSourceMapArtifactsForRelease calls per release. Co-authored-by: Cursor <[email protected]>
Store trimmed app values on /ingest/event and /ingest/session (including session lookup) so padded SDK labels match error, batch, and source-map keys. Co-authored-by: Cursor <[email protected]>
…ase4 Source maps phase 4: stack symbolication
Reject whitespace-only app labels in ingest Zod schemas, normalize app/release on artifact lookup, and use create-then-update on P2002 so concurrent uploads return accurate 201/200 status. Co-authored-by: Cursor <[email protected]>
Require exact same-origin pathnames for full URLs, normalize ErrorGroup app/release when loading maps for legacy rows, and add regression tests. Co-authored-by: Cursor <[email protected]>
Compute the group top frame from occurrences_list[0] before parallel per-occurrence enrichment so older stacks cannot win under Promise.all and the newest occurrence without maps leaves symbolicated_top_stack unset. Co-authored-by: Cursor <[email protected]>
Lazy-load source map content by matching stack frames with caps on bundle refs and content fetches. Reject whitespace-only ingest apps via Zod trim, and match legacy padded session app labels on close/idempotency. Co-authored-by: Cursor <[email protected]>
Singleflight source map content fetches and enrich occurrences sequentially so MAX_SOURCE_MAP_CONTENT_LOADS_PER_DETAIL cannot be exceeded under Promise.all. Count distinct ingest apps with TRIM(app) so legacy padded labels match trimmed ingest keys. Co-authored-by: Cursor <[email protected]>
…ase3 Source maps phase 3: upload and list API
Add raw/symbolicated stack toggle on error detail, Settings source maps listing page, per-plan artifact caps on upload, and README/docs updates for v1.3.0. Co-authored-by: Cursor <[email protected]>
Route List maps through listProjectSourceMapsAction and dashboardApiFetch so session Authorization and X-Project-Id reach the Fastify API instead of a non-existent Next.js /api/project/source-maps path. Co-authored-by: Cursor <[email protected]>
Enforce artifact caps inside a serializable upsert transaction so parallel uploads cannot exceed plan limits, and expose symbolication_status so the dashboard distinguishes missing maps from bundle URL mismatches. Co-authored-by: Cursor <[email protected]>
…ase5-6 Source maps phases 5–6: dashboard UI and plan quotas
Consolidate source maps milestone entries and document required migrations for the develop to main promotion. Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7ef7cf6. Configure here.
| AND eg.app = sma.app | ||
| AND eg.release = sma.release | ||
| AND eg.last_seen >= ${cutoff} | ||
| ) |
There was a problem hiding this comment.
Retention drops multi-release maps
Medium Severity
The source map retention guard only checks in-window ErrorGroup rows for a matching release, but symbolication keys maps from each occurrence’s release (falling back to the group). After the group’s release advances, older maps can be deleted while recent occurrences still reference those releases, so error detail loses symbolicated stacks until maps are re-uploaded.
Reviewed by Cursor Bugbot for commit 7ef7cf6. Configure here.
| WHERE eg.project_id = sma.project_id | ||
| AND eg.app = sma.app | ||
| AND eg.release = sma.release | ||
| AND eg.last_seen >= ${cutoff} |
There was a problem hiding this comment.
Retention ignores trimmed app labels
Low Severity
Source map retention matches ErrorGroup.app to SourceMapArtifact.app with exact equality, while new ingest and uploads store trimmed app labels. Legacy error groups with padded app values will not protect uploaded maps, so retention can delete maps for releases that still have in-window errors.
Reviewed by Cursor Bugbot for commit 7ef7cf6. Configure here.


Summary
Promotes v1.3.0 to production: source maps upload, server-side symbolication, dashboard UI, and per-plan artifact quotas.
Highlights
20260703120000_error_release,20260703130000_source_map_artifactsUpgrade (production)
After deploy, run:
pnpm --filter api exec prisma migrate deployTest plan
develop(source maps phases 1–6 merged via Source maps v1 (phase 1): release on errors + design doc #119–Source maps phases 5–6: dashboard UI and plan quotas #125)v1.3.0and GitHub releaseCloses #98
Made with Cursor