Repository navigation
feat(web): source-mapped stack trace on the error issue page - #3022
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Nov 24, 2026 in 8m 32s
Confidence 9/10 · No issues found
🟢 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/relocateMapsshare the CLI and Vite build path and refuse maps escaping the outputMaple.SourceMapsuploads only when the digest changes and never retries a POSTstackFrameListfolds library runs and opens the top in-app frame's codewithDetailresets flipped rows and the Raw toggle when the stack identity changes
Before merge
- Secret · Create
MAPLE_SOURCEMAPS_API_KEYin the Infisicalprodenvironment (asource_maps:writekey); keep it out ofdevandpreview. ·packages/infra/src/secrets.ts:163 - Infra · Check every environment has what this config now expects ·
alchemy.run.ts - Manual · Run
bun run secrets:driftafter adding the key to the catalog.
Production impact
Production traffic of the changed files (last 7 days)
| File | Calls/day |
|---|---|
packages/alchemy-maple/src/MapleApi.ts |
4.6k |
packages/infra/src/secrets.ts |
4.3k |
apps/web/vite.config.ts |
178 |
packages/alchemy-maple/src/Vite.ts |
77 |
What was checked
- Map reads stay inside the build dir:
isInsidechecks lexically and afterrealPath(inject.ts:211) uploadgoes throughrequest, so POST is not retried (MapleApi.ts:149,:228); oneSOURCE_MAP_MAX_BYTESsource (packages/domain/src/http/source-maps.ts:5)@maple/sourcemapsexports.and./limits, mapped intsconfig.alchemy-maple.json:14;exceptionPanelrenders once, soissue-stackids stay unique (view.ts:237)
Observability coverage: 1 of 3 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| Maple.SourceMaps provider upload to POST /v2/source_maps | outbound call | yes | Goes through MapleApi.request, wrapped in the existing Effect.fn("MapleApi.requestAttempt") span (MapleApi.ts:143) |
| mapleSourceMaps Vite closeBundle step | build step | no | Reports through this.info(...) in the Vite logger (Vite.ts:108); runs in the build, not a service |
web deploy's own source-map upload (uploadWebSourceMaps) |
deploy step | no | Effect.logInfo/logWarning in the provider (SourceMaps.ts:238, :284); a no-op without the prd-only key |
303dc1c · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading