refactor(engine-tests): consolidate merge-reuse-task-worktree boilerplate
Each of the 18 tests in this suite was ~50 lines of identical setup: rename main→master, mark steps done, create the branch with one content commit, create the task worktree, set task.worktree, enqueue the merge queue. The test bodies were dominated by ceremony and the unique assertions were buried. Consolidated into a single `setupReuseHandoff` helper that takes per-test overrides (skipWorktreeAdd, worktreeOverride, skipEnqueue, emptyOwnDiff, extraSettings). Added a top-level beforeEach to clear shared mock/registry state that several tests forgot to reset. No behavioral change. All 21 tests pass on two consecutive runs in ~20s. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in: