File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -271,17 +271,17 @@ export function shouldDelegateChangedCheckToCrabbox(
271271 return false ;
272272 }
273273 const result = options . result ;
274- if ( result ?. paths . length === 0 ) {
274+ if ( ! result ) {
275+ return true ;
276+ }
277+ if ( result . paths . length === 0 ) {
275278 return false ;
276279 }
277280 if ( isOpenEndedTruthyValue ( env . OPENCLAW_TESTBOX ) ) {
278281 return true ;
279282 }
280283 if ( isDedicatedLinuxWorker ( env , options ) ) {
281- return false ;
282- }
283- if ( ! result ) {
284- return true ;
284+ return ! changedCheckLocalDependenciesReady ( options . cwd ?? process . cwd ( ) ) ;
285285 }
286286 // Release metadata plans diff the supplied commits after classification. A missing
287287 // ref needs the hydrated remote checkout even when the explicit path itself is cheap.
Original file line number Diff line number Diff line change @@ -1242,8 +1242,32 @@ describe("scripts/changed-lanes", () => {
12421242 } ) ;
12431243
12441244 it ( "runs trusted changed gates on a dedicated Linux worker" , ( ) => {
1245+ const dir = makeTempRepoRoot ( tempDirs , "openclaw-check-changed-worker-route-" ) ;
12451246 const result = detectChangedLanes ( [ "src/config/config.ts" ] ) ;
1246- const detectedWorker = { platform : "linux" as const , result, virtualized : true } ;
1247+ const detectedWorker = {
1248+ cwd : dir ,
1249+ interactive : false ,
1250+ platform : "linux" as const ,
1251+ result,
1252+ virtualized : true ,
1253+ } ;
1254+
1255+ expect (
1256+ shouldDelegateChangedCheckToCrabbox (
1257+ [ ] ,
1258+ { } ,
1259+ {
1260+ interactive : false ,
1261+ platform : "linux" ,
1262+ virtualized : true ,
1263+ } ,
1264+ ) ,
1265+ ) . toBe ( true ) ;
1266+ expect ( shouldDelegateChangedCheckToCrabbox ( [ ] , { } , detectedWorker ) ) . toBe ( true ) ;
1267+
1268+ writeRepoFile ( dir , "node_modules/.modules.yaml" , "layoutVersion: 5\n" ) ;
1269+ writeRepoFile ( dir , "node_modules/.bin/oxfmt" , "#!/bin/sh\n" ) ;
1270+ writeRepoFile ( dir , "node_modules/typescript/package.json" , '{"name":"typescript"}\n' ) ;
12471271
12481272 expect ( shouldDelegateChangedCheckToCrabbox ( [ ] , { } , detectedWorker ) ) . toBe ( false ) ;
12491273 expect (
You can’t perform that action at this time.
0 commit comments