Allow concurrent runs in different workspaces
Track each active run's resolved workspace alongside its cancel function in a single runner.active struct map. A new request key is now refused only when an already-active run is changing the same resolved workspace; the refusal names the conflicting run id and advises waiting or using a different workspace. Workspace resolution is unchanged (default cwd, absolute request workspace, EvalSymlinks), so two spellings of one directory still compare equal. The conflict check and registration stay inside the existing r.mu critical section, so concurrent starts for one workspace cannot both pass. Idempotent repeats of an active request key and the restart-recovery guard are unchanged. Add concurrency_test.go covering concurrent different-workspace runs, same-workspace refusal, symlink/default-cwd equivalence, idempotent repeats, restart recovery and retry workspace scoping; strengthen the runner_test.go refusal assertion. Update docs/cli.md, docs/first-version-testing.md and the packaged operations skill reference to describe per-workspace concurrency. Assisted-by: DeepSeek V4.1 Flash
This commit is contained in:
+6
-3
@@ -100,9 +100,12 @@ Every submission, including agent-issued `submit`/`rpc`, still uses server valid
|
||||
|
||||
## Drafts in the TUI
|
||||
|
||||
The server admits one active run at a time. A new request key is rejected while
|
||||
another run is active; inspect that run and wait for it to finish. Reusing its
|
||||
original request key reattaches idempotently.
|
||||
The server runs one active run per resolved workspace. A new request key in a
|
||||
different workspace is admitted immediately and executes concurrently; a second
|
||||
run in a workspace an active run is already changing is refused, naming the
|
||||
conflicting run and advising you to wait or use a different workspace (for
|
||||
example another checkout of the repository). Reusing the original request key
|
||||
reattaches idempotently.
|
||||
|
||||
Use `:templates` for five simple, manual-only starters: task, summary, review,
|
||||
research, and plan/implement/review. **Submit template** (`s` or Enter) asks for a
|
||||
|
||||
Reference in New Issue
Block a user