Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
spec(FIX-2129): goal leg f proves the person-stop host default
FIX-2129 swaps FIX-2133's 7-day constant for the host setting, so it owns
the proof: a non-7-day default persists on a defaulted waitForUser and a
held question, while a raw ctx.suspend keeps its own timeoutMs (Codex P2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6
  • Loading branch information
claude committed Oct 23, 2026
commit 81028d41751ced7c66dfa6299aa5a016bb24ecbb
3 changes: 2 additions & 1 deletion specs/issues/FIX-2129/DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ It comes down to what the caller sends: through resume, caller data re-enters a
keeps its own `timeoutMs`, none meaning no deadline, so an approval that waits today doesn't start
expiring. A held question keeps its own 7-day default, read from the same host setting: when the
setting lands, this issue replaces FIX-2133's 7-day constant with it, so the two can't drift (ER-8,
Comment thread
jhoffner marked this conversation as resolved.
Resolved
[epic D3](../../epics/FIX-2058/DECISIONS.md#d3)). An input's and a
[epic D3](../../epics/FIX-2058/DECISIONS.md#d3)). This issue owns that proof: goal leg f sets a
non-7-day default and reads it on both, and a raw `ctx.suspend`'s own `timeoutMs` beside them. An input's and a
review's expiry now resume the block, as an approval's already does (FIX-1846). Input that
fails its try at the deadline is asked again on the next try, so it can stay open a deadline per
try.
Expand Down
6 changes: 3 additions & 3 deletions specs/issues/FIX-2129/SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ is cancelled or is stopped.**
flowchart LR
H["durable SQLite host · trace observability off · a task-board worker"] --> S["its run asks with waitForUser"]
S --> W["wait past three lease periods"]
W --> E["leg a · answer · b · deadline · c · cancel · d · stop · e · crash after cancel"]
W --> E["leg a · answer · b · deadline · c · cancel · d · stop · e · crash after cancel · f · the host default"]
E -->|"one ending each · same try · item closed · work ran once"| P["PASS · goal met"]
C["controls · stop fails the try · public resume · stored user only · cancel after add"] -.-> E
E -.->|"under a control"| F["must FAIL · the leg that control names"]
Expand All @@ -48,10 +48,10 @@ never through the store.
| How we verify | |
|---|---|
| **Goal check** | `goals/task-board/holds-a-task-waiting-on-a-person/` · model-free (`n/a`) · run by the implementer at completion · verdict in the implementation PR |
| **Signal** | a: past three lease periods, `getTask` shows `waitingOn: "user"` and the prompt, a second worker claims nothing, and the answer completes try 1 with the work counter at 1; the same answer from a caller with the stop's user id in another tenant, and in another org, is told the stop doesn't exist; a task the request filed before it stopped ends during the stop, and its `onTaskSettled` runs then, not after the answer. b: an unhandled input fails try 1, a caught one completes it, an approval reads as a no and its resume runs no completed step again. c: the block runs on once, its progress write is refused, a task it files on the same board is refused, the row stays `cancelled` with no output and no open child. c′: the cancelled block files onto another board, with the cancel and a claimer in separate processes. A latch right after the child's add commits holds the filing there, and the claimer attempts its claim inside that window before the latch releases; under the fix the latch point has no claimable state, so the claim finds nothing. d: `cancelled` on try 1. e: the host dies after the cancel's row write and before the resume; after a restart, a board touch or the sweep resumes the block `cancelled` and the item closes. Every leg: the item leaves the pending list. An answer and a cancel together resume once; an answer after the cancel's write is told `already-resolved` and the block resumes `cancelled` |
| **Signal** | a: past three lease periods, `getTask` shows `waitingOn: "user"` and the prompt, a second worker claims nothing, and the answer completes try 1 with the work counter at 1; the same answer from a caller with the stop's user id in another tenant, and in another org, is told the stop doesn't exist; a task the request filed before it stopped ends during the stop, and its `onTaskSettled` runs then, not after the answer. b: an unhandled input fails try 1, a caught one completes it, an approval reads as a no and its resume runs no completed step again. c: the block runs on once, its progress write is refused, a task it files on the same board is refused, the row stays `cancelled` with no output and no open child. c′: the cancelled block files onto another board, with the cancel and a claimer in separate processes. A latch right after the child's add commits holds the filing there, and the claimer attempts its claim inside that window before the latch releases; under the fix the latch point has no claimable state, so the claim finds nothing. d: `cancelled` on try 1. e: the host dies after the cancel's row write and before the resume; after a restart, a board touch or the sweep resumes the block `cancelled` and the item closes. f: the host's person-stop default set to a distinctive value, not 7 days; a `waitForUser` with no `deadline` and a held question (FIX-2133) both persist that deadline, and a raw `ctx.suspend` keeps its own `timeoutMs`, none meaning no deadline. Every leg: the item leaves the pending list. An answer and a cancel together resume once; an answer after the cancel's write is told `already-resolved` and the block resumes `cancelled` |
| **Input** | An input, "Which region?", an approval, and a review |
| **Anti-game** | Run with `FSDEV_TRACE_OBSERVABILITY=0`, production's default, so a resume that runs completed steps again (FIX-2137) shows as a work counter of 2, not hidden by dev's traces. Don't assert on the store's writes or the suspension record; read through `getTask` and the Inbox's pending read. The work counter is a real row, not item counts. Leg e kills the host process, not a mocked fast path |
| **Control that must fail** | `GOAL_CONTROL=stop-fails-attempt` fails leg d on *cancelled on try 1*; `GOAL_CONTROL=public-resume` fails leg a on *answered through the route*; `GOAL_CONTROL=stored-user-only` fails leg a on *another tenant is told the stop doesn't exist*; `GOAL_CONTROL=cancel-after-add`, which keeps today's order of adding the child and then cancelling it, fails leg c′ deterministically: the latch forces its claimer into the window, and the claim succeeds. Today's `main` fails legs a to c′ and e: it has no `waitForUser` |
| **Control that must fail** | `GOAL_CONTROL=stop-fails-attempt` fails leg d on *cancelled on try 1*; `GOAL_CONTROL=public-resume` fails leg a on *answered through the route*; `GOAL_CONTROL=stored-user-only` fails leg a on *another tenant is told the stop doesn't exist*; `GOAL_CONTROL=cancel-after-add`, which keeps today's order of adding the child and then cancelling it, fails leg c′ deterministically: the latch forces its claimer into the window, and the claim succeeds. Today's `main` fails legs a to c′, e and f: it has no `waitForUser` |

## What changes

Expand Down
Loading