diff --git a/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift b/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift index 869231665a8..8c27d9fb63b 100644 --- a/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift +++ b/apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift @@ -6592,6 +6592,7 @@ public struct ExecApprovalRequestParams: Codable, Sendable { public let turnsourceto: AnyCodable? public let turnsourceaccountid: AnyCodable? public let turnsourcethreadid: AnyCodable? + public let approvalreviewerdeviceids: [String]? public let requiredeliveryroute: Bool? public let suppressdelivery: Bool? public let timeoutms: Int? @@ -6618,6 +6619,7 @@ public struct ExecApprovalRequestParams: Codable, Sendable { turnsourceto: AnyCodable?, turnsourceaccountid: AnyCodable?, turnsourcethreadid: AnyCodable?, + approvalreviewerdeviceids: [String]?, requiredeliveryroute: Bool? = nil, suppressdelivery: Bool? = nil, timeoutms: Int?, @@ -6643,6 +6645,7 @@ public struct ExecApprovalRequestParams: Codable, Sendable { self.turnsourceto = turnsourceto self.turnsourceaccountid = turnsourceaccountid self.turnsourcethreadid = turnsourcethreadid + self.approvalreviewerdeviceids = approvalreviewerdeviceids self.requiredeliveryroute = requiredeliveryroute self.suppressdelivery = suppressdelivery self.timeoutms = timeoutms @@ -6670,6 +6673,7 @@ public struct ExecApprovalRequestParams: Codable, Sendable { case turnsourceto = "turnSourceTo" case turnsourceaccountid = "turnSourceAccountId" case turnsourcethreadid = "turnSourceThreadId" + case approvalreviewerdeviceids = "approvalReviewerDeviceIds" case requiredeliveryroute = "requireDeliveryRoute" case suppressdelivery = "suppressDelivery" case timeoutms = "timeoutMs" diff --git a/scripts/check-changed.mjs b/scripts/check-changed.mjs index 30202817ffd..4834d5a89e9 100644 --- a/scripts/check-changed.mjs +++ b/scripts/check-changed.mjs @@ -290,21 +290,26 @@ export function createChangedCheckPlan(result, options = {}) { add("prompt snapshot drift", ["prompt:snapshots:check"]); } if (shouldRunPromptSnapshotOwnerTest(result.paths)) { - add("prompt snapshot owner test", ["test:serial", "test/scripts/prompt-snapshots.test.ts"]); + add( + "prompt snapshot owner test", + ["test:serial", "test/scripts/prompt-snapshots.test.ts"], + baseEnv, + ); } if (shouldRunRuntimeSidecarBaselineCheck(result.paths)) { add("runtime sidecar baseline", ["runtime-sidecars:check"]); - add("runtime sidecar owner test", [ - "test:serial", - "src/plugins/bundled-plugin-metadata.test.ts", - ]); + add( + "runtime sidecar owner test", + ["test:serial", "src/plugins/bundled-plugin-metadata.test.ts"], + baseEnv, + ); } if (shouldRunAppcastOwnerTest(result.paths)) { - add("appcast owner tests", [ - "test:serial", - "test/appcast.test.ts", - "test/scripts/make-appcast.test.ts", - ]); + add( + "appcast owner tests", + ["test:serial", "test/appcast.test.ts", "test/scripts/make-appcast.test.ts"], + baseEnv, + ); } add("package patch guard", ["deps:patches:check"]); @@ -410,7 +415,7 @@ export function createChangedCheckPlan(result, options = {}) { addLint("lint apps", ["lint:apps"]); } if (lanes.apps && hasMacosAppCiPath(result.paths)) { - add("macOS app CI tests", ["test:macos:ci"]); + add("macOS app CI tests", ["test:macos:ci"], baseEnv); } if (lanes.core || lanes.extensions) { diff --git a/test/scripts/changed-lanes.test.ts b/test/scripts/changed-lanes.test.ts index 4c186526ae0..b51baf3ae7a 100644 --- a/test/scripts/changed-lanes.test.ts +++ b/test/scripts/changed-lanes.test.ts @@ -807,6 +807,21 @@ describe("scripts/changed-lanes", () => { }); }); + it("runs changed-check app tests under the parent heavy-check lock", () => { + const result = detectChangedLanes([ + "apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift", + ]); + const plan = createChangedCheckPlan(result, { env: { PATH: "/usr/bin" } }); + const testCommand = plan.commands.find((command) => command.args[0] === "test:macos:ci"); + + expect(testCommand?.env).toEqual({ + OPENCLAW_OXLINT_SKIP_LOCK: "1", + OPENCLAW_TEST_HEAVY_CHECK_LOCK_HELD: "1", + OPENCLAW_TSGO_HEAVY_CHECK_LOCK_HELD: "1", + PATH: "/usr/bin", + }); + }); + it("routes core test-only changes to core test lanes only", () => { const result = detectChangedLanes([ "packages/normalization-core/src/string-normalization.test.ts", @@ -1315,10 +1330,12 @@ describe("scripts/changed-lanes", () => { name: "prompt snapshot drift", args: ["prompt:snapshots:check"], }); - expect(plan.commands).toContainEqual({ - name: "prompt snapshot owner test", - args: ["test:serial", "test/scripts/prompt-snapshots.test.ts"], - }); + expect(plan.commands).toContainEqual( + expect.objectContaining({ + name: "prompt snapshot owner test", + args: ["test:serial", "test/scripts/prompt-snapshots.test.ts"], + }), + ); }); it("runs the prompt snapshot owner test for model fixture generator surfaces", () => { @@ -1332,10 +1349,12 @@ describe("scripts/changed-lanes", () => { const result = detectChangedLanes(["scripts/sync-codex-model-prompt-fixture.ts"]); const plan = createChangedCheckPlan(result); - expect(plan.commands).toContainEqual({ - name: "prompt snapshot owner test", - args: ["test:serial", "test/scripts/prompt-snapshots.test.ts"], - }); + expect(plan.commands).toContainEqual( + expect.objectContaining({ + name: "prompt snapshot owner test", + args: ["test:serial", "test/scripts/prompt-snapshots.test.ts"], + }), + ); }); it("runs runtime sidecar baseline checks for baseline owner surfaces", () => { @@ -1355,10 +1374,12 @@ describe("scripts/changed-lanes", () => { name: "runtime sidecar baseline", args: ["runtime-sidecars:check"], }); - expect(plan.commands).toContainEqual({ - name: "runtime sidecar owner test", - args: ["test:serial", "src/plugins/bundled-plugin-metadata.test.ts"], - }); + expect(plan.commands).toContainEqual( + expect.objectContaining({ + name: "runtime sidecar owner test", + args: ["test:serial", "src/plugins/bundled-plugin-metadata.test.ts"], + }), + ); }); it("guards release metadata package changes to the top-level version field", () => { @@ -1472,10 +1493,12 @@ describe("scripts/changed-lanes", () => { bin: "node", }), ); - expect(plan.commands).toContainEqual({ - name: "macOS app CI tests", - args: ["test:macos:ci"], - }); + expect(plan.commands).toContainEqual( + expect.objectContaining({ + name: "macOS app CI tests", + args: ["test:macos:ci"], + }), + ); } }); @@ -1484,10 +1507,12 @@ describe("scripts/changed-lanes", () => { const plan = createChangedCheckPlan(result); expect(shouldRunAppcastOwnerTest(result.paths)).toBe(true); - expect(plan.commands).toContainEqual({ - name: "appcast owner tests", - args: ["test:serial", "test/appcast.test.ts", "test/scripts/make-appcast.test.ts"], - }); + expect(plan.commands).toContainEqual( + expect.objectContaining({ + name: "appcast owner tests", + args: ["test:serial", "test/appcast.test.ts", "test/scripts/make-appcast.test.ts"], + }), + ); expect(plan.commands.map((command) => command.name)).not.toContain("macOS app CI tests"); }); @@ -1502,10 +1527,12 @@ describe("scripts/changed-lanes", () => { }); expect(plan.commands.map((command) => command.args[0])).toContain("lint:apps"); - expect(plan.commands).toContainEqual({ - name: "macOS app CI tests", - args: ["test:macos:ci"], - }); + expect(plan.commands).toContainEqual( + expect.objectContaining({ + name: "macOS app CI tests", + args: ["test:macos:ci"], + }), + ); }); it("keeps macOS app CI tests out of Android-only app changes", () => {