orch: require explicit dispatch execution mode
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
## Purpose
|
||||
|
||||
This document defines how code-writing workers should execute in isolated Git worktrees instead of modifying the user's primary working tree.
|
||||
This document defines how `orch dispatch --execution-mode code` should run code-writing workers in isolated Git worktrees instead of modifying the user's primary working tree.
|
||||
|
||||
The default recommendation is strict mode:
|
||||
|
||||
@@ -11,7 +11,7 @@ The default recommendation is strict mode:
|
||||
- the worker writes code only inside that assigned worktree
|
||||
- the leader reviews and integrates the result later
|
||||
|
||||
This model is intended for code tasks. Non-code tasks may not need a worktree.
|
||||
This model is intended for `execution-mode code`. `execution-mode analysis` stays thread-only and does not allocate a worktree.
|
||||
|
||||
## Why Worktrees
|
||||
|
||||
@@ -25,11 +25,11 @@ Using a worktree per task attempt gives:
|
||||
|
||||
## Strict Mode
|
||||
|
||||
Strict mode means workers only start from an explicit committed Git base.
|
||||
Code mode means workers only start from an explicit committed Git base.
|
||||
|
||||
Rules:
|
||||
|
||||
- `orch dispatch` must resolve a concrete `base_ref` to a commit
|
||||
- `orch dispatch --execution-mode code` must resolve a concrete `base_ref` to a commit
|
||||
- worker execution must happen in a separate worktree
|
||||
- the worker must not modify the user's primary checkout
|
||||
- each retry gets a fresh attempt and a fresh worktree
|
||||
@@ -54,9 +54,9 @@ This keeps worker execution reproducible and avoids hidden divergence from the l
|
||||
|
||||
### 1. Leader Decides a Task Is Ready
|
||||
|
||||
`orch` determines that a task may be dispatched.
|
||||
`orch` determines that a task may be dispatched, and the leader chooses `--execution-mode code`.
|
||||
|
||||
### 2. `orch dispatch` Creates an Attempt Workspace
|
||||
### 2. `orch dispatch --execution-mode code` Creates an Attempt Workspace
|
||||
|
||||
For one task attempt, `orch` should:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user