diff --git a/.changeset/fix-quarantine-json-gate-mode.md b/.changeset/fix-quarantine-json-gate-mode.md new file mode 100644 index 0000000000..ec95885b31 --- /dev/null +++ b/.changeset/fix-quarantine-json-gate-mode.md @@ -0,0 +1,5 @@ +--- +"@runfusion/fusion": patch +--- + +Stop edits to `scripts/lib/test-quarantine.json` from forcing `pnpm test` into gate mode. The quarantine list is runtime data, not executable test infra; tripping the shared-infra catch-all dropped affected-package coverage, so a dev's real changes went untested whenever they also touched the quarantine list. Quarantine edits now stay in changed mode and run the affected packages. diff --git a/scripts/__tests__/test-changed.test.mjs b/scripts/__tests__/test-changed.test.mjs index 90df9ccd36..27bc3e0ab2 100644 --- a/scripts/__tests__/test-changed.test.mjs +++ b/scripts/__tests__/test-changed.test.mjs @@ -148,6 +148,26 @@ test("isSharedInfraChange: returns false for .fusion artifacts", () => { assert.equal(isSharedInfraChange([".fusion/tasks/FN-5157/PROMPT.md"]), false); }); +test("isSharedInfraChange: returns false for the test-quarantine data list", () => { + // FN: editing scripts/lib/test-quarantine.json (a runtime data list of + // quarantined tests, not executable infra) previously tripped the root + // catch-all and forced gate mode, which DROPS affected-package coverage. + assert.equal(isSharedInfraChange(["scripts/lib/test-quarantine.json"]), false); +}); + +test("isSharedInfraChange: quarantine edit plus package change stays changed-only", () => { + // A quarantine-list edit alongside real package work must keep the diff in + // changed mode so the changed packages actually get tested. + assert.equal( + isSharedInfraChange([ + "scripts/lib/test-quarantine.json", + "packages/core/src/productivity-analytics.ts", + "packages/dashboard/app/components/QuickEntryBox.tsx", + ]), + false, + ); +}); + test("isSharedInfraChange: still returns true for root config edges", () => { for (const file of ["tsconfig.json", ".npmrc", "Dockerfile"]) { assert.equal(isSharedInfraChange([file]), true, `${file} should still force the full suite`); diff --git a/scripts/test-changed.mjs b/scripts/test-changed.mjs index 34a3f3baea..2625912de0 100644 --- a/scripts/test-changed.mjs +++ b/scripts/test-changed.mjs @@ -604,6 +604,14 @@ function isTestIrrelevantRootPath(file) { return true; } + // The quarantine list is runtime DATA (which tests are skipped), not + // executable test infra. Editing it must not trip the root catch-all below + // and force gate mode — gate mode drops affected-package coverage, so a + // dev's real changes would go untested just because they touched the list. + if (file === "scripts/lib/test-quarantine.json") { + return true; + } + return ["README", "CHANGELOG.md", "LICENSE", "LICENSE.md"].includes(file); }