Stop quarantine-list edits from forcing pnpm test into gate mode

scripts/lib/test-quarantine.json is runtime data (which tests are
quarantined), not executable test infra, but it tripped the shared-infra
catch-all in isSharedInfraChange. That forced mode=gate, which runs only
the fixed engine-core + cli-shape gate suite and returns before the
affected packages -- so a dev's real changes (e.g. @fusion/core,
@fusion/dashboard) got zero coverage whenever they also touched the
quarantine list. Classify the file as test-irrelevant so the diff stays
in changed mode and the affected packages run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-19 19:05:49 -07:00
parent 1a565a368b
commit 24ff12471f
3 changed files with 33 additions and 0 deletions

View File

@@ -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.

View File

@@ -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`);

View File

@@ -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);
}