Repository navigation
fix(desktop/windows): check-agent-deps also verifies the Claude Code … - #10399
undivisible merged 1 commit into
Conversation
kodjima33
left a comment
There was a problem hiding this comment.
Windows check-agent-deps fix — approved; held from merge on red Hygiene check
2ba6ff5 to
98adb79
Compare
…executable check-agent-deps verifies the coding-agent JS packages resolve, but the Claude Code EXECUTABLE (claude.exe, ~235 MB, spawned by the Claude Agent SDK for every agent turn — SDK 0.3.205 ships no JS fallback) lives in the binary-only optionalDependency @anthropic-ai/claude-agent-sdk-win32-x64: a failed download leaves `pnpm install` exiting 0 and import.meta.resolve() can't see a package with no JS entry. The result is an app where the ACP initialize handshake succeeds and every real task fails to spawn. This failure shape was hit live during the PR BasedHardware#9304 review (flaky network, empty residual .pnpm directory, exit 0), and the reviewer validated this exact check logic against that broken tree on the routing branch. scripts/claude-binary-check.mjs (pure, unit-tested) locates claude.exe in the flattened or pnpm virtual-store layout — requiring the binary itself, so an empty residual store directory doesn't pass — and rejects truncated (<50 MB) downloads; check-agent-deps.mjs reports it through its existing missing-deps path. Non-Windows installs skip. Verification: node scripts/check-agent-deps.mjs on a clean pnpm@10 hoisted install — OK (finds the real 236 MB binary); vitest scripts/claude-binary-check.test.mjs — 6 passed (absent package, empty residual virtual-store dir, truncated download, flattened + store layouts, non-Windows skip); eslint clean; full postinstall chain (incl. verify-pimono-unpack) green with the check wired in. Failure-Class: none Co-Authored-By: Claude Fable 5 <[email protected]>
98adb79 to
c6d7048
Compare
|
Thanks for tightening this Windows agent install guard. The implementation looks well-scoped: the binary check is side-effect-free/testable, covers both flattened and pnpm virtual-store layouts, catches empty residual store dirs and truncated downloads, and skips non-Windows installs. I also ran the targeted Vitest suite locally against this head and it passed (6/6). I’m not formally approving because this touches the Windows postinstall/agent dependency path and the current Hygiene check is red. The failing guard is by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Follow-up to #9304 / #9302, closing the one gap from that review cycle still open on main.
scripts/check-agent-deps.mjsverifies the coding-agent JS packages resolve, but theClaude Code executable (
claude.exe, ~235 MB — spawned by the Claude Agent SDK forevery agent turn; SDK 0.3.205 ships no JS fallback) lives in the binary-only
optionalDependency
@anthropic-ai/claude-agent-sdk-win32-x64: a failed download leavespnpm installexiting 0, andimport.meta.resolve()can't see a package with no JSentry. Result: an app where the ACP initialize handshake succeeds and every real agent
task fails to spawn. This exact failure shape occurred live during the #9304 review
(flaky network → error 23 → empty residual
.pnpmdirectory → exit 0), and the reviewervalidated this check's logic against that broken tree at the time.
scripts/claude-binary-check.mjs(pure, unit-tested): locatesclaude.exein theflattened or pnpm virtual-store layout — requiring the binary itself, so an empty
residual store directory doesn't pass — and rejects truncated (<50 MB) downloads.
check-agent-deps.mjsreports it through its existing missing-deps path (so it runsat postinstall and standalone, same as today). Non-Windows installs skip.
Test plan
node scripts/check-agent-deps.mjson a clean pnpm@10 hoisted install — OK,finds the real 236 MB binary
vitest run scripts/claude-binary-check.test.mjs— 6 passed (absent package,empty residual virtual-store dir, truncated download, both layouts, non-Windows skip)
Failure-Class: none