Merge pull request #1688 from Runfusion/fix/compound-engineering-dist-freshness

Build Compound Engineering plugin dist before its tests (fix Full Suite)
This commit is contained in:
gsxdsm
2026-06-20 11:49:31 +08:00
committed by GitHub
3 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix the persistent non-blocking Full Suite failure caused by the Compound Engineering plugin's `dist-freshness.test.ts`. The test reads the plugin's compiled `dist/settings.js` and `dist/session/orchestrator.js`, but the plugin had no `pretest` build and was absent from `ensure-test-artifacts.mjs`, so on a fresh checkout `dist/` did not exist and the freshness guard threw "dist/ is missing — run pnpm build first". Register the plugin's required artifacts in `ensure-test-artifacts.mjs` and add a `pretest` hook that builds them, matching the other bundled plugins.

View File

@@ -16,6 +16,7 @@
},
"scripts": {
"build": "tsc && node scripts/copy-css.mjs",
"pretest": "node ../../scripts/ensure-test-artifacts.mjs",
"test": "vitest run --silent=passed-only --reporter=dot"
},
"dependencies": {

View File

@@ -63,6 +63,18 @@ export const REQUIRED_BUILD_PACKAGES = [
requiredArtifacts: ["plugins/fusion-plugin-paperclip-runtime/dist/index.js"],
staleAgainstGlobs: [{ sourcePath: "plugins/fusion-plugin-paperclip-runtime/src" }],
},
{
// dist-freshness.test.ts reads the compiled settings + orchestrator to guard
// against stale dist (FN-6596). dist/ is build output, so a fresh CI checkout
// must build the plugin before its tests run or the guard throws "dist/ is
// missing". Build these artifacts up front like the other bundled plugins.
name: "@fusion-plugin-examples/compound-engineering",
requiredArtifacts: [
"plugins/fusion-plugin-compound-engineering/dist/settings.js",
"plugins/fusion-plugin-compound-engineering/dist/session/orchestrator.js",
],
staleAgainstGlobs: [{ sourcePath: "plugins/fusion-plugin-compound-engineering/src" }],
},
];
// ---------------------------------------------------------------------------