feat: add Windows-to-WSL launcher bridge - #1400
Open
sbracewell64 wants to merge 4 commits into
Open
Conversation
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Implement the Windows-to-WSL launcher bridge for Firstmate by adding the repository-root firstmate.bat and bin/fm-wsl-entry.sh, so a Windows double-click reaches the existing bin/fm-launch.sh harness menu and Herdr launch/attach flow. The bridge must handle Windows repository paths containing spaces, enter WSL deterministically without relying on a login shell or caller working directory, propagate launcher arguments and exit status, and print actionable failures that remain visible after a double-click. Add executable regression coverage for the WSL entry and native batch command construction without requiring a live Windows/WSL session, plus current operator and contributor documentation. This is a new upstream contribution based only on origin/main; the pending launcher PR is a dependency and none of its commits may be copied into this branch. Keep the diff limited to the bridge, its tests/CI coverage, and documentation required to register and operate it. Do not place a launcher in E:/Agentic Engineering or retire any platform launcher in this change.
What Changed
Risk Assessment
✅ Low: The bridge is well-bounded, satisfies the source-verifiable intent, preserves the pending launcher as an uncopied dependency, and includes appropriate portable and native Windows regression coverage.
Testing
Inspected the base-to-target scope and ancestry, ran the focused bridge suite twice—including its native Windows cmd.exe path—manually captured both sides of the bridge with nonzero status propagation and reviewer-visible CLI transcripts, verified CRLF/LF checkout behavior, and confirmed testing left the worktree clean; all targeted checks passed. No screenshot was captured because the changed end-user surface is a terminal launcher, for which exact native command transcripts are the direct rendered evidence.
Evidence: Native Windows batch command construction
arg1=[--cd] arg2=[\wsl.localhost\Ubuntu\tmp\no-mistakes-evidence\01KYWDZ0HAM6ZWX4JPBAGY4WE4\fm-wsl-entry.1Z36Z0\batch case\Firstmate root with spaces.] arg3=[--exec] arg4=[/bin/bash] arg5=[./bin/fm-wsl-entry.sh] arg6=[--print-menu] arg7=[two words]Evidence: Double-click-visible actionable failure
Firstmate could not start through WSL. Exit status: 37 Review the error above. If WSL itself did not start, run "wsl --install" and retry.Evidence: WSL entry-to-launcher behavior
cwd=[/tmp/no-mistakes-evidence/01KYWDZ0HAM6ZWX4JPBAGY4WE4/fm-wsl-entry.1Z36Z0/Firstmate repo with spaces] arg1=[--print-menu] arg2=[value with spaces] arg3=[]Evidence: Focused bridge test log
All focused launcher checks passed, including native cmd.exe execution.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.
git diff --check f7d0d0a703a717880656709d7906615505b3f2c0..717739bbca8b9b800acf53491d23fcbd8bef453ebash tests/fm-wsl-entry.test.shTMPDIR=/tmp/no-mistakes-evidence/01KYWDZ0HAM6ZWX4JPBAGY4WE4 bash tests/fm-wsl-entry.test.shNativecmd.exe /d /c run-test.cmdexecution using the suite’s fake WSL seam; verified spaced--cd, direct/bin/bash, entry script, forwarded arguments, visible repair text, and exit status 37Directbin/fm-wsl-entry.sh --print-menu "value with spaces" ""fixture execution from/; verified repository resolution and exit status 23file firstmate.bat bin/fm-wsl-entry.shandgit check-attr eol -- firstmate.bat bin/fm-wsl-entry.shAncestry/scope checks withgit merge-base --is-ancestor,git diff --name-only, andgit diff --quiet ... -- bin/fm-launch.shgit status --shortafter testing✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.