feat: add fixed-home primary launcher selectors#879
Open
LucasOl1337 wants to merge 13 commits into
Open
Conversation
LucasOl1337
marked this pull request as ready for review
July 22, 2026 23:28
5 tasks
Owner
|
Automated reminder: thanks for the PR! This branch currently has a merge conflict with the base branch. When you get a chance, please rebase onto (or merge) the latest base branch, resolve the conflict, and push. After that, checks will re-run and the PR will get looked at again. Noted for firstmate#879 at |
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
Let the captain launch the same fixed Firstmate operational home and durable memory from Windows PowerShell using bare firstmate or explicit --codex, --pi, --grok, --claude, and --opencode selectors, with optional harness-supported model and effort axes. Preserve bare Codex's backwards-compatible unrestricted posture while keeping alternate harness permissions explicit and normal, use a fixed launcher-owned Grok instruction to run session start exactly once, reject ambiguous or unsafe input, and prevent a divergent harness from attaching to or replacing an active same-home primary. Keep WSL distribution Ubuntu, Linux user firstmate, repository root and FM_HOME /home/firstmate/firstmate, tmux identity, and session lock fixed. Include a safe recoverable PowerShell Windows wrapper and an explicit cmd.exe refusal shim; all supported launch forms are PowerShell-only. Do not modify live local launchers or global harness configuration in the tracked change. Produce a draft PR and do not merge.
What Changed
Risk Assessment
✅ Low: The focused fix safely removes the undeclared Python dependency using equivalent read-only process inspection without changing launcher behavior.
Testing
Diff inspection, focused automated tests, real isolated tmux launch/attach/refusal flows, native Windows PowerShell validation, manual CLI evidence, and draft-PR verification all succeeded. Herdr-only AFK coverage skipped because Herdr is unavailable, but the relevant tmux end-to-end path passed. No screenshot was produced because this is a CLI/PowerShell change with no rendered UI; reviewer-visible transcripts capture the actual surface.
Evidence: Focused behavior test transcript
/tmp/no-mistakes-evidence/01KY5ZGGSH6HK1YJRY4T59538N/cli-user-experience.txt)Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 2 issues found → auto-fixed ✅
windows/firstmate.ps1:12- Intent requires PowerShell to preserve arbitrary model/effort values as opaque arguments, but& wsl.exe @wslArgspasses them through PowerShell's native-command serialization, which can alter embedded quotes or empty arguments on Windows PowerShell and legacy PowerShell 7 modes. The added test only copies values between PowerShell arrays and never exercises thewsl.exeboundary. Use a lossless transport such as encoded arguments, or explicitly reject values that cannot be forwarded safely.bin/fm-harness-process.sh:12- Harness identification now unconditionally invokespython3, although Python is not checked or documented as a launcher prerequisite. On an otherwise supported WSL installation without Python, every lock holder appears stale and new sessions cannot acquire the authoritative lock, causing the launcher to kill them after its timeout. Usereadlinkdirectly or fail early with an actionable prerequisite error.🔧 Fix: Remove Python dependency from harness process identification
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
Inspectedgit diff 554983438606101316cb23726bdf80d4ae2f9a6b..90155f296a82995ae4e036995c8b312787eb39aaagainst the supplied user intent.bin/fm-test-run.sh tests/fm-primary-launch.test.sh tests/fm-primary-windows.test.sh tests/fm-grok-harness.test.sh tests/fm-afk-launch.test.sh tests/fm-test-run.test.shbin/fm-test-run.sh --list --changed --base 554983438606101316cb23726bdf80d4ae2f9a6bManual CLI checks:bin/fm-primary-launch.sh --help, conflicting selectors, model without selector, nativepowershell.exe -File tests/fm-primary-windows.test.ps1, andcmd.exe /c windows\firstmate.cmd.gh-axi pr view 879verified the PR is open, draft, and unmerged.git status --shortverified testing left the worktree clean.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.