Skip to content

fix(bin): skip WSL Windows-interop copies in tool update check - #319

Merged
sKeLe100 merged 2 commits into
mainfrom
fm/tool-updates-windows-claude-shim
Nov 23, 2026
Merged

sKeLe100 merged 2 commits into
mainfrom
fm/tool-updates-windows-claude-shim

Conversation

@sKeLe100

Copy link
Copy Markdown
Owner

Intent

Seen 2026-11-22 5:47 PM ET: the tool-update check woke firstmate with "claude check failed: /mnt/c/Users/sean_/AppData/Roaming/npm/claude did not report a version". The native claude (/.local/bin/claude) works. The checker should not probe Windows-interop binaries under /mnt/c (they come from WSL's appended Windows PATH and are not the tools firstmate runs).

What Changed

  • bin/fm-tool-update-check.sh: added is_windows_interop_path, and path_hits now skips any PATH directory under /mnt/<drive> (the Windows PATH that WSL appends). Those copies are no longer probed for a version, counted as installed copies, or reported as "did not report a version". The mount root can be overridden with FM_TOOL_UPDATE_WSL_MNT_ROOT, which is meant for tests only. The header comments describe the new behaviour.
  • docs/configuration.md: the tool-update section now says that WSL Windows-interop copies under /mnt/<drive>/ are skipped. The edit replaces the line that said the script only reports and never installs or updates tools, and the paragraph's preceding sentence is now repeated nearly verbatim.
  • tests/fm-tool-update-check.test.sh: added 25 lines of test coverage for the new skip behaviour.

Risk Assessment

✅ Low: The change is a narrow PATH-directory filter that skips WSL /mnt/ entries before probing, and it matches the stated intent. The new test reproduces the reported failure with the interop copy first on PATH.

Testing

The tool-update check test file passes. Its new test puts a version-less Windows-interop copy first on PATH and a working native copy second. The check stays silent, with no 'check failed' line. I also ran the script at the base and fixed commits against the real PATH with the Windows claude shim first; both were silent. On this machine the shim does answer --version (2.1.221, against 2.1.330 for the native claude), so the 'did not report a version' failure did not reproduce. The fixture test is the evidence that the fix covers that failure.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Windows-interop claude copy under /mnt/<drive> that reports no version is skipped and does not fail the check (fixture mount root) ✅ pass live tests/fm-tool-update-check.test.sh output: 'ok - a Windows-interop copy under /mnt/<drive> is never probed or counted'
Real PATH with the actual /mnt/c npm claude shim first and native ~/.local/bin/claude second produces no failure report ✅ pass live live.txt: the fixed script exited 0 and printed nothing.
Evidence: live base vs fixed run

Source: live base vs fixed run

== BASE ==
rc=0
== FIXED ==
rc=0
windows shim: 2.1.221 ; native: 2.1.330 ; both base and fixed check silent (rc=0) here; unit test test_windows_interop_copy_is_never_a_candidate passes

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 2 of 2 scenarios driven live against the product
Scenario Result Live Evidence
Windows-interop claude copy under /mnt/<drive> that reports no version is skipped and does not fail the check (fixture mount root) ✅ pass live tests/fm-tool-update-check.test.sh output: 'ok - a Windows-interop copy under /mnt/<drive> is never probed or counted'
Real PATH with the actual /mnt/c npm claude shim first and native ~/.local/bin/claude second produces no failure report ✅ pass live live.txt: the fixed script exited 0 and printed nothing.
  • bin/fm-test-run.sh --changed --exclude-family real-herdr-gated --exclude-quarantined --pc02-if-idle
  • bash tests/fm-tool-update-check.test.sh (includes test_windows_interop_copy_is_never_a_candidate)
  • Ran bin/fm-tool-update-check.sh at the base commit and at the fixed commit against the real PATH, with the real /mnt/c npm claude shim first and ~/.local/bin/claude after it
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

@sKeLe100
sKeLe100 merged commit 968740b into main Nov 23, 2026
25 checks passed
sKeLe100 pushed a commit that referenced this pull request Nov 23, 2026
…he upstream catch-up

Fork main moved from 397c859 to 968740b while the catch-up branch was
in validation, leaving the PR in conflict with its base. This is a true
merge of origin/main into the branch, never a rebase, so the 221-commit
upstream merge and its resolution commits stay intact.

Three conflicts, each an additive same-spot insertion kept on both sides:
- .agents/skills/operational-home-layout/SKILL.md: the branch's
  ready-after-green, record-export-root and status-archive rows plus
  main's underused-capacity-threshold row (#316), in sorted order.
- bin/fm-test-run.sh: the branch's fm-capacity.sh and
  fm-lane-vitals-lib.sh mapping arms plus main's
  fm-dispatch-calibration.sh and fm-llm-usage-lib.sh arms (#318).
- tests/fm-tool-update-check.test.sh: upstream's
  test_a_failing_probe_still_reports_its_version plus main's
  test_windows_interop_copy_is_never_a_candidate (#319), both run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant