fix(lock): distinguish denied ps from a held session lock#390
fix(lock): distinguish denied ps from a held session lock#390milesangelo wants to merge 3 commits into
Conversation
9af39de to
5b23623
Compare
|
Rebased onto the latest main to clear the merge conflict. The only real collision was in docs/scripts.md: this branch rewrote the fm-session-start.sh row to document the new FM_LOCK_REASON banner branching, while main (via #411) had added atomic-multi-ID-mv to the adjacent fm-bootstrap.sh row. Resolution keeps both — this branch's session-start wording and main's bootstrap wording. The other four touched files auto-merged cleanly. All checks green after the rebase (Lint, no-mistakes gate, Behavior tests, Repo invariants); tests/fm-lock.sh and the added fm-session-start cases pass locally. No behavior or scope change from the rebase — same 9 files, same fix for #306. |
|
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#390 at |
5b23623 to
611c6a4
Compare
|
Resolved! Thanks for the eyes on this! |
|
using firstmate to pr on firstmate - you've created an intelligent and experience changing tool - ty! |
|
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#390 at |
611c6a4 to
f6a41cc
Compare
|
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#390 at |
fm-lock.sh's acquire failure conflated three causes, so a Codex-sandbox ps denial was reported as another live session holding the fleet lock. Classify the cause and emit a stable FM_LOCK_REASON=<lock-held|ps-unavailable| harness-detect-failed> token to stderr (exit 1 preserved), and branch the session-start banner: only lock-held claims another session; ps-unavailable/ harness-detect-failed print an honest identity-unverifiable banner that still refuses to mutate fleet state and points at fm-lock.sh status plus session/ process discovery.
f6a41cc to
4182791
Compare
What Changed
fm-lock.shnow classifies acquisition failures and prints a stableFM_LOCK_REASON=<reason>line to stderr —lock-held,ps-unavailable, orharness-detect-failed— withharness_pid()reporting throughHARNESS_PID/HARNESS_FAIL_REASONglobals so a denied/failedps(e.g. a Codex sandbox) is no longer conflated with a clean ancestry walk that found no harness.fm-session-start.shparses that reason to branch its read-only banner and NEXT STEP text: onlylock-heldprints the "another session holds the fleet lock" wording, while an unidentifiable-session reason prints an honest identity-unverifiable banner withbin/fm-lock.sh statusplus session/process discovery commands, and both still skip every mutating step.tests/fm-lock.test.shand cases intests/fm-session-start.test.shcovering the reason classification and banner branching, and syncedAGENTS.md,CONTRIBUTING.md, and thedocs/references to the new behavior.Risk Assessment
✅ Low: A well-bounded, thoroughly tested correctness fix that only refines failure classification and banner text; behavior for existing paths is preserved and the sole output-parsing caller is updated in lockstep.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
⏭️ **intent** - skipped
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - 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"✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
Closes #306