@@ -1916,20 +1916,6 @@ describe("MuseAdapterV2", () => {
19161916 } ) . pipe ( Effect . scoped , Effect . provide ( testLayer ) ) ,
19171917 ) ;
19181918
1919- it . effect ( "reports a compaction rejected at admission on its own terminal" , ( ) =>
1920- Effect . gen ( function * ( ) {
1921- const fake = yield * makeFakeMuse ( ) ;
1922- const harness = yield * makeHarness ( fake ) ;
1923- fake . queueResponse ( "session/compact" , new Error ( "command rejected: run_active" ) ) ;
1924- yield * harness . runtime . compactThread ! ( yield * turnInput ( harness . providerThread ) ) ;
1925- const terminal = yield * harness . takeEvent ( "turn.terminal" ) ;
1926- assert . strictEqual ( terminal . status , "failed" ) ;
1927- assert . strictEqual ( terminal . threadDisposition , "reusable" ) ;
1928- assert . include ( terminal . failure ?. message , "run_active" ) ;
1929- yield * startConversation ( harness , fake , 2 ) ;
1930- } ) . pipe ( Effect . scoped , Effect . provide ( testLayer ) ) ,
1931- ) ;
1932-
19331919 it . effect ( "treats recovering an already ended turn as done" , ( ) =>
19341920 Effect . gen ( function * ( ) {
19351921 const fake = yield * makeFakeMuse ( ) ;
@@ -2072,7 +2058,14 @@ describe("MuseAdapterV2", () => {
20722058 yield * harness . takeEvent ( "turn.terminal" ) ;
20732059 yield * fake . emit ( "turn/started" , { turnId : "background-wake" } ) ;
20742060 yield * Deferred . await ( offered ) ;
2075- fake . queueResponse ( "session/compact" , new Error ( "command rejected: run_active" ) ) ;
2061+ fake . queueResponse (
2062+ "session/compact" ,
2063+ new MspError ( {
2064+ code : - 32030 ,
2065+ message : "session/compact command rejected: invalid_target" ,
2066+ data : { kind : "commandRejected" , reason : "invalid_target" , retryable : false } ,
2067+ } ) ,
2068+ ) ;
20762069 yield * harness . runtime . compactThread ! ( yield * turnInput ( harness . providerThread , 2 ) ) ;
20772070 const terminal = yield * harness . takeEvent ( "turn.terminal" ) ;
20782071 assert . strictEqual ( terminal . status , "failed" ) ;
0 commit comments