FN-9167: clear interrupted manual merge status
Prevent interrupted manual merges from leaving tasks stranded in a transient merging state. - track locally owned merge stamps and clear them through fenced abort cleanup - handle SIGINT, SIGTERM, and SIGHUP for foreground task merges with documented exit behavior - reconcile only age-proven orphan stamps before manual CLI and UI-only dashboard merges - cover merge stamp authorization, signal cleanup, and mock completeness with regression tests - add a patch changeset and operator documentation Files changed: .../fn-9167-interrupted-manual-merge-stamp.md | 7 + docs/cli-reference.md | 1 + docs/task-management.md | 2 +- .../task-command-github-import-tracking.test.ts | 3 + packages/cli/src/commands/__tests__/task.test.ts | 179 +++++- packages/cli/src/commands/dashboard.ts | 3 + packages/cli/src/commands/task.ts | 138 +++-- .../merge-orphan-durable-write-inventory.json | 608 +++++++++++---------- .../src/__tests__/merge-active-status.test.ts | 49 ++ packages/engine/src/index.ts | 2 + .../engine/src/merge/clear-orphaned-merge-stamp.ts | 80 +++ packages/engine/src/merge/merger-ai.ts | 12 + packages/engine/src/project-engine.ts | 20 +- 13 files changed, 735 insertions(+), 369 deletions(-) Fusion-Task-Id: FN-9167 Fusion-Task-Lineage: 554380e2-ce55-4e7a-89fd-f5c24341937b Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -820,6 +820,7 @@ fn task delete FN-001 --force
|
||||
```
|
||||
|
||||
Notes:
|
||||
- Interrupting `fn task merge` aborts its merge and clears its transient merge status: Ctrl-C (`SIGINT`) exits 130, `SIGTERM` exits 143, and a closed terminal (`SIGHUP`) exits 129. Unlike `fn serve`, `fn dashboard`, and the daemon, this one-shot foreground command deliberately does not survive terminal disconnects.
|
||||
- `fn task archive` accepts live-board tasks and preserves the original column for restore. It refuses tasks in a WIP lane or active merge pipeline to protect another process's worktrees; a human operator may use `--force` to override this destructive guard.
|
||||
- The agent-facing `fn_task_archive` tool returns a structured error for the same live-task refusal and deliberately has no force parameter.
|
||||
- `fn task unarchive` restores to the saved pre-archive column when available, with legacy archives falling back to `done`.
|
||||
|
||||
Reference in New Issue
Block a user