feat(FN-4687): complete Step 7 — docs and changeset

Fusion-Task-Id: FN-4687
Fusion-Task-Lineage: d646a4dc-e28e-4b1f-ac07-c4ab79e893d5
This commit is contained in:
Fusion (runfusion.ai)
2026-05-15 18:23:18 -07:00
committed by gsxdsm
parent 5764c48e74
commit 43ae0ee074
3 changed files with 7 additions and 2 deletions

View File

@@ -645,7 +645,7 @@ Guardrails: this routine does **not** retry merges, does **not** apply to mixed/
### Worktree and naming helpers
- `WorktreePool` (`worktree-pool.ts`) — idle worktree reuse
- `WorktreeBackend` (`worktree-backend.ts`) — abstraction for worktree creation routing used by `acquireTaskWorktree`. `native` (default) preserves the existing `git worktree add` + sibling-branch retry behavior; `resolveWorktreeBackend(settings)` switches to `worktrunk` when `settings.worktrunk?.enabled === true`. The current `worktrunk` path is a scaffold: it validates `binaryPath`, runs a placeholder `worktrunk switch --create <branch>` command, and emits `worktree:worktrunk-create`; FN-4623 fills in full create/sync/prune/remove/layout delegation.
- `WorktreeBackend` (`worktree-backend.ts`) — abstraction for worktree operations used by `acquireTaskWorktree`. `native` (default) preserves existing `git worktree add` behavior (including sibling-branch retry semantics). `resolveWorktreeBackend(settings)` selects `worktrunk` when `settings.worktrunk?.enabled === true`; `worktrunk.onFailure` controls fail-hard vs fallback-native create behavior. The current `worktrunk` backend is a scaffold (placeholder `--help` shell-out and typed failure mapping); real CLI subcommand mapping lands in FN-4623.
- `WorktreeNames` (`worktree-names.ts`) — deterministic worktree/branch naming
### Observability and reflection

View File

@@ -264,7 +264,7 @@ Sandbox backend precedence is:
| --- | --- | --- | --- |
| `worktrunk.enabled` | `boolean` | `false` | Enables `WorktreeBackend` selection in `packages/engine/src/worktree-backend.ts`. Tier: global + project, merged field-by-field with project overrides. |
| `worktrunk.binaryPath` | `string \| undefined` | `undefined` | Optional absolute `worktrunk` binary path passed to the worktrunk backend. Tier: global + project with field-level precedence (project overrides only this field when set). |
| `worktrunk.onFailure` | `"fail" \| "fallback-native"` | `"fail"` | Worktrunk failure mode: `fail` rethrows the backend error; `fallback-native` retries with native `git worktree` and records fallback audit telemetry. Auto-install, dashboard UX, and CLI setter ergonomics remain downstream follow-ups. |
| `worktrunk.onFailure` | `"fail" \| "fallback-native"` | `"fail"` | Worktrunk failure mode in `packages/engine/src/worktree-backend.ts`: `fail` rethrows the backend error; `fallback-native` retries once with native `git worktree` and records fallback audit telemetry. Binary auto-install (FN-4624), dashboard settings UX (FN-4627), and CLI setter wiring (FN-4629) are downstream follow-ups. |
| Key | Type | Default | Description |
| --- | --- | --- | --- |