Skip to content

feat(web): source-mapped stack trace on the error issue page - #3022

Merged
Makisuo merged 22 commits into
sourcemaps/cli-sdkfrom
sourcemaps/ui
Nov 24, 2026
Merged

Makisuo merged 22 commits into
sourcemaps/cli-sdkfrom
sourcemaps/ui

Conversation

@Makisuo

@Makisuo Makisuo commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Third of three stacked PRs for JavaScript source maps: #3020 (backend and API), then #3021 (CLI and browser SDK), then this one.

What changed

  • New kit component stackFrameList (packages/views/src/ui/stack-frames.ts).
    • Each row shows the function, the original file and line:column, and library frames are muted.
    • A run of two or more library frames folds into "N library frames", which expands.
    • The top in-app frame opens on its code (numbered lines, the error line tinted), and other in-app frames open on click.
    • Code context is syntax-highlighted with Pierre (@pierre/highlights via @maple/views/lib/highlight), using the language of the frame's file and the shared --sh-* theme in both light and dark.
    • Toggles are real buttons with aria-expanded.
  • Issue page "What broke":
    • resolved / partial: a "Stack trace" bar with a "Source mapped" badge (or "Partly source mapped", whose tooltip lists the files with no map) and a "Raw" toggle back to the minified text.
    • Raised at: shows the top in-app frame's mapped location, only when that frame itself mapped; otherwise it keeps the reported frame.
    • Stack changes: rows the reader expanded or collapsed, and the Raw toggle, reset when a different stack loads.
    • missing_map: keeps the raw view, with a quiet hint naming the file with no map and maple sourcemaps upload.
    • not_applicable / no stack: unchanged.
  • Shared raw text block: disclosure-strip.ts gives the raw text block as monospaceBlock, used by both the disclosure and the Raw view.
  • Lab: /lab/error-issue?stack=raw|resolved|partial|missing_map.

Screenshots

With Pierre highlighting (lab, light and dark):

highlighted light

highlighted dark

partial

library frames open, dark

Earlier screenshots below are from the real local end-to-end run, before highlighting landed.

Before (today, every stack is raw text):

before

After, a real issue on a local stack. A minified Vite app ran in Chrome, and its maps were uploaded with maple sourcemaps upload:

issue page, dark

mapped stack, light

Raw toggle:

raw toggle

After the map was deleted (real stack, next request):

missing map

Lab states, partly mapped and library frames expanded:

partial

library frames open

Verification

  • stack-trace.scene.test.ts also covers "Raised at" keeping the reported frame when the top app frame didn't map, and a different stack resetting flipped rows. It covers library frames expanding, a second app frame expanding, the Raw toggle both ways, the missing-map hint, and the null stack keeping today's view. All 58 tests under src/page/errors/issue/ pass, and so do the lab registry tests.
  • bun typecheck (all 60 tasks), bun run lint (core + foldkit), oxfmt --check, ui:patterns:check and ui:index are clean on the full stack.
  • Follow-up: the hint has no docs link yet; docs.test.ts rejects links to pages that don't exist, so a source maps docs page is a follow-up.

🤖 Generated with Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Devin Review

Makisuo and others added 2 commits November 24, 2026 12:03
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 083dea4a-b4e6-46ff-8e11-2f98b8977af6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

… unmapped files in the page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maple-review-bot

This comment has been minimized.

@maple-review-bot maple-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 inline note from Maple's review. The score and summary are in the review comment above.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@Makisuo

Makisuo commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Maple review note (a re-symbolicated stack with the same text keeps stale rows): fixed in a6d2c73. The rows now reset when the mapped stack changes as well as the raw text, for example after a map is uploaded between loads. The scene test "a different stack arriving resets the rows the reader flipped" covers it.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@Makisuo

Makisuo commented Nov 24, 2026

Copy link
Copy Markdown
Member Author

Maple review note F3 (a long frame function name is clipped): fixed in 19a9787. The function name now wraps (min-w-0 break-all) like the file path next to it, so the panel's overflow-hidden no longer cuts it off.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

@maple-review-bot

This comment has been minimized.

…s own maps on deploy (#3028)

* feat(alchemy): Vite source map plugin, Maple.SourceMaps resource, web uploads its maps

- @maple/sourcemaps: the inject core moved out of the CLI (debug ids, prepend with the map shift,
  x_maple_shifted, safe paths, failed-write convergence), Bun-free, plus relocating maps out of a
  build with a manifest. The CLI re-exports it unchanged.
- @maple-dev/alchemy/vite: mapleSourceMaps() turns on hidden maps, injects debug ids into the client
  output and moves the maps to .maple/sourcemaps/<outDir> with maple-sourcemaps.json.
- Maple.SourceMaps uploads a map directory through POST /v2/source_maps (debug id, else service +
  release), re-uploading only when a digest of the maps changes; delete keeps the maps.
- web builds with the plugin and the prd deploy uploads its maps as maple-web at VITE_COMMIT_SHA,
  through the new prd-only MAPLE_SOURCEMAPS_API_KEY (a no-op without it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(alchemy): safe map relocation, multi-output builds, release-matched uploads

- A maps dir that is, holds or sits inside a build output is refused before any file is touched,
  and only the files the previous manifest listed are removed, never the whole dir.
- The Vite plugin collects every output a build writes and relocates them once in closeBundle,
  under one manifest.
- Maple.SourceMaps takes `matchBy: "release"`: uploads without debug ids (query and map body), so
  each release keeps its own map; web's dogfood uses it, as its telemetry sends no debug ids.
- A deploy whose build was skipped logs that no maps were found; the README and plugin docs cover
  the first-upload timing and the one-release cached-chunk transition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@Makisuo
Makisuo merged commit 8e3e728 into sourcemaps/cli-sdk Nov 24, 2026
5 checks passed
@Makisuo
Makisuo deleted the sourcemaps/ui branch November 24, 2026 14:46
Makisuo added a commit that referenced this pull request Nov 24, 2026
… ids (#3021)

* feat(cli,browser): maple sourcemaps inject/upload and exception debug ids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): debug ids over JS and map, register before app code, safe map paths

- The debug id hashes the JS file and its map (without its own debug id fields), so identical JS
  with another map gets another id; ids from existing comments or registrations are kept.
- The registration snippet goes on a new first line and the map's mappings shift one line, so a
  throw during evaluation still reports the id; shebangs, directive prologues, index maps and
  shared maps keep the append.
- A map shared by several JS files never gets an id; it is uploaded once per file with that
  file's id and path.
- `upload` reads the release from the build directory's git checkout and fails when every map
  was skipped.
- A map outside the build directory (.., absolute or symlink) or one that is not a version 3 JSON
  object is skipped with a warning and never rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): skip source maps over 10 MiB, the server's new upload cap

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): skip index source maps at upload, which the server now refuses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(browser): count registered debug ids before building entries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): read a file's directive prologue without a backtracking pattern

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): write the map before the JS, move it once, take the size cap from the domain

- inject writes the map atomically (temp file + rename) before the JS, and marks a map it moved
  (`x_maple_shifted`), so a failed write converges on the next run and never moves it twice; a
  registered file whose map lacks its id is repaired.
- The upload size cap is `SOURCE_MAP_MAX_BYTES` from the domain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(cli): use effect String helpers in the inject failure test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(cli): run command-level tests in the CLI test task

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): source-mapped stack trace on the error issue page (#3022)

* feat(web): source-mapped stack trace on the error issue page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): use Arr.findFirst for the mapped top frame

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): say a file did not map rather than that no map exists, list unmapped files in the page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): highlight stack frame code with Pierre; Raised at only from a mapped top frame; reset rows on a new stack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): reset stack rows when the same stack comes back mapped differently

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(views): let a long frame function name wrap instead of clipping

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(alchemy): Vite plugin and Maple.SourceMaps resource, upload web's own maps on deploy (#3028)

* feat(alchemy): Vite source map plugin, Maple.SourceMaps resource, web uploads its maps

- @maple/sourcemaps: the inject core moved out of the CLI (debug ids, prepend with the map shift,
  x_maple_shifted, safe paths, failed-write convergence), Bun-free, plus relocating maps out of a
  build with a manifest. The CLI re-exports it unchanged.
- @maple-dev/alchemy/vite: mapleSourceMaps() turns on hidden maps, injects debug ids into the client
  output and moves the maps to .maple/sourcemaps/<outDir> with maple-sourcemaps.json.
- Maple.SourceMaps uploads a map directory through POST /v2/source_maps (debug id, else service +
  release), re-uploading only when a digest of the maps changes; delete keeps the maps.
- web builds with the plugin and the prd deploy uploads its maps as maple-web at VITE_COMMIT_SHA,
  through the new prd-only MAPLE_SOURCEMAPS_API_KEY (a no-op without it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(alchemy): safe map relocation, multi-output builds, release-matched uploads

- A maps dir that is, holds or sits inside a build output is refused before any file is touched,
  and only the files the previous manifest listed are removed, never the whole dir.
- The Vite plugin collects every output a build writes and relocates them once in closeBundle,
  under one manifest.
- Maple.SourceMaps takes `matchBy: "release"`: uploads without debug ids (query and map body), so
  each release keeps its own map; web's dogfood uses it, as its telemetry sends no debug ids.
- A deploy whose build was skipped logs that no maps were found; the README and plugin docs cover
  the first-upload timing and the one-release cached-chunk transition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Makisuo added a commit that referenced this pull request Nov 24, 2026
…, mapped issue stacks, grouping on mapped frames, Alchemy upload (#3020)

* feat(errors): JavaScript source maps: upload API, symbolicated issue stacks, grouping on mapped frames

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(browser): stamp the OTLP goldens with the current SDK version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sourcemaps): keep debug-id builds apart, safer grouping keys, validated uploads, race-free retention

- A debug-id upload replaces only its debug id; the release-path unique index now covers id-less
  maps only (new migration). Release fallback prefers the id-less map, else the newest.
- An unnamed mapped frame keys on its file plus its source line text; with neither, the raw key.
- Whether the org has maps joins the key digest, so a first upload re-keys once; samples with
  debug ids wait for their map before the org has any.
- Uploads need a non-empty sources array (or a valid index map, now parsed flat).
- Retention claims rows atomically against last use, then deletes objects.
- Only maps that resolved a frame are marked used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(errors): a failed has-maps lookup re-keys nothing

When whether the org has source maps cannot be read, the tick treats it as unknown: a stored key
under either maps bit stays current, and never-keyed hashes key on the rules digest as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sourcemaps): review round: pending maps keep stored keys, path-filtered release lookup, 10 MiB cap

- A stored key whose map is pending keeps its key, as one whose lookup failed does; a resolved
  dependency frame no longer ends the app map's grace.
- Release candidates are filtered to the frame URLs' path suffixes in SQL before the limit;
  stored paths match literally (an encoded `#` in a file name).
- Uploads are capped at 10 MiB, the size symbolication loads; one stack loads at most 64 MiB of
  parsed maps by estimate; the per-isolate touch history is bounded.
- Retention allows the one-day touch throttle on top of 90 days.
- Frames: a short sourcesContent keeps the position, locationless frames are out of app, a zero
  line stays raw, the map's ignoreList marks frames out of app, and `function_from_map` records
  whether a name came from the map (grouping uses it instead of comparing names).
- Why-grouped shows mapped frames only when they produced the stored key.
- Release key bytes are bounded to fit the index entry; v2 docs state the slash boundary,
  the debug-id replacement rule and the 10 MiB limit.
- Tests: the URL miss cache is exercised past the org cache; concurrency tests wait on signals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ios): regenerate the OpenAPI spec for function_from_map

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sourcemaps): refuse index maps, id-less release maps first, fair key ordering past the cap

- Uploads with any `sections` field get a 400 ("Index source maps are not supported; emit a
  regular map"); symbolication parses plain maps only (no FlattenMap).
- The release fallback reads a path's id-less maps apart from its debug-id builds, so thousands
  of builds cannot push the id-less map out of the limit.
- Past the per-tick cap: hashes held past their grace window go first, then first sightings, then
  held hashes in an order that rotates each minute, so a ready hash is not stuck behind a held
  prefix (mapless orgs included).
- Source-line keys collapse formatting whitespace but keep it inside string literals.
- Frame rules classify a mapped frame by its generated frame as well as its mapped location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sourcemaps): linear stack parsing, throw-site grace, safer re-keys, nullable trace ids

- The JS stack parser splits lines by index instead of backtracking patterns and skips lines over
  2,000 chars (CodeQL polynomial regex alerts); Promise combinator frames are kept as naming
  boundaries.
- An unmapped throw site waits for its map even when a caller mapped, and never keys on its
  callers alone; a stored key is kept when the mapped stack gives no identity to key on.
- Past the per-tick cap, expired holds take at most half the slots, rotated, so hashes that never
  find a span cannot block new ones.
- Source-line keys trim only the ends; inner whitespace is part of the code.
- A matched map whose object is gone counts as a failed read; a URL with a recorded debug id is
  looked up whatever its extension; ignore lists must be arrays of source indexes.
- The latest-stack query returns trace and span ids as plain strings; an empty one skips the
  span read. Documented: a map uploaded after the grace window does not re-key a stored raw key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(sourcemaps): one map lookup per URL per errors tick, keep an oversized map cached alone

- The tick's samples share a lookup memo: a frame URL's match is read once per tick, not per
  sample. It lives only for the batch, and a map that cannot be read is dropped from it, so a
  replaced map is looked up afresh.
- A map whose parse estimate exceeds the cache budget is kept as the only cached entry, so it
  parses once per isolate instead of once per stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sourcemaps): rules changes re-key raw keys, frame rules pick the throw site, nested evals

- The keep-the-stored-key vetoes only protect a stored source-mapped key; a raw key re-keys on a
  rules change, and waits on a pending or failed lookup only when the rules are unchanged.
- Org frame rules (on the generated frame) decide the throw site and the map wait, before the
  path heuristic.
- A first-map wait needs a debug id recorded for one of the stack's own app frames.
- symbolicateStack counts a debug-id `blob:` frame as one a map could resolve.
- Nested V8 eval origins read their innermost location; hostile-line fixtures stay under the cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(sourcemaps): header lines with `@` are not frames, stale keys keep a share, budget counts taken maps

- `fn@location` is not read when the text before `@` holds `: ` (a message header).
- Past the per-tick cap, stale keys get up to a quarter of the slots and first sightings rotate,
  so a storm of new hashes does not stall re-keying after a rules change or a first upload.
- The per-stack map budget sums only the maps taken, so one left out does not crowd out a later
  small one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(api): show a too-large source map's size in the 413

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(db): regenerate the source maps migration after main's newest

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(errors): name the source-mapped type + first function rule apart from mapped frames

"Why grouped" said "Same source-mapped frames" for a message-less error keyed on its type and first
mapped function. That branch now reports `source-mapped-function` ("Same type, first source-mapped
function"). The rule is part of the hashed key input, so it still hashes as `source-mapped`: no
stored key changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(cli,browser): maple sourcemaps inject/upload and exception debug ids (#3021)

* feat(cli,browser): maple sourcemaps inject/upload and exception debug ids

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): debug ids over JS and map, register before app code, safe map paths

- The debug id hashes the JS file and its map (without its own debug id fields), so identical JS
  with another map gets another id; ids from existing comments or registrations are kept.
- The registration snippet goes on a new first line and the map's mappings shift one line, so a
  throw during evaluation still reports the id; shebangs, directive prologues, index maps and
  shared maps keep the append.
- A map shared by several JS files never gets an id; it is uploaded once per file with that
  file's id and path.
- `upload` reads the release from the build directory's git checkout and fails when every map
  was skipped.
- A map outside the build directory (.., absolute or symlink) or one that is not a version 3 JSON
  object is skipped with a warning and never rewritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): skip source maps over 10 MiB, the server's new upload cap

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): skip index source maps at upload, which the server now refuses

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(browser): count registered debug ids before building entries

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): read a file's directive prologue without a backtracking pattern

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): write the map before the JS, move it once, take the size cap from the domain

- inject writes the map atomically (temp file + rename) before the JS, and marks a map it moved
  (`x_maple_shifted`), so a failed write converges on the next run and never moves it twice; a
  registered file whose map lacks its id is repaired.
