@@ -807,6 +807,21 @@ describe("scripts/changed-lanes", () => {
807807 } ) ;
808808 } ) ;
809809
810+ it ( "runs changed-check app tests under the parent heavy-check lock" , ( ) => {
811+ const result = detectChangedLanes ( [
812+ "apps/shared/OpenClawKit/Sources/OpenClawProtocol/GatewayModels.swift" ,
813+ ] ) ;
814+ const plan = createChangedCheckPlan ( result , { env : { PATH : "/usr/bin" } } ) ;
815+ const testCommand = plan . commands . find ( ( command ) => command . args [ 0 ] === "test:macos:ci" ) ;
816+
817+ expect ( testCommand ?. env ) . toEqual ( {
818+ OPENCLAW_OXLINT_SKIP_LOCK : "1" ,
819+ OPENCLAW_TEST_HEAVY_CHECK_LOCK_HELD : "1" ,
820+ OPENCLAW_TSGO_HEAVY_CHECK_LOCK_HELD : "1" ,
821+ PATH : "/usr/bin" ,
822+ } ) ;
823+ } ) ;
824+
810825 it ( "routes core test-only changes to core test lanes only" , ( ) => {
811826 const result = detectChangedLanes ( [
812827 "packages/normalization-core/src/string-normalization.test.ts" ,
@@ -1315,10 +1330,12 @@ describe("scripts/changed-lanes", () => {
13151330 name : "prompt snapshot drift" ,
13161331 args : [ "prompt:snapshots:check" ] ,
13171332 } ) ;
1318- expect ( plan . commands ) . toContainEqual ( {
1319- name : "prompt snapshot owner test" ,
1320- args : [ "test:serial" , "test/scripts/prompt-snapshots.test.ts" ] ,
1321- } ) ;
1333+ expect ( plan . commands ) . toContainEqual (
1334+ expect . objectContaining ( {
1335+ name : "prompt snapshot owner test" ,
1336+ args : [ "test:serial" , "test/scripts/prompt-snapshots.test.ts" ] ,
1337+ } ) ,
1338+ ) ;
13221339 } ) ;
13231340
13241341 it ( "runs the prompt snapshot owner test for model fixture generator surfaces" , ( ) => {
@@ -1332,10 +1349,12 @@ describe("scripts/changed-lanes", () => {
13321349 const result = detectChangedLanes ( [ "scripts/sync-codex-model-prompt-fixture.ts" ] ) ;
13331350 const plan = createChangedCheckPlan ( result ) ;
13341351
1335- expect ( plan . commands ) . toContainEqual ( {
1336- name : "prompt snapshot owner test" ,
1337- args : [ "test:serial" , "test/scripts/prompt-snapshots.test.ts" ] ,
1338- } ) ;
1352+ expect ( plan . commands ) . toContainEqual (
1353+ expect . objectContaining ( {
1354+ name : "prompt snapshot owner test" ,
1355+ args : [ "test:serial" , "test/scripts/prompt-snapshots.test.ts" ] ,
1356+ } ) ,
1357+ ) ;
13391358 } ) ;
13401359
13411360 it ( "runs runtime sidecar baseline checks for baseline owner surfaces" , ( ) => {
@@ -1355,10 +1374,12 @@ describe("scripts/changed-lanes", () => {
13551374 name : "runtime sidecar baseline" ,
13561375 args : [ "runtime-sidecars:check" ] ,
13571376 } ) ;
1358- expect ( plan . commands ) . toContainEqual ( {
1359- name : "runtime sidecar owner test" ,
1360- args : [ "test:serial" , "src/plugins/bundled-plugin-metadata.test.ts" ] ,
1361- } ) ;
1377+ expect ( plan . commands ) . toContainEqual (
1378+ expect . objectContaining ( {
1379+ name : "runtime sidecar owner test" ,
1380+ args : [ "test:serial" , "src/plugins/bundled-plugin-metadata.test.ts" ] ,
1381+ } ) ,
1382+ ) ;
13621383 } ) ;
13631384
13641385 it ( "guards release metadata package changes to the top-level version field" , ( ) => {
@@ -1472,10 +1493,12 @@ describe("scripts/changed-lanes", () => {
14721493 bin : "node" ,
14731494 } ) ,
14741495 ) ;
1475- expect ( plan . commands ) . toContainEqual ( {
1476- name : "macOS app CI tests" ,
1477- args : [ "test:macos:ci" ] ,
1478- } ) ;
1496+ expect ( plan . commands ) . toContainEqual (
1497+ expect . objectContaining ( {
1498+ name : "macOS app CI tests" ,
1499+ args : [ "test:macos:ci" ] ,
1500+ } ) ,
1501+ ) ;
14791502 }
14801503 } ) ;
14811504
@@ -1484,10 +1507,12 @@ describe("scripts/changed-lanes", () => {
14841507 const plan = createChangedCheckPlan ( result ) ;
14851508
14861509 expect ( shouldRunAppcastOwnerTest ( result . paths ) ) . toBe ( true ) ;
1487- expect ( plan . commands ) . toContainEqual ( {
1488- name : "appcast owner tests" ,
1489- args : [ "test:serial" , "test/appcast.test.ts" , "test/scripts/make-appcast.test.ts" ] ,
1490- } ) ;
1510+ expect ( plan . commands ) . toContainEqual (
1511+ expect . objectContaining ( {
1512+ name : "appcast owner tests" ,
1513+ args : [ "test:serial" , "test/appcast.test.ts" , "test/scripts/make-appcast.test.ts" ] ,
1514+ } ) ,
1515+ ) ;
14911516 expect ( plan . commands . map ( ( command ) => command . name ) ) . not . toContain ( "macOS app CI tests" ) ;
14921517 } ) ;
14931518
@@ -1502,10 +1527,12 @@ describe("scripts/changed-lanes", () => {
15021527 } ) ;
15031528
15041529 expect ( plan . commands . map ( ( command ) => command . args [ 0 ] ) ) . toContain ( "lint:apps" ) ;
1505- expect ( plan . commands ) . toContainEqual ( {
1506- name : "macOS app CI tests" ,
1507- args : [ "test:macos:ci" ] ,
1508- } ) ;
1530+ expect ( plan . commands ) . toContainEqual (
1531+ expect . objectContaining ( {
1532+ name : "macOS app CI tests" ,
1533+ args : [ "test:macos:ci" ] ,
1534+ } ) ,
1535+ ) ;
15091536 } ) ;
15101537
15111538 it ( "keeps macOS app CI tests out of Android-only app changes" , ( ) => {
0 commit comments