Skip to content

Commit 2e04d86

Browse files
committed
fix(ci): preserve plugin manifest fallback lint
1 parent 854cf0f commit 2e04d86

2 files changed

Lines changed: 22 additions & 2 deletions

File tree

‎scripts/check-changed.mjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,12 @@ export function createChangedCheckPlan(result, options = {}) {
702702
}
703703
if (lanes.extensions || lanes.extensionTests) {
704704
// Generated plugin outputs have their own asset-integrity gate and are
705-
// intentionally ignored by oxlint; targeting them produces a false failure.
705+
// intentionally ignored by oxlint; manifests still need full-lane fallback.
706706
if (
707707
!result.paths.some((changedPath) => generatedExtensionAssetPaths.has(changedPath)) ||
708708
result.paths.some(
709709
(changedPath) =>
710-
LINTABLE_EXTENSION_PATH_RE.test(changedPath) &&
710+
getChangedPathFacts(changedPath).surface === "extension" &&
711711
!generatedExtensionAssetPaths.has(changedPath),
712712
)
713713
) {

‎test/scripts/changed-lanes-generated-extension-lint.test.ts‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,24 @@ describe("generated extension asset lint planning", () => {
2727
.flatMap((command) => command.args),
2828
).not.toContain(generatedAsset);
2929
});
30+
31+
it("keeps fallback extension lint for a manifest beside a generated browser asset", () => {
32+
const generatedAsset = "extensions/browser/chrome-extension/modules/copilot-runtime.js";
33+
const manifest = "extensions/browser/openclaw.plugin.json";
34+
const result = detectChangedLanes([generatedAsset, manifest]);
35+
const plan = createChangedCheckPlan(result, { env: { PATH: "/usr/bin" } });
36+
37+
expect(result.lanes.extensions).toBe(true);
38+
expect(plan.commands).toContainEqual(
39+
expect.objectContaining({
40+
name: "lint extensions",
41+
args: ["lint:extensions"],
42+
}),
43+
);
44+
expect(
45+
plan.commands
46+
.filter((command) => command.args[0] === "scripts/run-oxlint.mjs")
47+
.flatMap((command) => command.args),
48+
).not.toContain(generatedAsset);
49+
});
3050
});

0 commit comments

Comments
 (0)