Files
fusion/packages/engine/src
gsxdsm 3b7680c9dd fix(engine): refresh pooled worktree ownership (#2348)
## Summary

Pooled worktrees no longer retain the previous task's identity after
reassignment, preventing valid commits from being rejected when the
checked-out branch and stale ownership marker disagree. Fusion now
refreshes the identity guard immediately after the pool prepares the new
branch and before the checkout is exposed to the task, preserving the
cross-task commit safety check. Regression coverage exercises the pooled
acquisition path and confirms the new task identity is installed.

Related: FN-8400

## Validation

- 85 focused engine tests passed across executor worktree and
acquisition coverage.
- `@fusion/engine` typecheck passed.
- Changed implementation lint and changeset validation passed.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Prevented stale pooled worktree ownership metadata from blocking
commits after a pooled checkout is reassigned.
* Refreshed task identity metadata when pooled worktrees are reused
across task branches, ensuring hooks/attribution settings are correctly
applied.

* **Tests**
* Added/updated coverage to confirm the task identity guard is
reinstalled when acquiring pooled worktrees (including a real-git
scenario proving commits succeed after stale identity is cleared).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-19 17:05:05 -07:00
..
…