@@ -137,7 +137,7 @@ describe("native hook relay CLI", () => {
137137 expect ( callGateway ) . not . toHaveBeenCalled ( ) ;
138138 } ) ;
139139
140- it ( "renders unavailable output for legacy relay commands without a generation" , async ( ) => {
140+ it ( "does not block PreToolUse for legacy relay commands without a generation" , async ( ) => {
141141 const invokeBridge = vi . fn ( async ( ) => {
142142 throw new Error ( "generation must be non-empty string" ) ;
143143 } ) ;
@@ -159,13 +159,7 @@ describe("native hook relay CLI", () => {
159159 ) ;
160160
161161 expect ( exitCode ) . toBe ( 0 ) ;
162- expect ( JSON . parse ( stdout . text ( ) ) ) . toEqual ( {
163- hookSpecificOutput : {
164- hookEventName : "PreToolUse" ,
165- permissionDecision : "deny" ,
166- permissionDecisionReason : "Native hook relay unavailable" ,
167- } ,
168- } ) ;
162+ expect ( stdout . text ( ) ) . toBe ( "" ) ;
169163 expect ( stderr . text ( ) ) . toContain ( "native hook relay unavailable" ) ;
170164 expect ( stderr . text ( ) ) . toContain ( "generation must be non-empty string" ) ;
171165 expect ( callGateway ) . toHaveBeenCalledWith (
@@ -256,7 +250,7 @@ describe("native hook relay CLI", () => {
256250 expect ( callGateway ) . not . toHaveBeenCalled ( ) ;
257251 } ) ;
258252
259- it ( "fails closed for PreToolUse when the gateway relay is unavailable" , async ( ) => {
253+ it ( "does not block PreToolUse when the gateway relay is unavailable" , async ( ) => {
260254 const callGateway = vi . fn ( async ( ) => {
261255 throw new Error ( "gateway closed" ) ;
262256 } ) ;
@@ -274,13 +268,7 @@ describe("native hook relay CLI", () => {
274268 ) ;
275269
276270 expect ( exitCode ) . toBe ( 0 ) ;
277- expect ( JSON . parse ( stdout . text ( ) ) ) . toEqual ( {
278- hookSpecificOutput : {
279- hookEventName : "PreToolUse" ,
280- permissionDecision : "deny" ,
281- permissionDecisionReason : "Native hook relay unavailable" ,
282- } ,
283- } ) ;
271+ expect ( stdout . text ( ) ) . toBe ( "" ) ;
284272 expect ( stderr . text ( ) ) . toContain ( "native hook relay unavailable" ) ;
285273 } ) ;
286274
0 commit comments