@@ -201,6 +201,19 @@ describe("acpRegistrySnapshotReadiness", () => {
201201 } ) ,
202202 ) . toMatchObject ( { installed : false , version : "1.2.3" , status : "error" } ) ;
203203
204+ expect (
205+ acpRegistrySnapshotReadiness ( {
206+ status : "missing_runner" ,
207+ version : null ,
208+ distribution : "local" ,
209+ } ) ,
210+ ) . toEqual ( {
211+ installed : false ,
212+ version : null ,
213+ status : "error" ,
214+ message : "Local ACP executable is not available on this environment's PATH." ,
215+ } ) ;
216+
204217 expect (
205218 acpRegistrySnapshotReadiness ( {
206219 status : "unprepared" ,
@@ -312,49 +325,57 @@ describe("acpRegistrySnapshotReadiness", () => {
312325 expect ( snapshot . models [ 0 ] ?. isDefault ) . toBe ( true ) ;
313326 } ) ;
314327
315- it ( "reports failed authentication without hiding successful local inspection" , ( ) => {
316- const snapshot = buildCheckedAcpRegistrySnapshot ( {
317- ...identity ,
318- settings : decodeSettings ( { agentId : "test-agent" , authMethodId : "grok-login" } ) ,
319- checkedAt : "2026-08-13T10:00:00.000Z" ,
320- inspection : {
321- status : "ready" ,
322- agentId : "test-agent" ,
323- version : "1.0.0" ,
324- distribution : "binary" ,
325- } ,
326- probeError : new AcpRegistryOperationError ( {
327- reason : "authentication_failed" ,
328- message : "Login required." ,
329- authMethods : [
330- {
331- id : "api-key" ,
332- name : "API key" ,
333- description : null ,
334- type : "env_var" ,
335- } ,
336- {
337- id : "grok-login" ,
338- name : "Log in with Grok" ,
339- description : null ,
340- type : "agent" ,
341- } ,
342- ] ,
343- } ) ,
344- } ) ;
328+ it . each ( [ "registry" , "local" ] as const ) (
329+ "reports failed authentication after successful %s inspection" ,
330+ ( source ) => {
331+ const snapshot = buildCheckedAcpRegistrySnapshot ( {
332+ ...identity ,
333+ settings : decodeSettings ( {
334+ source,
335+ ...( source === "local" ? { commandPath : "test-agent" } : { agentId : "test-agent" } ) ,
336+ authMethodId : "grok-login" ,
337+ } ) ,
338+ checkedAt : "2026-08-13T10:00:00.000Z" ,
339+ inspection : {
340+ status : "ready" ,
341+ agentId : "test-agent" ,
342+ version : source === "local" ? null : "1.0.0" ,
343+ distribution : source === "local" ? "local" : "binary" ,
344+ } ,
345+ probeError : new AcpRegistryOperationError ( {
346+ reason : "authentication_failed" ,
347+ message : "Login required." ,
348+ authMethods : [
349+ {
350+ id : "api-key" ,
351+ name : "API key" ,
352+ description : null ,
353+ type : "env_var" ,
354+ } ,
355+ {
356+ id : "grok-login" ,
357+ name : "Log in with Grok" ,
358+ description : null ,
359+ type : "agent" ,
360+ } ,
361+ ] ,
362+ } ) ,
363+ } ) ;
345364
346- expect ( snapshot ) . toMatchObject ( {
347- installed : true ,
348- version : "1.0.0" ,
349- status : "warning" ,
350- auth : {
351- status : "unauthenticated" ,
352- type : "agent" ,
353- label : "Log in with Grok" ,
354- } ,
355- message : 'Sign in in provider settings using "Log in with Grok".' ,
356- } ) ;
357- } ) ;
365+ expect ( snapshot ) . toMatchObject ( {
366+ installed : true ,
367+ version : source === "local" ? null : "1.0.0" ,
368+ status : "warning" ,
369+ setup : { canAuthenticate : true } ,
370+ auth : {
371+ status : "unauthenticated" ,
372+ type : "agent" ,
373+ label : "Log in with Grok" ,
374+ } ,
375+ message : 'Sign in in provider settings using "Log in with Grok".' ,
376+ } ) ;
377+ } ,
378+ ) ;
358379
359380 it . effect ( "runs the disposable probe only after local inspection is ready" , ( ) =>
360381 Effect . gen ( function * ( ) {
0 commit comments