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:
@@ -21,13 +21,15 @@ parallel/distributed task engine or a guarantee that model reports are correct.
|
||||
client does not upload its repository or make host credentials available remotely.
|
||||
- Host and Docker OpenCode credentials are separate. Preserve setup-selected model
|
||||
inheritance; do not select a provider just because its ID appears in an example.
|
||||
- Runtime caps are 30 stage steps and five visits to a stage. There are no parallel
|
||||
runs on one server: admission rejects new work while another run is active;
|
||||
reusing that active run's request key reattaches idempotently. Inspect and wait
|
||||
for the existing run rather than starting duplicates. There are no parallel
|
||||
branches or built-in human approval stages. Optional worktrees, full backup/restore,
|
||||
automatic database sync and independent verifier stage types are future ideas,
|
||||
not existing capabilities. Do not invent them in definitions.
|
||||
- Runtime caps are 30 stage steps and five visits to a stage. Runs in different
|
||||
resolved workspaces execute concurrently; only 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). Reusing that active run's request key reattaches idempotently.
|
||||
There are no parallel branches or built-in human approval stages. Optional
|
||||
worktrees, full backup/restore, automatic database sync and independent
|
||||
verifier stage types are future ideas, not existing capabilities. Do not
|
||||
invent them in definitions.
|
||||
- Services are native or Docker-based. With an existing Docker installation do not
|
||||
start a competing native server. Server APIs are unauthenticated: trusted networks
|
||||
only; never recommend public exposure. Tool scope is not a universal OS sandbox.
|
||||
|
||||
Reference in New Issue
Block a user