From 1e71a47797ba024e6f2f3b14365f6dfde5f83a7a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 29 Sep 2026 00:36:56 +0000 Subject: [PATCH 1/3] =?UTF-8?q?spec(FIX-1629):=20amend=20BR-25=20and=20C1?= =?UTF-8?q?=20=E2=80=94=20the=20displaced=20worker's=20settlement=20declin?= =?UTF-8?q?es=20terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_014LohgYyHsXCYQd6kABH11N --- specs/issues/FIX-1629/BUSINESS-RULES.md | 2 +- specs/issues/FIX-1629/DECISIONS.md | 2 +- specs/issues/FIX-1629/PLAN.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/issues/FIX-1629/BUSINESS-RULES.md b/specs/issues/FIX-1629/BUSINESS-RULES.md index e8e64599c5..551f9358f9 100644 --- a/specs/issues/FIX-1629/BUSINESS-RULES.md +++ b/specs/issues/FIX-1629/BUSINESS-RULES.md @@ -36,7 +36,7 @@ When → then → proved by. CI = unit test in the owning package. VG = the goal |---|---|---|---| | BR-17 | A flow spreads `taskToolActions(board)` into `actions` | It gains the eight task tools as actions, named `_`, each running the same guarded verb a model's tool does. A request- or sequencer-backed board is refused when `taskToolActions` is called, naming its backing: its tasks don't outlive the request, so a later action could never find them | CI | | BR-18 | One of them targets a settled task, or an illegal move | Refused by the verb, returned as a value | CI | -| BR-25 | `completeTask`, `failTask`, `blockTask` or `cancelTask` runs as an action on a row a live worker holds | It runs with no claim, as a coordinator's call does today, and lands if the transition is legal. The worker's own later result is refused `lost-claim` and dropped | CI | +| BR-25 | `completeTask`, `failTask`, `blockTask` or `cancelTask` runs as an action on a row a live worker holds | It runs with no claim, as a coordinator's call does today, and lands if the transition is legal. The worker's own later result is refused and dropped: `terminal` when the action finished the row, `lost-claim` otherwise. Of these four, only the finishing ones are legal on a row a worker is running (`blockTask` there is refused as an illegal transition), so today the reason is `terminal` | CI | | BR-19 | A channel declares `boardActions: true` | Each of its boards gets the eight actions. Without it, the channel's public actions are exactly today's | CI | | BR-26 | A channel board's action is invoked while addressing any session but that channel's | Refused by name before the ledger is read, the same check `fileTask` and `readBoard` make. Channels share one flow, so the action map alone does not fence them | CI | | BR-20 | `boardActions` is anything but `true`, `false` or absent | Refused at bind, by name, like any other bad value in the closed key list (which grows from six keys to seven) | CI | diff --git a/specs/issues/FIX-1629/DECISIONS.md b/specs/issues/FIX-1629/DECISIONS.md index 539a3f459d..79f528b80e 100644 --- a/specs/issues/FIX-1629/DECISIONS.md +++ b/specs/issues/FIX-1629/DECISIONS.md @@ -74,7 +74,7 @@ It comes down to your screenshot: off, the board you asked about stays read-only visible. A refusal never shows as success. - **An action's settlement overrides a worker's claim.** An action has no claim ticket, so it settles as a coordinator does today: legal transitions only, no ownership check. The holding - seat's later result is refused (`lost-claim`). Clearing a stuck row is the debugging job, and + seat's later result is refused and dropped (`terminal` once the action finished the row, `lost-claim` otherwise). Clearing a stuck row is the debugging job, and refusing would need a new substrate guard. It is why channel exposure stays opt-in. - **Durable boards only.** A request- or sequencer-backed ledger is gone before the row's action runs, so `taskToolActions` refuses those backings by name, as `unparkAndDrain` does. diff --git a/specs/issues/FIX-1629/PLAN.md b/specs/issues/FIX-1629/PLAN.md index da4ad9c0df..8092ef377a 100644 --- a/specs/issues/FIX-1629/PLAN.md +++ b/specs/issues/FIX-1629/PLAN.md @@ -41,7 +41,7 @@ S5/S6 and S1–S4 are independent; land orchestration first so the DevTool tests | ID | After | Passes when | |---|---|---| | C0 | S5 | **Premise first:** a task-tool handler (it declares `parentStateSchema`) runs as a flow-action root in a `fsdev run`/engine test and writes the ledger, **and** that request's root `block_trace` carries the handler's `{ ok, error }` as inline output on the session's items. If either fails, wrap each in a one-step sequencer inside S5 (its trace refs the handler's) — no engine change | -| C1 | S5 | Each of the eight actions runs its verb on a row **filed by an earlier request**; a settled-row `cancelTask_x` returns `declined`/`ok:false`; a request-backed handle is refused by name; `completeTask_x` on a row a worker holds lands, and that worker's own settlement then declines `lost-claim` (BR-17, BR-18, BR-25) | +| C1 | S5 | Each of the eight actions runs its verb on a row **filed by an earlier request**; a settled-row `cancelTask_x` returns `declined`/`ok:false`; a request-backed handle is refused by name; `completeTask_x` on a row a worker holds lands, and that worker's own settlement then declines `terminal`, because the action finished the row; `blockTask_x` on a held row is refused as an illegal transition (BR-17, BR-18, BR-25) | | C2 | S6 | Channel with `boardActions: true` lists 8 × boards more public actions; without it the public map equals today's snapshot; a bad value is refused at bind by name; channel A's action invoked on channel B's session is refused and A's ledger is unchanged (BR-19, BR-20, BR-26) | | C3 | S3 | Qualification: required `taskId` string in, optional `taskId` out, suffix scoping, unsuffixed on every board; with two boards A and B, `answer_` shows on A only and a generic `answer` on both (BR-9, BR-10) | | C4 | S1/S2 | jsdom: collapsed order, expand by click and keyboard, every BR-4 field present when set and absent when not, JSON folded and equal to the task, open row survives an update, long unbroken token contained (BR-1, BR-3–BR-7) | From e63d24eaa12298c0e4c5e4ff1446582a1810cd81 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 29 Sep 2026 00:40:34 +0000 Subject: [PATCH 2/3] spec(FIX-1629): narrow BR-25 to finishing verbs; soft failTask declines lost-claim Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_014LohgYyHsXCYQd6kABH11N --- specs/issues/FIX-1629/BUSINESS-RULES.md | 2 +- specs/issues/FIX-1629/DECISIONS.md | 3 ++- specs/issues/FIX-1629/PLAN.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/specs/issues/FIX-1629/BUSINESS-RULES.md b/specs/issues/FIX-1629/BUSINESS-RULES.md index 551f9358f9..bdf0067456 100644 --- a/specs/issues/FIX-1629/BUSINESS-RULES.md +++ b/specs/issues/FIX-1629/BUSINESS-RULES.md @@ -36,7 +36,7 @@ When → then → proved by. CI = unit test in the owning package. VG = the goal |---|---|---|---| | BR-17 | A flow spreads `taskToolActions(board)` into `actions` | It gains the eight task tools as actions, named `_`, each running the same guarded verb a model's tool does. A request- or sequencer-backed board is refused when `taskToolActions` is called, naming its backing: its tasks don't outlive the request, so a later action could never find them | CI | | BR-18 | One of them targets a settled task, or an illegal move | Refused by the verb, returned as a value | CI | -| BR-25 | `completeTask`, `failTask`, `blockTask` or `cancelTask` runs as an action on a row a live worker holds | It runs with no claim, as a coordinator's call does today, and lands if the transition is legal. The worker's own later result is refused and dropped: `terminal` when the action finished the row, `lost-claim` otherwise. Of these four, only the finishing ones are legal on a row a worker is running (`blockTask` there is refused as an illegal transition), so today the reason is `terminal` | CI | +| BR-25 | `completeTask`, `failTask` or `cancelTask` runs as an action on a row a live worker holds | It runs with no claim, as a coordinator's call does today, and lands if the transition is legal. The worker's own later result is refused and dropped, with the reason the task substrate already gives: `terminal` when the action finished the row, `lost-claim` when a `failTask` with retries left returned it to pending. An illegal move on a held row (`blockTask` among them) is BR-18's | CI | | BR-19 | A channel declares `boardActions: true` | Each of its boards gets the eight actions. Without it, the channel's public actions are exactly today's | CI | | BR-26 | A channel board's action is invoked while addressing any session but that channel's | Refused by name before the ledger is read, the same check `fileTask` and `readBoard` make. Channels share one flow, so the action map alone does not fence them | CI | | BR-20 | `boardActions` is anything but `true`, `false` or absent | Refused at bind, by name, like any other bad value in the closed key list (which grows from six keys to seven) | CI | diff --git a/specs/issues/FIX-1629/DECISIONS.md b/specs/issues/FIX-1629/DECISIONS.md index 79f528b80e..b6cc1851c3 100644 --- a/specs/issues/FIX-1629/DECISIONS.md +++ b/specs/issues/FIX-1629/DECISIONS.md @@ -74,7 +74,8 @@ It comes down to your screenshot: off, the board you asked about stays read-only visible. A refusal never shows as success. - **An action's settlement overrides a worker's claim.** An action has no claim ticket, so it settles as a coordinator does today: legal transitions only, no ownership check. The holding - seat's later result is refused and dropped (`terminal` once the action finished the row, `lost-claim` otherwise). Clearing a stuck row is the debugging job, and + seat's later result is refused and dropped (`terminal` once the action finished the row, `lost-claim` when a retrying `failTask` + returned it to pending). Clearing a stuck row is the debugging job, and refusing would need a new substrate guard. It is why channel exposure stays opt-in. - **Durable boards only.** A request- or sequencer-backed ledger is gone before the row's action runs, so `taskToolActions` refuses those backings by name, as `unparkAndDrain` does. diff --git a/specs/issues/FIX-1629/PLAN.md b/specs/issues/FIX-1629/PLAN.md index 8092ef377a..193af630df 100644 --- a/specs/issues/FIX-1629/PLAN.md +++ b/specs/issues/FIX-1629/PLAN.md @@ -41,7 +41,7 @@ S5/S6 and S1–S4 are independent; land orchestration first so the DevTool tests | ID | After | Passes when | |---|---|---| | C0 | S5 | **Premise first:** a task-tool handler (it declares `parentStateSchema`) runs as a flow-action root in a `fsdev run`/engine test and writes the ledger, **and** that request's root `block_trace` carries the handler's `{ ok, error }` as inline output on the session's items. If either fails, wrap each in a one-step sequencer inside S5 (its trace refs the handler's) — no engine change | -| C1 | S5 | Each of the eight actions runs its verb on a row **filed by an earlier request**; a settled-row `cancelTask_x` returns `declined`/`ok:false`; a request-backed handle is refused by name; `completeTask_x` on a row a worker holds lands, and that worker's own settlement then declines `terminal`, because the action finished the row; `blockTask_x` on a held row is refused as an illegal transition (BR-17, BR-18, BR-25) | +| C1 | S5 | Each of the eight actions runs its verb on a row **filed by an earlier request**; a settled-row `cancelTask_x` returns `declined`/`ok:false`; a request-backed handle is refused by name; `completeTask_x` on a row a worker holds lands, and that worker's own settlement then declines `terminal`, because the action finished the row (BR-17, BR-18, BR-25); `blockTask_x` on a held row is refused as an illegal transition (BR-18) | | C2 | S6 | Channel with `boardActions: true` lists 8 × boards more public actions; without it the public map equals today's snapshot; a bad value is refused at bind by name; channel A's action invoked on channel B's session is refused and A's ledger is unchanged (BR-19, BR-20, BR-26) | | C3 | S3 | Qualification: required `taskId` string in, optional `taskId` out, suffix scoping, unsuffixed on every board; with two boards A and B, `answer_` shows on A only and a generic `answer` on both (BR-9, BR-10) | | C4 | S1/S2 | jsdom: collapsed order, expand by click and keyboard, every BR-4 field present when set and absent when not, JSON folded and equal to the task, open row survives an update, long unbroken token contained (BR-1, BR-3–BR-7) | From 30cbd42315f4cfb51bb2aeecd538aa177e7c9780 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 29 Sep 2026 00:43:11 +0000 Subject: [PATCH 3/3] spec(FIX-1629): BR-25 names the substrate's reasons as observed; C1 gains the retryable failTask leg After a retrying failTask re-queues a held row, the displaced worker's completion declines `disallowed` and its failure `lost-claim`, neither writing (task-tool-actions.test.ts on #2347). Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_014LohgYyHsXCYQd6kABH11N --- specs/issues/FIX-1629/BUSINESS-RULES.md | 2 +- specs/issues/FIX-1629/DECISIONS.md | 5 +++-- specs/issues/FIX-1629/PLAN.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/specs/issues/FIX-1629/BUSINESS-RULES.md b/specs/issues/FIX-1629/BUSINESS-RULES.md index bdf0067456..17e9f50c9a 100644 --- a/specs/issues/FIX-1629/BUSINESS-RULES.md +++ b/specs/issues/FIX-1629/BUSINESS-RULES.md @@ -36,7 +36,7 @@ When → then → proved by. CI = unit test in the owning package. VG = the goal |---|---|---|---| | BR-17 | A flow spreads `taskToolActions(board)` into `actions` | It gains the eight task tools as actions, named `_`, each running the same guarded verb a model's tool does. A request- or sequencer-backed board is refused when `taskToolActions` is called, naming its backing: its tasks don't outlive the request, so a later action could never find them | CI | | BR-18 | One of them targets a settled task, or an illegal move | Refused by the verb, returned as a value | CI | -| BR-25 | `completeTask`, `failTask` or `cancelTask` runs as an action on a row a live worker holds | It runs with no claim, as a coordinator's call does today, and lands if the transition is legal. The worker's own later result is refused and dropped, with the reason the task substrate already gives: `terminal` when the action finished the row, `lost-claim` when a `failTask` with retries left returned it to pending. An illegal move on a held row (`blockTask` among them) is BR-18's | CI | +| BR-25 | `completeTask`, `failTask` or `cancelTask` runs as an action on a row a live worker holds | It runs with no claim, as a coordinator's call does today, and lands if the transition is legal. The worker's own later result is refused and dropped, with the reason the task substrate gives ([What a write reports](../../../apps/docs/docs/orchestration/task-substrate.md#what-a-write-reports)): `terminal` once the action finished the row; after a `failTask` with retries left sent it back to `pending`, `disallowed` for the worker's completion and `lost-claim` for its failure | CI | | BR-19 | A channel declares `boardActions: true` | Each of its boards gets the eight actions. Without it, the channel's public actions are exactly today's | CI | | BR-26 | A channel board's action is invoked while addressing any session but that channel's | Refused by name before the ledger is read, the same check `fileTask` and `readBoard` make. Channels share one flow, so the action map alone does not fence them | CI | | BR-20 | `boardActions` is anything but `true`, `false` or absent | Refused at bind, by name, like any other bad value in the closed key list (which grows from six keys to seven) | CI | diff --git a/specs/issues/FIX-1629/DECISIONS.md b/specs/issues/FIX-1629/DECISIONS.md index b6cc1851c3..05cebba72a 100644 --- a/specs/issues/FIX-1629/DECISIONS.md +++ b/specs/issues/FIX-1629/DECISIONS.md @@ -74,8 +74,9 @@ It comes down to your screenshot: off, the board you asked about stays read-only visible. A refusal never shows as success. - **An action's settlement overrides a worker's claim.** An action has no claim ticket, so it settles as a coordinator does today: legal transitions only, no ownership check. The holding - seat's later result is refused and dropped (`terminal` once the action finished the row, `lost-claim` when a retrying `failTask` - returned it to pending). Clearing a stuck row is the debugging job, and + seat's later result is refused and dropped: `terminal` once the action finished the row; after a + retrying `failTask` sent it back to `pending`, `disallowed` for the seat's completion and + `lost-claim` for its failure. Clearing a stuck row is the debugging job, and refusing would need a new substrate guard. It is why channel exposure stays opt-in. - **Durable boards only.** A request- or sequencer-backed ledger is gone before the row's action runs, so `taskToolActions` refuses those backings by name, as `unparkAndDrain` does. diff --git a/specs/issues/FIX-1629/PLAN.md b/specs/issues/FIX-1629/PLAN.md index 193af630df..6f6b57077c 100644 --- a/specs/issues/FIX-1629/PLAN.md +++ b/specs/issues/FIX-1629/PLAN.md @@ -41,7 +41,7 @@ S5/S6 and S1–S4 are independent; land orchestration first so the DevTool tests | ID | After | Passes when | |---|---|---| | C0 | S5 | **Premise first:** a task-tool handler (it declares `parentStateSchema`) runs as a flow-action root in a `fsdev run`/engine test and writes the ledger, **and** that request's root `block_trace` carries the handler's `{ ok, error }` as inline output on the session's items. If either fails, wrap each in a one-step sequencer inside S5 (its trace refs the handler's) — no engine change | -| C1 | S5 | Each of the eight actions runs its verb on a row **filed by an earlier request**; a settled-row `cancelTask_x` returns `declined`/`ok:false`; a request-backed handle is refused by name; `completeTask_x` on a row a worker holds lands, and that worker's own settlement then declines `terminal`, because the action finished the row (BR-17, BR-18, BR-25); `blockTask_x` on a held row is refused as an illegal transition (BR-18) | +| C1 | S5 | Each of the eight actions runs its verb on a row **filed by an earlier request**; a settled-row `cancelTask_x` returns `declined`/`ok:false`; a request-backed handle is refused by name; `completeTask_x` on a row a worker holds lands, and that worker's own settlement then declines `terminal`; `failTask_x` on a held row with retries left returns it to `pending`, and the worker's later completion declines `disallowed` and its failure `lost-claim`, neither writing (BR-17, BR-18, BR-25); `blockTask_x` on a held row is refused as an illegal transition (BR-18) | | C2 | S6 | Channel with `boardActions: true` lists 8 × boards more public actions; without it the public map equals today's snapshot; a bad value is refused at bind by name; channel A's action invoked on channel B's session is refused and A's ledger is unchanged (BR-19, BR-20, BR-26) | | C3 | S3 | Qualification: required `taskId` string in, optional `taskId` out, suffix scoping, unsuffixed on every board; with two boards A and B, `answer_` shows on A only and a generic `answer` on both (BR-9, BR-10) | | C4 | S1/S2 | jsdom: collapsed order, expand by click and keyboard, every BR-4 field present when set and absent when not, JSON folded and equal to the task, open row survives an update, long unbroken token contained (BR-1, BR-3–BR-7) |