gsxdsm
31d3f21e18
FN-7065: add deterministic Fusion co-author trailers
...
Fusion now applies co-author attribution through merge and worktree plumbing instead of relying on prompt-written commit messages.
- Add commit-msg hook support for deterministic Co-authored-by trailers with configured Fusion identity.
- Propagate commit attribution settings through native and worktrunk worktree backends.
- Backfill AI squash merge trailers with Fusion task metadata and co-author attribution.
- Document the settings behavior and add a patch changeset for published CLI behavior.
- Cover hook, executor, AI merge, and real-git trailer behavior with tests.
Files changed:
.changeset/fn-7065-co-author-trailer.md | 7 +++
docs/settings-reference.md | 6 +--
packages/engine/src/__tests__/merger-ai.test.ts | 43 +++++++++++++++++++
.../real-git/commit-msg-trailer.real-git.test.ts | 50 ++++++++++++++++++++++
.../engine/src/__tests__/worktree-hooks.test.ts | 15 +++++++
packages/engine/src/executor.ts | 4 ++
packages/engine/src/merger-ai.ts | 22 ++++++++--
packages/engine/src/step-session-executor.ts | 3 ++
packages/engine/src/worktree-acquisition.ts | 3 ++
packages/engine/src/worktree-backend.ts | 13 +++++-
packages/engine/src/worktree-hooks.ts | 33 +++++++++++++-
11 files changed, 190 insertions(+), 9 deletions(-)
Fusion-Task-Id: FN-7065
Fusion-Task-Lineage: 4f5cd0ff-7193-4f97-bdcd-4cd78c7669b9
2026-06-26 13:13:46 -07:00
Phil Larson
02a85818c1
fix(FN-343): address follow-up review findings
2026-06-12 15:51:15 -07:00
Phil Larson
2ac9968ea5
fix(FN-343): address PR review feedback
2026-06-12 15:51:15 -07:00
Phil Larson
14cc9d82d1
test(FN-343): cover merger temp cleanup visibility
...
Fusion-Task-Id: FN-343
Co-authored-by: Fusion <noreply@runfusion.ai >
2026-06-12 15:50:53 -07:00
Phil Larson
b094e0c765
fix(FN-343): classify pruned temp merge worktree removals
...
Fusion-Task-Id: FN-343
Co-authored-by: Fusion <noreply@runfusion.ai >
2026-06-12 15:50:53 -07:00
gsxdsm
39b2478f01
FN-6227: handle non-empty worktree removals
...
Recover native worktree cleanup when git refuses to remove a non-empty worktree.
- Detect recoverable git worktree remove errors and fall back to filesystem removal plus admin pruning.
- Add a worktree remove fallback audit event for recovery visibility.
- Cover non-empty removal recovery with unit and real-git regression tests.
- Keep flaky-test quarantine exclusions merged with current main.
Files changed:
docs/architecture.md | 4 +-
...tree-remove-non-empty-recovery.real-git.test.ts | 139 +++++++++++++++++++++
.../engine/src/__tests__/worktree-backend.test.ts | 113 ++++++++++++++++-
packages/engine/src/run-audit.ts | 1 +
packages/engine/src/worktree-backend.ts | 57 ++++++++-
packages/engine/vitest.config.ts | 1 +
scripts/lib/test-quarantine.json | 5 +
7 files changed, 311 insertions(+), 9 deletions(-)
Fusion-Task-Id: FN-6227
Fusion-Task-Lineage: 98673303-8109-4fe8-8d9f-eb867fb28bdd
2026-06-11 16:15:07 -07:00
gsxdsm
3ccb132dcc
feat(FN-5519): merge fusion/fn-5519
2026-05-22 22:43:26 -07:00
Fusion (runfusion.ai)
79850b233f
feat(FN-5349): add integration branch resolver with auto-recovery fallback
...
FN-5349 adds a dedicated integration branch resolution module (`packages/engine/src/integration-branch.ts`) replacing ad-hoc dynamic fallbacks, routes merger branch conflict resolution through it, wires auto-recovery handlers (branch-worktree, contamination) to use integration branch fallback, and w
Fusion-Task-Id: FN-5349
2026-05-21 12:04:58 -07:00
gsxdsm
cf0101be7c
fix(FN-5256): keep live task worktrees through pause/resume races
...
Three independent reliability fixes that all surfaced as the same bug:
live tasks losing their worktrees mid-execution and emitting
`wrong_toplevel` errors.
Fix A — executor stale-self-owned classifier:
`reconcileSelfOwnedActiveSessionForRemoval` now takes a process-active
probe (`executingTaskLock.has`) and a minimum-idle window (default 5s)
in addition to the existing in-memory `activeWorktrees` binding probe.
Recently-registered or still-running entries are refused with
`process-active-refuses` / `too-recent-refuses`, with audit-grade
log lines. Both the pre-remove path
(`reconcileSelfOwnedBeforeRemove`), the post-throw retry in
`removeOwnWorktreeWithReconcile`, and the defensive reconcile in
`removeWorktree` route through the same hardened gates.
Fix B — pause synchronously reaps the agent session:
New `awaitAbortInFlightTaskWork` mirrors the existing fire-and-forget
abort but awaits each `session.abort()` /
`stepExecutor.terminateAllSessions()` /
`workflowSession.abort()`. `parkTaskAfterWorkflowStepPause` calls it
before `moveTask("todo")`, and the `task:updated` user-pause handler
routes through it, so a fast re-dispatch can no longer race a still-
live shell.
Fix C — self-healing realpath + active-task skip:
`reconcileTaskWorktreeMetadata` now realpath-normalizes both sides of
the registry comparison (handling macOS `/private/var/...`) and
refuses to clear `worktree`/`branch` on in-progress or in-review
tasks. The skip emits a new
`task:auto-recover-worktree-metadata-skipped-active` audit event;
executor-level recovery paths remain in charge of active tasks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com >
2026-05-21 09:06:23 -07:00
Fusion (runfusion.ai)
f798378693
feat(FN-5346): add post-completion defensive backstop and shared reconcile
...
The merge adds a post-completion defensive backstop that probes and removes stale same-task `activeSessionRegistry` entries on `done`/`archived` transitions, completing FN-5346 with a shared reconcile helper, a defensive ownership probe wired into paused cleanup, audit event alignment, and regressio
Fusion-Task-Id: FN-5346
2026-05-20 21:53:02 -07:00
Fusion (runfusion.ai)
fd202e9356
feat(FN-5329): remove orphan rescue and branch-recovery primitives from eng
...
Removes the branch-recovery CLI surface, orphan-rescue engine primitives, and their associated tests (over 1,500 lines deleted), while restoring a minimal prune-only orphan branch sweep with proper git audit mutation types. Documentation across `cli-reference.md`, `task-management.md`, and `AGENTS.m
Fusion-Task-Id: FN-5329
2026-05-20 16:43:27 -07:00
Fusion (runfusion.ai)
e53cf7e0b1
fix(FN-5089): add trailer settings typing defaults
...
Fusion-Task-Id: FN-5089
Fusion-Task-Lineage: ad7ea32a-c024-45bb-b68e-b65665b9b7c6
2026-05-19 02:34:37 -07:00
Fusion (runfusion.ai)
ac9c83c106
test(FN-5089): add commit-msg hook coverage and wiring
...
Fusion-Task-Id: FN-5089
Fusion-Task-Lineage: ad7ea32a-c024-45bb-b68e-b65665b9b7c6
2026-05-19 02:34:35 -07:00
gsxdsm
6fc0f5cebc
feat(FN-5063): merge fusion/fn-5063
2026-05-18 15:51:01 -07:00
gsxdsm
46d09285d5
feat(FN-5058): merge fusion/fn-5058
2026-05-18 11:01:32 -07:00
Fusion (runfusion.ai)
4b16429618
fix(FN-4948): harden guard install failure cleanup paths
...
Fusion-Task-Id: FN-4948
Fusion-Task-Lineage: dc622643-4c3e-4217-9219-a6a6e5424427
2026-05-17 17:29:28 -07:00
Fusion (runfusion.ai)
487dfcc10c
feat(FN-4948): complete Step 2 — wire identity guard into worktree provisioning
...
Fusion-Task-Id: FN-4948
Fusion-Task-Lineage: dc622643-4c3e-4217-9219-a6a6e5424427
2026-05-17 17:29:28 -07:00
Fusion (runfusion.ai)
753068482e
feat(FN-4830): complete Step 2 — backend stale-lock recovery
...
Fusion-Task-Id: FN-4830
Fusion-Task-Lineage: d9b8ad72-669f-488e-8e85-be2dce9b8341
2026-05-16 20:54:33 -07:00
Fusion (runfusion.ai)
8fd47b619f
feat(FN-4811): complete Step 3 — update removeWorktree call sites
...
Fusion-Task-Id: FN-4811
Fusion-Task-Lineage: f3dac123-cb46-4d31-8a7e-dfc664bfdc5f
2026-05-16 16:55:04 -07:00
Fusion (runfusion.ai)
378762c4ab
fix(FN-4742): address review for worktrunk removal backstop
...
Fusion-Task-Id: FN-4742
Fusion-Task-Lineage: 59bca56e-c9d9-4066-9f5a-6d8ee252a100
2026-05-16 10:08:02 -07:00
Fusion (runfusion.ai)
f02482f8f3
feat(FN-4717): complete Step 2 — add backend resolver precedence
...
Fusion-Task-Id: FN-4717
Fusion-Task-Lineage: a2533cd8-52c4-43a0-9daf-e0a49745306b
2026-05-16 01:58:16 -07:00
Fusion (runfusion.ai)
e21e72884b
feat(FN-4717): complete Step 1 — add lazy worktrunk binary resolver
...
Fusion-Task-Id: FN-4717
Fusion-Task-Lineage: a2533cd8-52c4-43a0-9daf-e0a49745306b
2026-05-16 01:58:16 -07:00
Fusion (runfusion.ai)
6e74f6366c
fix(FN-4698): harden worktrunk path resolution and coverage
...
Fusion-Task-Id: FN-4698
Fusion-Task-Lineage: 267131ce-b02a-4e54-8d71-c949e3b55e56
2026-05-16 01:41:40 -07:00
Fusion (runfusion.ai)
b98afd4ea3
feat(FN-4698): complete Step 1 — resolve created worktree path
...
Fusion-Task-Id: FN-4698
Fusion-Task-Lineage: 267131ce-b02a-4e54-8d71-c949e3b55e56
2026-05-16 01:41:39 -07:00
Fusion (runfusion.ai)
156392410a
feat(FN-4678): add removeWorktree helper to worktree-backend
...
Adds a `removeWorktree` helper to the worktree backend with corresponding unit tests, and wires it into the worktree pool.
Fusion-Task-Id: FN-4678
2026-05-15 22:49:36 -07:00
Fusion (runfusion.ai)
3d9260e0a8
feat(FN-4623): complete Step 6/7 — verification fixes, docs, and changeset
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:48 -07:00
Fusion (runfusion.ai)
a2245e1959
test(FN-4623): cover backend layout resolution paths
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:48 -07:00
Fusion (runfusion.ai)
0f372f67c3
feat(FN-4623): complete Step 3 — add backend-aware path resolution
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:48 -07:00
Fusion (runfusion.ai)
c98a4e2f82
fix(FN-4623): align worktrunk sync target and prune fallback
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:48 -07:00
Fusion (runfusion.ai)
67b8051b91
feat(FN-4623): complete Step 2 — implement worktrunk lifecycle operations
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:48 -07:00
Fusion (runfusion.ai)
bcf140a92a
fix(FN-4623): align worktrunk create/remove argv semantics
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:47 -07:00
Fusion (runfusion.ai)
35279a2517
feat(FN-4623): complete Step 1 — add worktrunk CLI helper and mappings
...
Fusion-Task-Id: FN-4623
Fusion-Task-Lineage: 58122853-cab7-4102-9649-4ceda4c5959e
2026-05-15 19:37:47 -07:00
Fusion (runfusion.ai)
dfc291f8c0
test(FN-4622): align worktrunk acquisition assertions
...
Fusion-Task-Id: FN-4622
Fusion-Task-Lineage: 10ab809f-32ef-4a1e-921e-4f8ae4161323
2026-05-15 18:54:48 -07:00
Fusion (runfusion.ai)
58cc260444
feat(FN-4622): complete Step 2 — implement worktrunk backend
...
Fusion-Task-Id: FN-4622
Fusion-Task-Lineage: 10ab809f-32ef-4a1e-921e-4f8ae4161323
2026-05-15 18:54:48 -07:00
Fusion (runfusion.ai)
f3c557b216
feat(FN-4622): complete Step 1 — native backend sync contract
...
Fusion-Task-Id: FN-4622
Fusion-Task-Lineage: 10ab809f-32ef-4a1e-921e-4f8ae4161323
2026-05-15 18:54:48 -07:00
Fusion (runfusion.ai)
5764c48e74
fix(FN-4687): remove unused backend logger import
...
Fusion-Task-Id: FN-4687
Fusion-Task-Lineage: d646a4dc-e28e-4b1f-ac07-c4ab79e893d5
2026-05-15 18:23:51 -07:00
Fusion (runfusion.ai)
e2d7dcbf27
feat(FN-4687): complete Step 2 — scaffold worktrunk backend
...
Fusion-Task-Id: FN-4687
Fusion-Task-Lineage: d646a4dc-e28e-4b1f-ac07-c4ab79e893d5
2026-05-15 18:23:50 -07:00
Fusion (runfusion.ai)
c0f9ddedc0
feat(FN-4686): complete Step 7 — docs and changeset delivery
...
Fusion-Task-Id: FN-4686
Fusion-Task-Lineage: a1e58bd8-fd94-471a-b164-c396c5512fea
2026-05-15 17:52:55 -07:00
Fusion (runfusion.ai)
3391477716
feat(FN-4686): complete Step 2 — add worktrunk create scaffold
...
Fusion-Task-Id: FN-4686
Fusion-Task-Lineage: a1e58bd8-fd94-471a-b164-c396c5512fea
2026-05-15 17:52:54 -07:00
Fusion (runfusion.ai)
75dd07eace
feat(FN-4685): complete Step 5-6 — verification and docs
...
Fusion-Task-Id: FN-4685
Fusion-Task-Lineage: 406ac389-c360-4e4d-b9ac-f5349a241907
2026-05-15 17:07:46 -07:00
Fusion (runfusion.ai)
00a44e82af
feat(FN-4685): complete Step 1 — define native backend
...
Fusion-Task-Id: FN-4685
Fusion-Task-Lineage: 406ac389-c360-4e4d-b9ac-f5349a241907
2026-05-15 17:07:45 -07:00
Fusion (runfusion.ai)
c1abebc98d
feat(FN-4684): complete Step 2 — add worktree backend primitives
...
Fusion-Task-Id: FN-4684
Fusion-Task-Lineage: 142e512b-8189-4029-9df4-4bd40b69ed2a
2026-05-15 16:44:49 -07:00