Build Compound Engineering plugin dist before its tests

dist-freshness.test.ts reads the plugin's compiled dist/settings.js and
dist/session/orchestrator.js to guard against stale dist (FN-6596), but the
plugin had no pretest build and was missing from ensure-test-artifacts.mjs.
On a fresh CI checkout dist/ does not exist, so the guard threw "dist/ is
missing" — failing the non-blocking Full Suite on every main commit.

Register the plugin's required artifacts in ensure-test-artifacts.mjs and add
a `pretest` hook that builds them, matching the dependency-graph / hermes /
openclaw plugins. Verified locally: with dist/ absent, `pnpm --filter
@fusion-plugin-examples/compound-engineering test` now builds dist via the
pretest and all 192 plugin tests pass (incl. the two dist-freshness cases).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-19 20:47:32 -07:00
parent a9b65ac83f
commit 8b5b9a75ad
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" }],
},
];
// ---------------------------------------------------------------------------