@@ -498,6 +498,13 @@ it.layer(NodeServices.layer)("providerMaintenance", (it) => {
498498 real : "D:\\Tools\\Choco\\lib\\claude-code\\tools\\claude.exe" ,
499499 env : { ChocolateyInstall : "D:\\Tools\\Choco" } ,
500500 } ,
501+ {
502+ name : "a mixed-case custom root with a trailing separator" ,
503+ resolved : "D:\\Tools\\Choco\\bin\\Claude.EXE" ,
504+ real : "D:\\Tools\\Choco\\bin\\Claude.EXE" ,
505+ env : { ChocolateyInstall : "d:/tools/choco/" } ,
506+ } ,
507+ { name : "a native-looking alias" , resolved : nativeClaude , real : chocolateyPackage } ,
501508 ] as const ) ( "keeps a Chocolatey Claude install manual-only through $name" , ( fixture ) =>
502509 Effect . gen ( function * ( ) {
503510 const capabilities = yield * resolveInstall ( { definition : claudeUpdate , ...fixture } ) ;
@@ -528,7 +535,7 @@ it.layer(NodeServices.layer)("providerMaintenance", (it) => {
528535 // report an update `choco upgrade` cannot install yet.
529536 it . effect ( "compares a Chocolatey Claude install against choco search" , ( ) =>
530537 Effect . gen ( function * ( ) {
531- const probes : Array < string > = [ ] ;
538+ const probes : Array < { command : string ; args : ReadonlyArray < string > } > = [ ] ;
532539 const capabilities = yield * resolvePackageManagedProviderMaintenance ( claudeUpdate , {
533540 binaryPath : "claude" ,
534541 resolvedCommandPath : chocolateyShim ,
@@ -539,8 +546,8 @@ it.layer(NodeServices.layer)("providerMaintenance", (it) => {
539546 Effect . provideService ( HostProcess . Platform , "win32" ) ,
540547 Effect . provideService (
541548 ChildProcessSpawner . ChildProcessSpawner ,
542- stdoutSpawner ( ( command ) => {
543- probes . push ( command ) ;
549+ stdoutSpawner ( ( command , args ) => {
550+ probes . push ( { command, args } ) ;
544551 return "claude-code|2.1.304\r\n" ;
545552 } ) ,
546553 ) ,
@@ -556,9 +563,18 @@ it.layer(NodeServices.layer)("providerMaintenance", (it) => {
556563 ) ;
557564
558565 expect ( latest ) . toBe ( "2.1.304" ) ;
559- expect ( probes . map ( ( command ) => NodePath . basename ( command ) . replace ( / \. \w + $ / , "" ) ) ) . toEqual ( [
560- "choco" ,
561- ] ) ;
566+ expect ( probes . map ( ( { command } ) => NodePath . basename ( command ) . replace ( / \. \w + $ / , "" ) ) ) . toEqual (
567+ [ "choco" ] ,
568+ ) ;
569+ expect ( probes [ 0 ] ?. args ) . toEqual ( [ "search" , "claude-code" , "--exact" , "--limit-output" ] ) ;
570+ expect (
571+ createProviderVersionAdvisory ( {
572+ driver : driver ( "claudeAgent" ) ,
573+ currentVersion : "2.1.304" ,
574+ latestVersion : latest ,
575+ maintenanceCapabilities : capabilities ,
576+ } ) ,
577+ ) . toMatchObject ( { status : "current" , canUpdate : false , canInstallVersion : false } ) ;
562578 } ) . pipe ( Effect . provide ( NodeServices . layer ) ) ,
563579 ) ;
564580
0 commit comments