From ecd5751a6731a10ffc45d083fc777be2782ac4e5 Mon Sep 17 00:00:00 2001 From: Hare Date: Sat, 1 Aug 2026 18:34:32 +0900 Subject: [PATCH] docs: report spawn worker delegation scope --- ...rker-delegation-scope-mismatch-20260730.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docs/report/spawn-worker-delegation-scope-mismatch-20260730.md diff --git a/docs/report/spawn-worker-delegation-scope-mismatch-20260730.md b/docs/report/spawn-worker-delegation-scope-mismatch-20260730.md new file mode 100644 index 00000000..b9988b22 --- /dev/null +++ b/docs/report/spawn-worker-delegation-scope-mismatch-20260730.md @@ -0,0 +1,24 @@ +# SpawnWorker rejects a workspace subdirectory inside the parent write boundary + +Date: 2026-07-30 + +## Symptom + +While implementing the multiplexer protocol foundation, the parent Worker could write the checkout but could not delegate `crates/protocol` to a spawned Coder: + +```text +Invalid argument: requested child scope .../checkout/crates/protocol Write is outside this Worker's delegation scope grant +``` + +The requested child scope was a recursive subdirectory of the checkout advertised as writable in the parent instructions. No child was created. + +## Impact + +The parent had to implement and review the protocol slice serially. This removed useful parallel review and made the long Runtime/Server protocol change more interruption-prone. + +## Suggested improvement + +- Make the effective delegation grant visible separately from the Worker's direct filesystem write scope. +- Validate and explain which ancestor rule prevents delegation. +- When a requested child scope is a strict subset of a writable/delegable checkout, accept it consistently. +- Distinguish “parent may write but may not delegate” from a malformed/out-of-bound scope error.