Skip to content

feat(coverage): upload each source map's repo-relative path for monorepo source resolution#810

Merged
BartWaardenburg merged 1 commit into
mainfrom
feat/issue-260-map-path
May 30, 2026
Merged

feat(coverage): upload each source map's repo-relative path for monorepo source resolution#810
BartWaardenburg merged 1 commit into
mainfrom
feat/issue-260-map-path

Conversation

@BartWaardenburg
Copy link
Copy Markdown
Collaborator

What

fallow coverage upload-source-maps now sends each map file's path relative to the repo root (e.g. dashboard/dist/assets/X.js.map) as a new optional mapPath field, alongside the existing fileName.

Why

The fallow.cloud source-evidence viewer resolves a map's relative sources[] (e.g. ../../src/components/X.tsx) back to original source. For a monorepo sub-package map it previously had only the basename, so it collapsed ../../src/X to src/X and the package-prefixed runtime path dashboard/src/components/X.tsx never matched, yielding source_not_in_maps. With the map's repo-relative path, the cloud resolves each source against the map's directory and recovers dashboard/src/components/X.tsx.

Behavior

  • mapPath is omitted when a map is not under the repo root (an absolute --dir outside it); the cloud then falls back to its prior normalization, so this is backwards compatible and a no-op for single-package projects.
  • fileName and --strip-path are unchanged.
  • Run upload-source-maps from the repo root so the prefix is correct (already the documented usage).

Tests

map_path is repo-root-relative when --dir is a subdirectory; None for a map outside the root; request serializes mapPath and omits it when absent. fmt + clippy clean.

Cross-repo

Pairs with fallow-rs/fallow-cloud#265, which persists map_path and resolves sources against the map directory.

Closes fallow-rs/fallow-cloud#260.

…epo source resolution

upload-source-maps now sends the map file's path relative to the repo
root (e.g. dashboard/dist/assets/X.js.map) alongside the existing
fileName, as a new optional mapPath field. The fallow.cloud
source-evidence viewer uses it to resolve a map's relative sources[]
(../../src/components/X.tsx) against the map's directory, recovering the
package-prefixed path dashboard/src/components/X.tsx so it matches the
monorepo-relative runtime coverage path. Previously only the basename
was known, so the cloud collapsed ../../src/X to src/X and the viewer
reported source_not_in_maps for monorepo sub-packages.

The field is omitted when a map is not under the repo root (an absolute
--dir outside it); the cloud then falls back to its prior root-anchored
normalization, so the change is backwards compatible and a no-op for
single-package projects. fileName and --strip-path are unchanged.

Closes fallow-rs/fallow-cloud#260.
@BartWaardenburg BartWaardenburg added this pull request to the merge queue May 30, 2026
Merged via the queue into main with commit 986651a May 30, 2026
34 checks passed
@BartWaardenburg BartWaardenburg deleted the feat/issue-260-map-path branch May 30, 2026 17:12
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