Skip to content

fix(sourcemaps): split web into eager chunks under the map cap, skip maps with no sources - #3031

Merged
Makisuo merged 1 commit into
mainfrom
t3/check-source-map-enw
Nov 24, 2026
Merged

Makisuo merged 1 commit into
mainfrom
t3/check-source-map-enw

fix(sourcemaps): split web into eager chunks under the map cap, skip …

352d7ca
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Nov 24, 2026 in 3m 8s

Confidence 8/10 · 1 issue to address

🟢 Confidence 8/10 · likely safe to merge. The uploader skip is pinned by a test and matches the server's rule; the bundle-layout change and the CLI copy of the rule are only covered by hand.
1 warning −1 · tests partial −1 · risk medium

Eager chunk splitting keeps every apps/web source map under the 10 MiB cap, and the deploy uploader now skips maps with no sources instead of failing on the server's 400. The uploader change is tested; the new bundle layout is verified by hand only.

  • Web build splits into eager vendor/kit/app chunks capped at 2.5 MB
  • strictExecutionOrder keeps module init order across the new chunks
  • SourceMaps skips a map with no mappings string or no sources
  • mapsNoSources exported from @maple/sourcemaps for callers to share

Before merge

  • Manual · Watch the next prd deploy log for Uploaded N source map(s) and maple.stack.status on StackSymbolicator.symbolicate spans

Findings

🟠 Warning · F1 · New no-sources skip missing from maple sourcemaps upload

maintainability · packages/sourcemaps/src/inject.ts:170-178

The upload rule now exists in two copies and only this PR's copy learned it. apps/cli/src/core/sourcemaps-upload.ts:174 still checks just isIndexMap, so the CLI keeps posting the elk worker's source-less map, the server's 400 becomes SourceMapUploadError, and the command exits ${n} source map upload(s) failed (apps/cli/src/commands/sourcemaps.ts:129).

Import `mapsNoSources` in `apps/cli/src/core/sourcemaps-upload.ts` and return a `skipped` outcome with the same reason beside its `isIndexMap` check, with a test case for a `sources: []` map.
What was checked
  • mapsNoSources mirrors the server's isRegularMap (source-map-files.ts:100): mappings string, non-empty sources
  • The added fixture at source-maps.test.ts:189 pins the skip: uploaded would be 2 without it
  • Vite group regexes match module ids by path; nothing in the repo pins chunk names (/assets/ hits are fixtures)

352d7ca · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Annotations

Check warning on line 178 in packages/sourcemaps/src/inject.ts

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

maintainability: New no-sources skip missing from `maple sourcemaps upload`

The upload rule now exists in two copies and only this PR's copy learned it. `apps/cli/src/core/sourcemaps-upload.ts:174` still checks just `isIndexMap`, so the CLI keeps posting the elk worker's source-less map, the server's 400 becomes `SourceMapUploadError`, and the command exits `${n} source map upload(s) failed` (`apps/cli/src/commands/sourcemaps.ts:129`).