@@ -583,6 +583,7 @@ describe("DesktopBackendManager", () => {
583583 it . effect ( "reports a crash loop with the server output on the third restart" , ( ) =>
584584 Effect . scoped (
585585 Effect . gen ( function * ( ) {
586+ const message = "Error: Cannot find module 'zod/v4' in /Users/René" ;
586587 let exitCount = 0 ;
587588 const firstExit = yield * Deferred . make < void > ( ) ;
588589 const reports = yield * Queue . unbounded < {
@@ -595,9 +596,12 @@ describe("DesktopBackendManager", () => {
595596 ChildProcessSpawner . make ( ( ) =>
596597 Effect . succeed (
597598 makeProcess ( {
598- // "é" split across chunks must not decode as U+FFFD.
599+ // "é" split across chunks must not decode as U+FFFD, and the 4,000-char cut
600+ // lands inside the emoji's surrogate pair.
599601 stderr : Stream . make (
600- new TextEncoder ( ) . encode ( "Error: Cannot find module 'zod/v4' in /Users/Ren" ) ,
602+ new TextEncoder ( ) . encode (
603+ `😀${ "x" . repeat ( 3_999 - message . length ) } ${ message . slice ( 0 , - 1 ) } ` ,
604+ ) ,
601605 new Uint8Array ( [ 0xc3 ] ) ,
602606 new Uint8Array ( [ 0xa9 ] ) ,
603607 ) ,
@@ -622,7 +626,8 @@ describe("DesktopBackendManager", () => {
622626 const { exitCount : exitsWhenReported , failure } = yield * Queue . take ( reports ) ;
623627 assert . equal ( exitsWhenReported , 3 ) ;
624628 assert . equal ( failure . reason , "The server could not start (code=1)." ) ;
625- assert . include ( failure . output , "Cannot find module 'zod/v4' in /Users/René" ) ;
629+ assert . isTrue ( failure . output . endsWith ( message ) ) ;
630+ assert . isTrue ( failure . output . isWellFormed ( ) ) ;
626631 } ) . pipe ( Effect . provide ( TestClock . layer ( ) ) ) ,
627632 ) ,
628633 ) ;
0 commit comments