Skip to content

Fix stale Windows shim test and PATH comment - #6958

Merged
aponcedeleonch merged 1 commit into
mainfrom
fix-windows-claude-desktop-shim-followup
Oct 27, 2026
Merged

aponcedeleonch merged 1 commit into
mainfrom
fix-windows-claude-desktop-shim-followup

Conversation

@aponcedeleonch

Copy link
Copy Markdown
Member

Summary

Follow-up to #6516, covering review comments that were still open when it merged.

  • Why: Add Windows Claude Desktop credential helper #6516 dropped call from the Windows Claude Desktop shim, but TestConfigureCredentialHelper_WritesConfigMetaAndShim still asserts call "<thv>" llm token on Windows. That contradicts the NotContains(shim, "call ") check in TestWriteCredentialHelperShim_UsesAbsolutePath, so the test fails on Windows. CI has no Windows runner, which is why it got through.
  • What: the Windows branch of that test now asserts direct invocation ("<thv>" llm token) and that call is absent.
  • Why: the writeCredentialHelperShim doc comment says explorer-launched apps on Windows don't get thv's install directory on PATH. They do get the user's PATH from the registry.
  • What: the comment now gives the actual reason for the absolute path on Windows. Nothing guarantees thv is on PATH, and the absolute path pins the thv that ran setup.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

  • Unit tests (task test)
  • E2E tests (task test-e2e)
  • Linting (task lint-fix)
  • Manual testing (describe below)

task test on macOS: pkg/client passes. The run had failures in unrelated packages (pkg/desktop, pkg/networking port 8090 in use, pkg/plugins/pluginsvc, and a live OpenAI test out of quota), all local-environment issues outside the files touched here. The changed assertion only runs on Windows, and I couldn't run it locally. task lint-fix didn't run locally because the local golangci-lint was built with an older Go than the installed toolchain. CI will lint.

Special notes for reviewers

This doesn't settle the remaining open question from the #6516 review: whether Claude Desktop actually spawns a .cmd credential helper on Windows. If it spawns the helper without a shell, Node rejects .cmd files. Setup would then succeed, but every token fetch would fail. That needs an end-to-end check on a Windows machine with Claude Desktop installed.

🤖 Generated with Claude Code

#6516 dropped `call` from the Windows Claude Desktop shim, but
TestConfigureCredentialHelper_WritesConfigMetaAndShim still asserted
`call "<thv>" llm token` on Windows. That contradicts the NotContains
check in TestWriteCredentialHelperShim_UsesAbsolutePath, so the test
fails on Windows. CI has no Windows runner, so it went unnoticed.

Also correct the shim doc comment: explorer-launched apps on Windows
do get the user's PATH. The absolute path is still right because it
does not depend on thv being on PATH and pins the thv that ran setup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Oct 27, 2026
@aponcedeleonch
aponcedeleonch merged commit bd6baa1 into main Oct 27, 2026
25 of 26 checks passed
@aponcedeleonch
aponcedeleonch deleted the fix-windows-claude-desktop-shim-followup branch October 27, 2026 14:11
@github-actions github-actions Bot mentioned this pull request Oct 28, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants