Repository navigation
fix: handle Cygwin process identity safely - #1
Merged
Merged
Conversation
added 6 commits
July 16, 2026 13:14
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
Fix Firstmate process identity handling on Git Bash/Cygwin ps 3.6.6, which lacks procps -o support, so watcher supervision can verify a live PID with a stable identity and fleet locking does not falsely claim another live session. Preserve existing Linux/WSL behavior. Use Cygwin-supported -l/-f parsing with WINPID in the watcher identity, cover every production ps -o call sharing the root cause, and test both visible Cygwin ancestry and the confirmed native Windows harness topology where Cygwin exposes no parent link. For that irreducible cross-namespace gap, fail safely in read-only mode with explicit identity-unavailable wording that does not assert a conflict; do not change the lock file format or weaken real conflict detection.
What Changed
Captain, the full branch delta:
ps -l/ps -ffields while preserving formattedps -obehavior on Linux, WSL, and other supported systems.Risk Assessment
✅ Low: Captain, the change is well-bounded, preserves existing behavior, safely handles unavailable Cygwin ancestry, and introduces no substantiated material risks.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"🔧 Fix: Captain, fix process-helper fixtures and watcher race
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"🔧 Fix: Captain, fix Cygwin Pi ancestry and portable tests
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"🔧 Fix: Captain, include process helper in backend fixture
1 error still open:
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"✅ **Document** - passed
✅ No issues found.
🔧 Fix: Captain: lint passes without source changes
1 warning still open:
🔧 Fix: Captain: lint blocked by missing ShellCheck 0.11.0
1 warning still open:
🔧 Fix: Captain: lint passes with pinned ShellCheck
1 warning still open:
✅ **Push** - passed
✅ No issues found.