Skip to content

Commit b38287a

Browse files
fix(clawsweeper): address review for automerge-openclaw-openclaw-77188 (validation-1)
1 parent 011d61d commit b38287a

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

scripts/changed-lanes.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ const GIT_OUTPUT_MAX_BUFFER = 64 * 1024 * 1024;
66

77
const DOCS_PATH_RE = /^(?:docs\/|README\.md$|AGENTS\.md$|.*\.mdx?$)/u;
88
const APP_PATH_RE = /^(?:apps\/|Swabble\/|appcast\.xml$)/u;
9+
const GENERATED_PROTOCOL_SWIFT_MODEL_RE =
10+
/^(?:apps\/macos\/Sources\/OpenClawProtocol\/GatewayModels\.swift|apps\/shared\/OpenClawKit\/Sources\/OpenClawProtocol\/GatewayModels\.swift)$/u;
911
const EXTENSION_PATH_RE = /^extensions\/[^/]+(?:\/|$)/u;
1012
const CORE_PATH_RE = /^(?:src\/|ui\/|packages\/)/u;
1113
const TOOLING_PATH_RE =
@@ -111,6 +113,10 @@ export function detectChangedLanes(changedPaths, options = {}) {
111113
continue;
112114
}
113115

116+
if (GENERATED_PROTOCOL_SWIFT_MODEL_RE.test(changedPath)) {
117+
continue;
118+
}
119+
114120
hasNonDocs = true;
115121

116122
if (changedPath === "package.json" && packageJsonIsLiveDockerTooling) {

test/scripts/changed-lanes.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,24 @@ describe("scripts/changed-lanes", () => {
839839
expect(plan.commands.map((command) => command.args[0])).not.toContain("tsgo:all");
840840
});
841841

842+
it("does not route generated protocol Swift models to app lint", () => {
843+
const result = detectChangedLanes([
844+
"apps/macos/Sources/OpenClawProtocol/GatewayModels.swift",
845+
"apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift",
846+
"src/gateway/protocol/schema/cron.ts",
847+
]);
848+
const plan = createChangedCheckPlan(result);
849+
850+
expect(result.lanes).toMatchObject({
851+
apps: false,
852+
core: true,
853+
coreTests: true,
854+
all: false,
855+
});
856+
expect(plan.commands.map((command) => command.args[0])).toContain("tsgo:core");
857+
expect(plan.commands.map((command) => command.args[0])).not.toContain("lint:apps");
858+
});
859+
842860
it("routes legacy root asset deletions as tooling during root cleanup", () => {
843861
const result = detectChangedLanes([
844862
"assets/avatar-placeholder.svg",

0 commit comments

Comments
 (0)