@@ -423,6 +423,8 @@ describe('runBabysitPiWithOptions', () => {
423423 . mockResolvedValueOnce ( { ...snapshot , headSha : NEW_SHA } )
424424 . mockResolvedValueOnce ( { ...snapshot , headSha : NEW_SHA } )
425425 . mockResolvedValueOnce ( { ...snapshot , headSha : NEW_SHA } )
426+ . mockResolvedValueOnce ( { ...snapshot , headSha : NEW_SHA } )
427+ . mockResolvedValueOnce ( { ...snapshot , headSha : SECOND_SHA } )
426428 . mockResolvedValueOnce ( { ...snapshot , headSha : SECOND_SHA } )
427429 . mockResolvedValueOnce ( { ...snapshot , headSha : SECOND_SHA } )
428430 mockFetchThreads . mockResolvedValue ( {
@@ -443,6 +445,20 @@ describe('runBabysitPiWithOptions', () => {
443445 headMoved : false ,
444446 awaitingConfirmation : false ,
445447 } )
448+ mockRequestReview
449+ . mockResolvedValueOnce ( {
450+ requestedAt : '2026-07-25T12:00:00.000Z' ,
451+ commentIds : new Set ( [ 11 ] ) ,
452+ posted : 1 ,
453+ failures : [ ] ,
454+ } )
455+ . mockResolvedValueOnce ( {
456+ requestedAt : '2026-07-25T12:05:00.000Z' ,
457+ commentIds : new Set ( ) ,
458+ posted : 0 ,
459+ failures : [ '@review-bot' ] ,
460+ } )
461+ mockReviewLanded . mockResolvedValueOnce ( false ) . mockResolvedValueOnce ( true )
446462 const { runner, runCalls } = makeRunner ( {
447463 prepareStdout : [
448464 `__CUMULATIVE_CHANGED__=src/a.ts\n__CUMULATIVE_DIFF_BYTES__=20\n__CHANGED__=src/a.ts\n__NEW_SHA__=${ NEW_SHA } \n__NEEDS_PUSH__=1\n` ,
@@ -454,7 +470,7 @@ describe('runBabysitPiWithOptions', () => {
454470 mockWithPiSandbox . mockImplementation ( async ( callback ) => callback ( runner ) )
455471
456472 const result = await runBabysitPiWithOptions (
457- params ( ) ,
473+ params ( { reviewMentions : [ '@review-bot' ] } ) ,
458474 { onEvent : vi . fn ( ) } ,
459475 { convergenceWaitMs : 0 , roundWaitMs : 0 }
460476 )
@@ -471,6 +487,8 @@ describe('runBabysitPiWithOptions', () => {
471487 . filter ( ( { command } ) => command . includes ( 'CURRENT_DIGEST=' ) )
472488 . map ( ( { envs } ) => envs ?. PINNED_SHA )
473489 ) . toEqual ( [ OLD_SHA , NEW_SHA ] )
490+ expect ( mockRequestReview ) . toHaveBeenCalledTimes ( 2 )
491+ expect ( mockReviewLanded ) . toHaveBeenCalledTimes ( 2 )
474492 } )
475493
476494 it ( 'refuses .github changes before the credentialed push' , async ( ) => {
0 commit comments