Skip to content

fix(spawn): support same-task OMP relaunch after exit - #130

Merged
dnth merged 13 commits into
mainfrom
fm/fm-spawn-ship-relaunch-unsupported
Sep 10, 2026
Merged

fix(spawn): support same-task OMP relaunch after exit#130
dnth merged 13 commits into
mainfrom
fm/fm-spawn-ship-relaunch-unsupported

Conversation

@dnth

@dnth dnth commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Intent

Repair same-task OMP ship/scout restart in Firstmate after a supported /exit. Use upstream b1ad702 as reference, not replacement. Inspect relaunch flow and early OMP artifact guard; fix the same-task --relaunch refusal caused by existing metadata and runtime markers. Preserve task identity, recorded worktree, WIP, brief, inbox, mode/yolo, model/effort, and OMP launch options. Continue refusing active/ambiguous endpoints, mismatched identities, missing worktrees, and fresh-spawn collisions. Add portable behavioral regressions and a safe tmux/OMP live lab with isolated throwaway home/worktree. No edits to fm-omp-orchestrate-opt-in. Delivery mode=no-mistakes, yolo off. Firstmate-Validation-Generation: 99070276740a094f1c527669fc9a92f5

What Changed

  • Updated fm-spawn.sh to recover same-task OMP ship/scout relaunches after a supported exit while preserving recorded task, worktree, and launch configuration.
  • Added validation that continues refusing active or ambiguous endpoints, mismatched identities, missing worktrees, unsafe artifacts, and fresh-spawn collisions.
  • Added relaunch documentation plus portable guard regressions and an isolated tmux/OMP live end-to-end test.

Risk Assessment

✅ Low: The relaunch changes are bounded, preserve the recorded OMP/task state, retain fail-closed checks for unsafe artifacts and endpoint ambiguity, and add behavioral fixtures without introducing a source-verifiable defect.

Testing

Exercised portable same-task OMP relaunch acceptance, profile and launch-option preservation, symlink/collision/identity/worktree refusal paths, and related OMP runtime identity behavior. Automated targeted tests passed; the real tmux/OMP lab was attempted but could not complete initial spawn because the environment reported a missing pane and unsafe GOTMPDIR submission.

Evidence: OMP relaunch guard results
Targeted relaunch guard suite passed all behavioral cases, including preserved profile/options and fail-closed refusal paths.
Evidence: Live tmux lab attempt
The opt-in live tmux lab was attempted but initial spawn failed in this environment with `can't find pane` and `GOTMPDIR export could not be submitted safely`.

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.

  • bash tests/fm-omp-relaunch-guard.test.sh
  • bash tests/fm-omp-harness.test.sh
  • bash tests/fm-omp-primary.test.sh
  • FM_OMP_TMUX_LIVE_E2E=1 bash tests/fm-omp-relaunch-tmux-live-e2e.test.sh
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

devin-ai-integration Bot and others added 2 commits September 10, 2026 19:58
The early OMP artifact guard in fm-spawn.sh treated existing task
metadata and runtime markers from a prior /exit as a new-spawn
collision, so a legitimate same-task --relaunch was refused.

- Allow relaunch of an OMP ship/scout when the recorded endpoint is
  missing/dead, the task identity matches, and the recorded worktree
  still exists.
- Recover --mode, --yolo, --prewalk-into, and
  --allow-project-omp-extensions from the prior meta when the caller
  omits them, preserving the original launch profile.
- Keep the fail-closed collision guard for fresh spawns and refuse
  active, ambiguous, unreadable, or mismatched relaunches.

Add a portable fake-tmux/fake-omp regression for the guard, profile
recovery, and negative boundaries; add an opt-in live tmux/OMP lab
that exits a real worker and relaunches it, verifying worktree,
dirty sentinel, pending inbox, and generation isolation.

Verified by:
- tests/fm-omp-relaunch-guard.test.sh
- tests/fm-spawn-worktree-settle.test.sh
- tests/fm-omp-harness.test.sh
- FM_OMP_TMUX_LIVE_E2E=1 tests/fm-omp-relaunch-tmux-live-e2e.test.sh
- bin/fm-lint.sh
- bin/fm-doc-audience-check.sh

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@dnth dnth changed the title Fix same-task OMP ship/scout relaunch fix(spawn): support same-task OMP relaunch Sep 10, 2026
@dnth dnth changed the title fix(spawn): support same-task OMP relaunch fix(spawn): support same-task OMP relaunch after exit Sep 10, 2026
@dnth dnth changed the title fix(spawn): support same-task OMP relaunch after exit fix: support safe OMP same-task relaunch Sep 10, 2026
@dnth dnth changed the title fix: support safe OMP same-task relaunch fix: support safe same-task OMP relaunch Sep 10, 2026
@dnth dnth changed the title fix: support safe same-task OMP relaunch fix(bin): allow safe same-task OMP relaunch Sep 10, 2026
@dnth dnth changed the title fix(bin): allow safe same-task OMP relaunch fix(bin): support safe OMP ship relaunch Sep 10, 2026
@dnth dnth changed the title fix(bin): support safe OMP ship relaunch fix(spawn): support same-task OMP relaunch after exit Sep 10, 2026
@dnth
dnth merged commit e478e25 into main Sep 10, 2026
16 checks passed
@dnth
dnth deleted the fm/fm-spawn-ship-relaunch-unsupported branch September 10, 2026 16:45
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.

1 participant