From 8b5b9a75ad8fc7683be91d3bd0541952a58d8bfd Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Fri, 19 Jun 2026 20:47:32 -0700 Subject: [PATCH] Build Compound Engineering plugin dist before its tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../fix-compound-engineering-dist-freshness.md | 5 +++++ .../fusion-plugin-compound-engineering/package.json | 1 + scripts/ensure-test-artifacts.mjs | 12 ++++++++++++ 3 files changed, 18 insertions(+) create mode 100644 .changeset/fix-compound-engineering-dist-freshness.md diff --git a/.changeset/fix-compound-engineering-dist-freshness.md b/.changeset/fix-compound-engineering-dist-freshness.md new file mode 100644 index 0000000000..3e1d0593a4 --- /dev/null +++ b/.changeset/fix-compound-engineering-dist-freshness.md @@ -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. diff --git a/plugins/fusion-plugin-compound-engineering/package.json b/plugins/fusion-plugin-compound-engineering/package.json index f1e565c764..36873fb54d 100644 --- a/plugins/fusion-plugin-compound-engineering/package.json +++ b/plugins/fusion-plugin-compound-engineering/package.json @@ -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": { diff --git a/scripts/ensure-test-artifacts.mjs b/scripts/ensure-test-artifacts.mjs index 2e8342a928..857e541960 100644 --- a/scripts/ensure-test-artifacts.mjs +++ b/scripts/ensure-test-artifacts.mjs @@ -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" }], + }, ]; // ---------------------------------------------------------------------------