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:
@@ -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`);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user