@@ -57,7 +57,7 @@ describe("runGuardedShell", () => {
5757 const feed = createShellOutputFeed ( ) ;
5858 let finished = false ;
5959 const running = runGuardedShell (
60- { command : "echo first; sleep 0.02; echo second; sleep 0.4 " } ,
60+ { command : "echo first; sleep 0.02; echo second; sleep 0.2 " } ,
6161 neverAbort ( ) ,
6262 undefined ,
6363 undefined ,
@@ -85,7 +85,7 @@ describe("runGuardedShell", () => {
8585 test ( "omitted timeout does not arm a timer" , async ( ) => {
8686 const start = Date . now ( ) ;
8787 const { exitCode, timedOut, output } = await runGuardedShell (
88- { command : "sleep 0.25 ; echo done" } ,
88+ { command : "sleep 0.1 ; echo done" } ,
8989 neverAbort ( ) ,
9090 ) ;
9191 expect ( timedOut ) . toBe ( false ) ;
@@ -118,7 +118,7 @@ describe("runGuardedShell", () => {
118118 test ( "returns partial output and a timed-out flag instead of throwing" , async ( ) => {
119119 const start = Date . now ( ) ;
120120 const { exitCode, timedOut, output } = await runGuardedShell (
121- { command : "echo early; sleep 60" , timeout : 200 } ,
121+ { command : "echo early; sleep 60" , timeout : 100 } ,
122122 neverAbort ( ) ,
123123 ) ;
124124 expect ( timedOut ) . toBe ( true ) ;
@@ -350,7 +350,7 @@ describe("background run_shell (shellGuardPlugin)", () => {
350350 const result = await runWith ( registry , {
351351 id : "bg1" ,
352352 name : "run_shell" ,
353- arguments : { command : "sleep 0.2 ; echo finished" , background : true } ,
353+ arguments : { command : "sleep 0.05 ; echo finished" , background : true } ,
354354 } ) ;
355355 expect ( result . isError ) . toBeUndefined ( ) ;
356356 const parsed = JSON . parse ( String ( result . content ) ) as {
@@ -656,11 +656,11 @@ describe("shellGuardPlugin", () => {
656656 const result = await run ( {
657657 id : "c2" ,
658658 name : "run_shell" ,
659- arguments : { command : "echo before; sleep 60" , timeout : 120 } ,
659+ arguments : { command : "echo before; sleep 60" , timeout : 80 } ,
660660 } ) ;
661661 expect ( result . isError ) . toBeUndefined ( ) ;
662662 expect ( result . content ) . toContain ( "before" ) ;
663- expect ( result . content ) . toMatch ( / t i m e d o u t a f t e r 1 2 0 m s a n d w a s t e r m i n a t e d / ) ;
663+ expect ( result . content ) . toMatch ( / t i m e d o u t a f t e r 8 0 m s a n d w a s t e r m i n a t e d / ) ;
664664 expect ( result . content ) . toContain ( "background:true" ) ;
665665 } ) ;
666666
@@ -684,13 +684,13 @@ describe("shellGuardPlugin", () => {
684684
685685 test ( "applies a configured default timeout when none is passed" , async ( ) => {
686686 const handler = defined (
687- shellGuardPlugin ( process . cwd ( ) , { defaultMs : 90 } ) . middleware ,
687+ shellGuardPlugin ( process . cwd ( ) , { defaultMs : 60 } ) . middleware ,
688688 ) ( fallback ) ;
689689 const result = await handler (
690690 { id : "c2c" , name : "run_shell" , arguments : { command : "sleep 60" } } ,
691691 neverAbort ( ) ,
692692 ) ;
693- expect ( result . content ) . toMatch ( / t i m e d o u t a f t e r 9 0 m s / ) ;
693+ expect ( result . content ) . toMatch ( / t i m e d o u t a f t e r 6 0 m s / ) ;
694694 } ) ;
695695
696696 test ( "omitted timeout with no settings default still completes a short command" , async ( ) => {
@@ -701,7 +701,7 @@ describe("shellGuardPlugin", () => {
701701 {
702702 id : "c2d" ,
703703 name : "run_shell" ,
704- arguments : { command : "sleep 0.2 ; echo ok" } ,
704+ arguments : { command : "sleep 0.05 ; echo ok" } ,
705705 } ,
706706 neverAbort ( ) ,
707707 ) ;
@@ -1044,7 +1044,7 @@ describe("shellGuardPlugin", () => {
10441044
10451045 test ( "treats timeout 0 as the configured default" , async ( ) => {
10461046 const handler = defined (
1047- shellGuardPlugin ( process . cwd ( ) , { defaultMs : 90 , maxMs : 100 } ) . middleware ,
1047+ shellGuardPlugin ( process . cwd ( ) , { defaultMs : 60 , maxMs : 70 } ) . middleware ,
10481048 ) ( fallback ) ;
10491049 const result = await handler (
10501050 {
@@ -1054,7 +1054,7 @@ describe("shellGuardPlugin", () => {
10541054 } ,
10551055 neverAbort ( ) ,
10561056 ) ;
1057- expect ( result . content ) . toMatch ( / t i m e d o u t a f t e r 9 0 m s / ) ;
1057+ expect ( result . content ) . toMatch ( / t i m e d o u t a f t e r 6 0 m s / ) ;
10581058 } ) ;
10591059
10601060 test ( "returns promptly when the search tool ignores the budget" , async ( ) => {
0 commit comments