You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(isolation): hard-reject worktree isolation to stop silent data loss (#714) (#786)
* fix(isolation): hard-reject worktree isolation to stop silent data loss (#714)
Worktree isolation force-deleted the per-task branch + worktree in cleanup()
without ever calling merge_back() (zero call sites) — external-engine work was
written to cf/<task_id>, then destroyed, while the task was marked COMPLETED.
Real merge-back is entangled with #715 (builtin engines ignore the worktree
path) and #716 (verification runs against the wrong tree) and also needs an
auto-commit step (adapters leave changes uncommitted). Per the issue's
sanctioned interim, fail closed until that lands:
- new validate_isolation(); create_execution_context() raises for WORKTREE
before creating anything (the single chokepoint for CLI/server/conductor)
- cf work start / batch run reject --isolation worktree up front with a clear
message, so no run is created and no task is stranded IN_PROGRESS
- worktree primitives (TaskWorktree.create/merge_back/cleanup) are untouched
and still unit-tested; only the wiring is gated off
Closes#714
* docs/api: fix worktree docstring, export validate_isolation, note legacy paths (#714 review)
* test(cli): cover --isolation worktree rejection in work start/batch (#714 review)
* fix(cli): reject worktree isolation before API-key check in batch run (#714)
The batch isolation guard ran after the ANTHROPIC_API_KEY check, so without a
key the run failed on the key error before reaching the isolation reject
(CI failure). Move it ahead of the key check, matching work start.
0 commit comments