Skip to content

Complete Windows npm shim launcher fix and regressions - #3

Merged
rodion-m merged 5 commits into
mainfrom
fix/windows-cmd-launcher-reviewed
Oct 5, 2026
Merged

rodion-m merged 5 commits into
mainfrom
fix/windows-cmd-launcher-reviewed

Conversation

@rodion-m

@rodion-m rodion-m commented Oct 5, 2026

Copy link
Copy Markdown
Member

Fixes #1. Builds on #2 by av-frox, preserving the original commits and author history.

Changes

  • Keep av-frox's same-directory extensionless fallback for npm .CMD shims; never substitute another installation from PATH.
  • Emit LF-only shell assignments from native Python. CRLF otherwise leaves a carriage return in BIN/ROLE_ID and prevents the new suffix check from matching.
  • Add platform regressions for the actual shell-assignment emitter and binary-resolution block, including paths with spaces/Unicode, Windows drive/backslash spelling, missing siblings, and non-.CMD binaries. These tests run in the existing native-Python CI matrix.
  • Integrate current main and synchronize plugin manifests at 2.0.0-beta.3.

Validation

  • Full offline regression suite: 993 passed, 0 failed.
  • Steer sub-suite: 401 passed, 0 failed.
  • Platform suite: 22 tests passed with 4 native-Windows-only skips on Linux.
  • UI observer boundary: 13 tests passed.
  • Bash syntax, git diff --check, and manifest version consistency passed.
  • The forced-CRLF regression failed on the original emitter and passed with the fix.
  • Native Windows execution is not yet verified locally.

Merge blocker

The original PR's Actions run was retried on October 5 and still could not start any jobs: GitHub reports an account billing lock. Keep this PR in draft until CI can run successfully, including Windows.

This upstream branch exists because the connected integration cannot write to the contributor's fork (403). The original PR remains open and unchanged.

av-frox and others added 5 commits September 22, 2026 12:46
The backend contract resolves CLI paths with Python's shutil.which. Under
native Windows Python that walks PATHEXT and returns the `foo.CMD` sibling
spelled with backslashes. The value is then consumed by bash, which can
neither `command -v` that path nor exec-test it: npm writes the .cmd shim
without the executable bit, and the launcher bash can use is the
extensionless name on its own PATH.

Every npm-installed backend was therefore rejected with a false
"backend CLI not found", which also masked the real backend error.

Fall back to the extensionless basename when the resolved value looks like
a path and is unusable. A bare name that resolves to nothing still fails
where it did before.

Fixes #1

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Resolve version conflicts in .claude-plugin/*.json by taking upstream
2.0.0-beta.1; the 1.3.5 bump from this branch is superseded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Re-run smoke tests after a flaky ubuntu failure caused by interleaved
writes to the fake backend argv log.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Preserve av-frox's PR #2 fix and integrate current main. Emit LF-only shell assignments from native Python, add portable platform regressions for CRLF and same-directory shim selection, and bump plugin manifests to 2.0.0-beta.3.

Local verification: offline suite 993 passed, 0 failed; steer suite 401 passed; platform suite 22 tests with 4 native-Windows-only skips; Bash syntax and diff checks passed. Native Windows and GitHub CI remain unverified because Actions jobs cannot start due to the account billing lock.
@rodion-m
rodion-m marked this pull request as ready for review October 5, 2026 07:13
@rodion-m
rodion-m merged commit 53cac66 into main Oct 5, 2026
0 of 4 checks passed
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.

Windows/Git Bash: npm .cmd-shim backends fail with false "backend CLI not found"

2 participants