rowboat/apps/x
Ramnique Singh e22d3b4796 fix(x): make stopTurn reliable under concurrent advances on one turn
The sessions layer tracked live advances in a map keyed by bare turnId
with overwrite-on-set and unconditional delete-on-settle. A turn can
legally have several live advances at once — a running invocation plus
external-input invocations queued on the turn lock (e.g. a permission
response while an async result is pending). The overwrite made stopTurn
abort the wrong controller and await an outcome that couldn't settle;
the unconditional delete untracked a sibling advance, so a later
stopTurn missed the abort path, fell back to a cancel input, and could
reject with TurnInputError if the turn had completed meanwhile — a
user-visible stop failure. Durable state was never affected.

Track a set of advances per turn: each advance removes only its own
entry on settle, and stopTurn aborts every live controller and awaits
all outcomes. A cancel input that loses the race with a concurrent
settle now counts as a successful stop (the turn is already terminal)
instead of rejecting.

Adds four tests: concurrent invocations both aborted, an earlier settle
not untracking a later advance, the settle-race cancel treated as
success, and non-terminal rejections still surfacing. Updates
session-design.md §9.3 and §13.5 accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 22:46:06 +05:30
..
.pnpm-store/v11 add talking mascot 2026-07-02 22:20:11 +05:30
apps ci(x): typecheck test files — the gap vitest and the build tsconfigs both miss 2026-07-10 16:30:26 +05:30
docs feat(apps): M3 UI — catalog, D18 install dialog, publish dialog, detail actions 2026-07-06 15:34:54 +05:30
packages fix(x): make stopTurn reliable under concurrent advances on one turn 2026-07-10 22:46:06 +05:30
.gitignore feat(x): reference-based model requests + wire-form composer 2026-07-02 14:20:44 +05:30
ANALYTICS.md docs(x): fix pointers the reorg docs pass got wrong or missed 2026-07-10 17:57:03 +05:30
CODE_MODE_ENGINES_PLAN.md Code mode: make packaged builds work via managed engine provisioning (#625) 2026-06-17 21:53:15 +05:30
demo.gif add gif 2026-07-10 10:04:37 +05:30
eslint.config.mts ignore renderer eslint 2026-01-16 12:05:33 +05:30
LIVE_NOTE.md docs(x): design docs and prompt catalogs follow the runtime/ move 2026-07-10 16:30:26 +05:30
MINI_APPS_PLAN.md feat(mini-apps): copilot builder — build-mini-app skill + install/data tools 2026-07-01 01:25:45 +05:30
package.json ci(x): typecheck test files — the gap vitest and the build tsconfigs both miss 2026-07-10 16:30:26 +05:30
pnpm-lock.yaml build(x): graft vscode-jsonrpc onto langium via packageExtensions 2026-07-07 02:45:09 +05:30
pnpm-workspace.yaml build(x): graft vscode-jsonrpc onto langium via packageExtensions 2026-07-07 02:45:09 +05:30
tsconfig.base.json bootstrap new electron app 2026-01-16 12:05:33 +05:30
VIDEO_MODE.md docs(x): fix pointers the reorg docs pass got wrong or missed 2026-07-10 17:57:03 +05:30