- The upload size cap is `SOURCE_MAP_MAX_BYTES` from the domain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(cli): use effect String helpers in the inject failure test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(cli): run command-level tests in the CLI test task

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): source-mapped stack trace on the error issue page (#3022)

* feat(web): source-mapped stack trace on the error issue page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): use Arr.findFirst for the mapped top frame

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): say a file did not map rather than that no map exists, list unmapped files in the page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(web): highlight stack frame code with Pierre; Raised at only from a mapped top frame; reset rows on a new stack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(web): reset stack rows when the same stack comes back mapped differently

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(views): let a long frame function name wrap instead of clipping

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(alchemy): Vite plugin and Maple.SourceMaps resource, upload web's own maps on deploy (#3028)

* feat(alchemy): Vite source map plugin, Maple.SourceMaps resource, web uploads its maps

- @maple/sourcemaps: the inject core moved out of the CLI (debug ids, prepend with the map shift,
  x_maple_shifted, safe paths, failed-write convergence), Bun-free, plus relocating maps out of a
  build with a manifest. The CLI re-exports it unchanged.
- @maple-dev/alchemy/vite: mapleSourceMaps() turns on hidden maps, injects debug ids into the client
  output and moves the maps to .maple/sourcemaps/<outDir> with maple-sourcemaps.json.
- Maple.SourceMaps uploads a map directory through POST /v2/source_maps (debug id, else service +
  release), re-uploading only when a digest of the maps changes; delete keeps the maps.
- web builds with the plugin and the prd deploy uploads its maps as maple-web at VITE_COMMIT_SHA,
  through the new prd-only MAPLE_SOURCEMAPS_API_KEY (a no-op without it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(alchemy): safe map relocation, multi-output builds, release-matched uploads

- A maps dir that is, holds or sits inside a build output is refused before any file is touched,
  and only the files the previous manifest listed are removed, never the whole dir.
- The Vite plugin collects every output a build writes and relocates them once in closeBundle,
  under one manifest.
- Maple.SourceMaps takes `matchBy: "release"`: uploads without debug ids (query and map body), so
  each release keeps its own map; web's dogfood uses it, as its telemetry sends no debug ids.
- A deploy whose build was skipped logs that no maps were found; the README and plugin docs cover
  the first-upload timing and the one-release cached-chunk transition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@maple-review-bot

maple-review-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Maple review

🟢 Confidence 9/10 · safe to merge. The upload/inject paths are single-sourced, bounded and pinned by new unit and scene tests; only the .map relocation boundary deserves a second look.
no findings · tests covered · risk medium · 1/3 new units observable −1

Adds the source-map pipeline (shared @maple/sourcemaps inject/relocate, an alchemy Maple.SourceMaps resource plus Vite plugin, prd-only upload key) and the source-mapped stack trace on the error issue page. Path escapes, the size limit and the toggle state are all handled; nothing blocks merge.

  • injectDirectory/relocateMaps share the CLI and Vite build path and refuse maps escaping the output
  • Maple.SourceMaps uploads only when the digest changes and never retries a POST
  • stackFrameList folds library runs and opens the top in-app frame's code
  • withDetail resets flipped rows and the Raw toggle when the stack identity changes

Before merge

  • Secret · Create MAPLE_SOURCEMAPS_API_KEY in the Infisical prod environment (a source_maps:write key); keep it out of dev and preview. · packages/infra/src/secrets.ts:163
  • Infra · Check every environment has what this config now expects · alchemy.run.ts
  • Manual · Run bun run secrets:drift after adding the key to the catalog.

303dc1c · What was checked, coverage and telemetry details are on the Maple / review check. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@maple-review-bot

Copy link
Copy Markdown

Merged with 3 steps from "Before merge" still open. If they are done, tick them on the review comment; if not, now is the time.

  • Infra · Check every environment has what this config now expects
  • Manual · Run bun run secrets:drift after adding the key to the catalog.
  • Secret · Create MAPLE_SOURCEMAPS_API_KEY in the Infisical prod environment (a source_maps:write key); keep it out of dev and preview.

@maple-review-bot

Copy link
Copy Markdown

Maple: after this shipped

✅ Shipped clean. Nothing this change touches got worse in the hour after it deployed.

Deployed at 2026-11-24 15:20 UTC as 6cfae23, the first version after the merge (the merge commit itself never reported). Compared the 60 minutes before and after.

  • 9 operations compared, 0 regressed

Details are in Maple. A public repository's comment names no service, operation or error.

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