gsxdsm
01d65805c3
FN-8693: refresh reused worktree bases before execution
Refresh reused execution worktrees against the current integration baseline.
- Rebase or reset clean reused worktrees before coding sessions while preserving task commits.
- Persist and audit refreshed base SHAs, and block unsafe refresh states before execution.
- Cover executor, graph, and heartbeat refresh paths with regression tests.
Files changed:
.changeset/fn-8693-stale-worktree-base.md | 7 +
docs/architecture.md | 1 +
.../src/__tests__/agent-heartbeat-worktree.test.ts | 28 ++++
.../__tests__/ce-workflow-step-executor.test.ts | 44 ++++++
.../src/__tests__/worktree-base-refresh.test.ts | 90 ++++++++++++
packages/engine/src/agent-heartbeat.ts | 35 ++++-
packages/engine/src/executor.ts | 67 ++++++++-
packages/engine/src/merger.ts | 5 +
packages/engine/src/run-audit.ts | 11 ++
packages/engine/src/workflow-graph-executor.ts | 32 ++++-
packages/engine/src/worktree-acquisition.ts | 28 +++-
packages/engine/src/worktree-base-refresh.ts | 158 +++++++++++++++++++++
12 files changed, 498 insertions(+), 8 deletions(-)
Fusion-Task-Id: FN-8693
Fusion-Task-Lineage: e39a441f-39b5-4723-b503-753e921018f3
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-01 10:03:28 -07:00
..
2026-08-01 06:09:04 -07:00
2026-08-01 00:55:04 -07:00
2026-08-01 08:58:49 -07:00
2026-08-01 09:53:36 -07:00
2026-08-01 00:55:04 -07:00
2026-08-01 00:55:04 -07:00
2026-08-01 10:03:28 -07:00
2026-08-01 00:55:04 -07:00
2026-08-01 00:55:04 -07:00
2026-08-01 00:55:04 -07:00
2026-07-27 19:40:08 -07:00
2026-08-01 00:55:04 -07:00