fix(test): a Vite prefix-match alias silently unresolved a core subpath (greens full-suite shard 1) - #2686
Conversation
…th (full-suite shard 1) Vite string aliases match by PREFIX, so `find: "@fusion/core"` -> `core/src/index.ts` rewrites `@fusion/core/task-delete-attribution` into `core/src/index.ts/task-delete-attribution`, which cannot resolve. Six configs alias `@fusion/dashboard` (whose `app/api/client.ts` imports that browser-safe leaf) while lacking the narrower subpath alias that must precede the broad one. The dashboard config already documents this exact hazard in a comment; the fix carries the same one-line pattern to the six configs that inherited the trap. MEASURED — dependency-graph, the project that was actually red on main: before: 3 failed files | 17 passed, 147 tests collected after: 20 passed files, 180 tests collected 33 tests were never collected, so they were neither passing nor reported as failing. No regressions: reports 110, cli-printing-press 41, compound-engineering 317, gate 726 all green. desktop is 1 failed | 264 passed BOTH before and after (pre-existing on clean main: @fusion-plugin-examples/roadmap entry resolution, unrelated to this change). Engine's second `@fusion/core` alias (the `.gate-bundle/core.mjs` entry) is deliberately untouched — that lane bundles core on purpose and must not resolve from source. Fusion-Task-Id: U9
|
Warning Review limit reached
Next review available in: 9 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
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. Comment |
Greptile SummaryAdds ordered Vitest aliases for the browser-safe
Confidence Score: 5/5The PR appears safe to merge, with the alias ordering consistently corrected across the affected Vitest configurations. The new aliases resolve the existing core leaf module before Vite can apply the broader prefix alias, and no concrete changed-code failure remains.
|
| Filename | Overview |
|---|---|
| packages/desktop/vitest.config.ts | Adds the exact core subpath alias ahead of the prefix-matching core alias. |
| packages/engine/vitest.config.ts | Adds the source-leaf alias at the root while preserving the engine-core project's intentional gate-bundle override. |
| plugins/fusion-plugin-cli-printing-press/vitest.config.ts | Adds the correctly ordered subpath alias using the plugin configuration's existing URL-resolution convention. |
| plugins/fusion-plugin-compound-engineering/vitest.config.ts | Adds the exact subpath entry before the broad core entry in the ordered alias array. |
| plugins/fusion-plugin-dependency-graph/vitest.config.ts | Adds the exact subpath entry before the broad core entry in the ordered alias array. |
| plugins/fusion-plugin-reports/vitest.config.ts | Adds the exact core subpath alias while retaining the existing dashboard subpath ordering. |
Reviews (1): Last reviewed commit: "fix(test): a Vite prefix-match alias sil..." | Re-trigger Greptile
What
full-suite.ymlshard 1 on main fails with zero test failures — it dies on a resolution error:Root cause. Vite string aliases match by PREFIX. So
find: "@fusion/core"→core/src/index.tsrewrites@fusion/core/task-delete-attributionintocore/src/index.ts/task-delete-attribution, which cannot resolve. The narrower subpath alias has to come first.The module exists and is correctly declared in
packages/core/package.jsonexports — this is purely a test-config trap, andpackages/dashboard/vitest.config.tsalready documents it in a comment. Six configs alias@fusion/dashboard(whoseapp/api/client.tsimports that browser-safe leaf) while lacking the narrower alias, so they inherited the trap. This carries the same one-line pattern to all six.Measured
dependency-graph— the project actually red on main:33 tests were never collected — neither passing nor reported as failing. That is the part worth flagging: an unresolved import removes tests from the run silently, and the shard's own summary printed no
Tests N failedline at all, which is why this red looked like infrastructure noise rather than a real defect.No regressions:
reports110,cli-printing-press41,compound-engineering317, gate 726 — all green.pnpm lintclean.@fusion/desktopis1 failed | 264 passedboth before and after; verified pre-existing on cleanorigin/mainby reverting just that one config and re-running. Cause is@fusion-plugin-examples/roadmapentry resolution, unrelated — flagged, not fixed.Deliberately not changed
Engine's second
@fusion/corealias (the.gate-bundle/core.mjsentry) is untouched: that lane bundles core on purpose, and pointing it at source would defeat the isolation the gate bundle exists to provide.Full-suite triage this came out of (for whoever owns the rest)
Reading the four red shards of the last completed run on main (
30523568756):store-wedge-resolution.pg,central-archive-secrets,task-delete-caller-attribution,task-delete-nonblocking-cleanup@fusion/engine [1/2]— no test failures, no summary@runfusion/fusionCLI (project.test.ts8,task.test.ts5,extension.test.ts2, +2)Two of the four shard reds contain no failing test at all, so "main's full-suite failure count" cannot be read off the shard conclusions — it has to be read off
Tests N failedsummary lines, and shards 1 and 3 emit none.