## What `full-suite.yml` shard 1 on main fails with **zero test failures** — it dies on a resolution error: ``` Failed to resolve import "@fusion/core/task-delete-attribution" from "packages/dashboard/app/api/client.ts" ``` **Root cause.** 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. The narrower subpath alias has to come *first*. The module exists and *is* correctly declared in `packages/core/package.json` exports — this is purely a test-config trap, and `packages/dashboard/vitest.config.ts` already documents it in a comment. Six configs alias `@fusion/dashboard` (whose `app/api/client.ts` imports 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: | | Test files | Tests collected | |---|---|---| | before | 3 failed \| 17 passed | 147 | | after | **20 passed** | **180** | **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 failed` line at all, which is why this red looked like infrastructure noise rather than a real defect. No regressions: `reports` 110, `cli-printing-press` 41, `compound-engineering` 317, **gate 726** — all green. `pnpm lint` clean. `@fusion/desktop` is `1 failed | 264 passed` **both before and after**; verified pre-existing on clean `origin/main` by reverting just that one config and re-running. Cause is `@fusion-plugin-examples/roadmap` entry resolution, unrelated — **flagged, not fixed.** ## Deliberately not changed Engine's *second* `@fusion/core` alias (the `.gate-bundle/core.mjs` entry) 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`): | Shard | Real cause | Owner | |---|---|---| | 1/4 | **this PR** — resolution error, 0 test failures | — | | 2/4 | 23 failed: `store-wedge-resolution.pg`, `central-archive-secrets`, `task-delete-caller-attribution`, `task-delete-nonblocking-cleanup` | #2669 / #2675 cover the first two | | 3/4 | **watchdog SIGKILL** mid-`@fusion/engine [1/2]` — no test failures, no summary | unowned | | 4/4 | 17 failed, all in `@runfusion/fusion` CLI (`project.test.ts` 8, `task.test.ts` 5, `extension.test.ts` 2, +2) | unowned | 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 failed` summary lines, and shards 1 and 3 emit none.
64 lines
2.6 KiB
TypeScript
64 lines
2.6 KiB
TypeScript
import { defineConfig } from "vitest/config";
|
|
import { fileURLToPath } from "node:url";
|
|
import { computeMaxWorkers } from "../../packages/core/src/__test-utils__/vitest-workers";
|
|
|
|
const maxWorkers = computeMaxWorkers();
|
|
|
|
/*
|
|
FNXC:DependencyGraphTests 2026-06-25-16:30:
|
|
The SQLite-to-PostgreSQL cutover (feature delete-sqlite-runtime-final, PHASE A)
|
|
quarantines plugin test files that construct a SQLite-backed store. The SQLite
|
|
runtime code is being deleted in this feature. Per the AGENTS.md flaky-test
|
|
deletion ratchet, these tests are quarantined on sight. Mirrored in
|
|
scripts/lib/test-quarantine.json.
|
|
*/
|
|
const quarantinedDependencyGraphTests = [
|
|
];
|
|
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: /^@fusion-plugin-examples\/dependency-graph\/dashboard-view$/,
|
|
replacement: fileURLToPath(new URL("./src/dashboard-view.tsx", import.meta.url)),
|
|
},
|
|
{
|
|
find: /^@fusion-plugin-examples\/dependency-graph$/,
|
|
replacement: fileURLToPath(new URL("./src/index.ts", import.meta.url)),
|
|
},
|
|
/*
|
|
FNXC:VitestAliases 2026-07-30-13:10:
|
|
Must precede the broader `@fusion/core` alias: Vite string aliases match by PREFIX, so that key
|
|
rewrites this subpath to `index.ts/task-delete-attribution` and resolution fails. Reached here
|
|
transitively — this project aliases `@fusion/dashboard`, and `app/api/client.ts` imports the
|
|
browser-safe delete-attribution leaf.
|
|
*/
|
|
{ find: "@fusion/core/task-delete-attribution", replacement: fileURLToPath(new URL("../../packages/core/src/task-delete-attribution.ts", import.meta.url)) },
|
|
{ find: "@fusion/core", replacement: fileURLToPath(new URL("../../packages/core/src/index.ts", import.meta.url)) },
|
|
{
|
|
find: "@fusion/plugin-sdk",
|
|
replacement: fileURLToPath(new URL("../../packages/plugin-sdk/src/index.ts", import.meta.url)),
|
|
},
|
|
{ find: "@fusion/dashboard", replacement: fileURLToPath(new URL("../../packages/dashboard", import.meta.url)) },
|
|
{
|
|
find: "lucide-react",
|
|
replacement: fileURLToPath(new URL("../../packages/dashboard/node_modules/lucide-react", import.meta.url)),
|
|
},
|
|
],
|
|
},
|
|
test: {
|
|
include: ["src/**/*.test.{ts,tsx}"],
|
|
exclude: [
|
|
"**/node_modules/**",
|
|
"**/dist/**",
|
|
...quarantinedDependencyGraphTests,
|
|
],
|
|
environment: "jsdom",
|
|
setupFiles: [fileURLToPath(new URL("../../packages/core/src/__test-utils__/vitest-setup.ts", import.meta.url))],
|
|
globalSetup: [fileURLToPath(new URL("../../packages/core/src/__test-utils__/vitest-teardown.ts", import.meta.url))],
|
|
pool: "threads",
|
|
maxWorkers,
|
|
minWorkers: 1,
|
|
},
|
|
});
|