@@ -493,7 +493,7 @@ it.layer(layerTest)("AntigravityDriver", (it) => {
493493 ) ;
494494
495495 it . effect . skipIf ( windowsHost ) (
496- "shows the agent's error details when session creation fails and keeps the catalog" ,
496+ "reports the missing SOCKS dependency when session creation fails and keeps the catalog" ,
497497 ( ) =>
498498 Effect . gen ( function * ( ) {
499499 const h = yield * makeHarness ( ) ;
@@ -514,32 +514,38 @@ it.layer(layerTest)("AntigravityDriver", (it) => {
514514 ) ;
515515
516516 it . effect . skipIf ( windowsHost ) (
517- "bounds agent error details to one line and ignores details that are not text " ,
517+ "never copies unrecognized agent error details into the refresh error " ,
518518 ( ) =>
519519 Effect . gen ( function * ( ) {
520520 const h = yield * makeHarness ( ) ;
521+ yield * h . refresh ( ) ;
522+ const before = yield * h . instance . snapshot . getSnapshot ;
521523 const generic =
522524 "Could not refresh Antigravity models. The previous model list is unchanged." ;
523- h . controls . selected = yield * h . makeExecutable ( "runtime traceback" , {
525+ const secret = "https://accounts.example.test/o/oauth2?code=sk-secret-123" ;
526+ h . controls . selected = yield * h . makeExecutable ( "runtime socks with extra" , {
524527 newSessionErrorData : {
525- details : `Traceback (most recent call last):\n File "agent.py"\n ${ "x" . repeat ( 2_000 ) } ` ,
528+ details : `Traceback (most recent call last):\n proxy ${ secret } \npython-socks is required to use a SOCKS proxy ` ,
526529 } ,
527530 } ) ;
528- const bounded = yield * h . refresh ( ) . pipe ( Effect . flip ) ;
529- expect ( bounded . detail . startsWith ( `${ generic } Antigravity reported: Traceback` ) ) . toBe ( true ) ;
530- expect ( bounded . detail ) . not . toContain ( "\n" ) ;
531- expect ( bounded . detail . length ) . toBeLessThanOrEqual ( generic . length + 330 ) ;
532- expect ( bounded . detail . endsWith ( "…" ) ) . toBe ( true ) ;
531+ const known = yield * h . refresh ( ) . pipe ( Effect . flip ) ;
532+ expect ( known . detail ) . toBe (
533+ `${ generic } Antigravity reported: python-socks is required to use a SOCKS proxy` ,
534+ ) ;
533535
534536 for ( const [ name , data ] of [
537+ [ "runtime unknown details" , { details : `Token refresh failed for ${ secret } ` } ] ,
535538 [ "runtime object details" , { details : { stack : "secret frame" , env : { HOME : "/" } } } ] ,
536- [ "runtime blank details" , { details : " \n " } ] ,
537- [ "runtime no details" , [ "python-socks" ] ] ,
539+ [ "runtime no details" , [ "python-socks is required to use a SOCKS proxy" ] ] ,
538540 ] as const ) {
539541 h . controls . selected = yield * h . makeExecutable ( name , { newSessionErrorData : data } ) ;
540542 const error = yield * h . refresh ( ) . pipe ( Effect . flip ) ;
541543 expect ( error . detail ) . toBe ( generic ) ;
542544 }
545+ const after = yield * h . instance . snapshot . getSnapshot ;
546+ expect ( after . models ) . toEqual ( before . models ) ;
547+ expect ( after . auth ) . toEqual ( before . auth ) ;
548+ expect ( JSON . stringify ( after ) ) . not . toContain ( "sk-secret-123" ) ;
543549 yield * h . assertClosed ;
544550 } ) . pipe ( Effect . scoped ) ,
545551 ) ;
0 commit comments