File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,6 +63,23 @@ import { MAX_AGENT_HOOK_HISTORY_MESSAGES } from "./harness/hook-history.js";
6363
6464const MAX_CLI_SESSION_HISTORY_MESSAGES = MAX_AGENT_HOOK_HISTORY_MESSAGES ;
6565
66+ // Gateway unit coverage owns quiet-admission timing. These reliability cases only
67+ // need to drain calls already in flight, so skip the repeated 250 ms quiet window.
68+ vi . mock ( "../gateway/mcp-http.loopback-runtime.js" , async ( importOriginal ) => {
69+ const actual = await importOriginal < typeof import ( "../gateway/mcp-http.loopback-runtime.js" ) > ( ) ;
70+ return {
71+ ...actual ,
72+ waitForMcpLoopbackToolCallCaptureIdle : (
73+ captureKey : string ,
74+ options : Parameters < typeof actual . waitForMcpLoopbackToolCallCaptureIdle > [ 1 ] ,
75+ ) =>
76+ actual . waitForMcpLoopbackToolCallCaptureIdle ( captureKey , {
77+ ...options ,
78+ admissionGraceMs : 0 ,
79+ } ) ,
80+ } ;
81+ } ) ;
82+
6683vi . mock ( "../plugins/hook-runner-global.js" , ( ) => ( {
6784 getGlobalHookRunner : vi . fn ( ( ) => null ) ,
6885} ) ) ;
Original file line number Diff line number Diff line change @@ -65,6 +65,23 @@ import { setCliRunnerPrepareTestDeps } from "./cli-runner/prepare.js";
6565import type { PreparedCliRunContext } from "./cli-runner/types.js" ;
6666import { createClaudeApiErrorFixture } from "./test-helpers/claude-api-error-fixture.js" ;
6767
68+ // Gateway unit coverage owns quiet-admission timing. These spawn cases only
69+ // need to drain calls already in flight, so skip the repeated 250 ms quiet window.
70+ vi . mock ( "../gateway/mcp-http.loopback-runtime.js" , async ( importOriginal ) => {
71+ const actual = await importOriginal < typeof import ( "../gateway/mcp-http.loopback-runtime.js" ) > ( ) ;
72+ return {
73+ ...actual ,
74+ waitForMcpLoopbackToolCallCaptureIdle : (
75+ captureKey : string ,
76+ options : Parameters < typeof actual . waitForMcpLoopbackToolCallCaptureIdle > [ 1 ] ,
77+ ) =>
78+ actual . waitForMcpLoopbackToolCallCaptureIdle ( captureKey , {
79+ ...options ,
80+ admissionGraceMs : 0 ,
81+ } ) ,
82+ } ;
83+ } ) ;
84+
6885vi . mock ( "../plugin-sdk/anthropic-cli.js" , ( ) => ( {
6986 CLAUDE_CLI_BACKEND_ID : "claude-cli" ,
7087 isClaudeCliProvider : ( providerId : string ) => providerId === "claude-cli" ,
You can’t perform that action at this time.
0 commit comments