Repository navigation
spec(FIX-1794): tasks go down the owner's chain and run as the owner - #2828
Conversation
A coordinator files tasks for its delegates on its conversation's own board; each task runs in a new task session that belongs to the same user, on any flow, and the conversation hears how it ended. A board whose tasks run on another flow keeps them at the owner's user scope in a partition only its conversation reaches (D1, a task-board change the epic records); chains stop five boards deep (D2). Includes a POC on today's Layer 1 showing why a Workforce-only claim narrow is not enough. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMg2dz8sMEdyzCQTRsaMTV
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Second look + architecture pass (direction only)Read SPEC, DECISIONS, BUSINESS-RULES, PLAN and the POC README. Direction is sound: E1 is a real argument for D1 (a claim-only narrow leaves the read and the drain wait open), and the layer split in S1 (the partition is a function the composing layer supplies) is right. Two findings are above the bar. The rest are notes for the implementer. Above the bar1. D2 bounds depth but not breadth, and the stated reason for D2 is cost.
2. BR-31/BR-32: a split parent settles only after a coordinator turn, so a failed settling turn strands it silently.
Scope (restraint)
Notes (implementer weighs these; no design round needed)
Alternatives consideredAdding the per-conversation ledger as a pure Workforce wrapper over the existing user-scoped ledger is refuted by E1 as stated. The reply-settled variant (a) is correctly rejected on lease renewal. No simpler third shape surfaced that avoids touching Layer 1. No code changes in this PR to refactor. The architecture-improvement angle here is limited to the P1 boundary (S1/S2), which already minimizes the Layer 1 surface. Generated by Claude Code |
There was a problem hiding this comment.
Simplify review
Problem: Cross-flow task chains need each coordinator conversation to own its board and every task session to run as the owner. Today a user-scoped ledger without partitioning lets one conversation claim, list, and block on another's rows; a claim-only narrow (runOwnerDispatcher shape) still leaves read and drain wake broken.
Verdict: The spec takes the simpler engineering path for that problem. D1 (partition at Layer 1, reuse FIX-1791 incarnation, engine untouched) is better evidenced and smaller blast radius than an engine parent-task seam or reply-settled rows. The board-partition POC (U1/E1 as mutual controls, capped E1 polling) does real work; rejecting Workforce-only narrowing is the right call.
Where scope is heavier than the core fix (non-blocking, product/sequencing calls):
- FIX-1794 bundles two behaviors with partitioning — S8 (coordinator split / park / aggregate) and the full S6–S7 notice surface sit beside D1. If MVP is "file → run → hear ending on one level," consider phasing split to a follow-up and pointing goal leg b at a thinner slice; otherwise the three-PR stack is still coherent but P2 carries more than "conversation ledger."
- This PR is a large bundle — FIX-1793 + FIX-1794 + FIX-1795 full specs plus epic/FIX-1791 amendments (~4.5k lines). Directionally fine (epic graph already links them), but sign-off surface repeats ER-9/ER-22/incarnation/owner-rule four times; a single epic "shared contracts" pointer in child PLANs would cut drift risk.
- Process friction — P1 blocked on a separate epic PR to "record" D1 while D1 is already decided and POC-backed here; stacking epic amend with FIX-1794 P1 in one reviewed direction would drop a wait cycle (if process allows).
- FIX-1793 P3 — S5 + S7 (~14 removals) + S8–S9 in one PR is a wide blast radius; PLAN already notes rooms follow the coordinator — splitting room removal after S5 lands would simplify execution/rollback without changing the issue boundary.
- POC harness duplication —
chain.poc.test.tsoverlapspackages/orchestration/test/task-board/hand-off-cross-flow.test.ts; promoting U1/E1 (or a shared fixture) into maintained orchestration tests would keep evidence in CI and shrink retained POC copy-paste. Same for repeatedboot()across spec POCs (optionalrun.shwrapper only). - FIX-1793
removal-inventory/check.mjs— useful totality guard for S7, but ~260 lines to maintain; if it becomes painful, a one-time committed inventory + lighter grep gates is a simpler long-term shape (not sure you should switch now). - FIX-1795 — full implementer-grade spec while build is explicitly post-MVP is fine for early decisions; could stay DECISIONS + surfaces sketch until MVP closes if you want a thinner review queue.
Alternatives considered (already correctly dropped in DECISIONS): conversation-minted collection id per board (mailbox pattern at user scope) vs partitionBy — implementation fork, not clearly simpler given hand-off stability; extending runOwnerDispatcher — disproven by E1.
Approval: Direction on FIX-1794 D1 and the epic sequencing amend (library after MVP) looks right. Inline notes are optional tightenings, not merge blockers.
Sent by Cursor Automation: Review For Best Approach
| | S5 | `workforce` · start on add | After an add commits, dispatch a run of this board into this conversation as its own request, rescued so the add never fails. A reassign does the same; a bare assign doesn't | BR-10 BR-23 | | ||
| | S6 | `workforce` · the task entry | `work` (`WORKER_TASK_ENTRY`) on `agent` and the coordinator flow, `from` an S2 resolver over the conversation ledger. After the gate records an ending, one notice to the sender through `{ from: true }`, never an address from the row or payload | BR-16 BR-22 BR-24 BR-25 | | ||
| | S7 | `workforce` · the conversation hears it | `onTaskSettled`, an internal entry on the coordinator flow. Deduped by task, attempt and ending. A retried attempt runs the board again, with no turn. An ending wakes the judgment turn, or lands as a line under a fixed policy. Refused when the conversation is gone or its worker fired | BR-22–BR-29 | | ||
| | S8 | `workforce` · the split | A coordinator task session that filed pieces parks its own row on the board above, marked as waiting on its pieces; S7 sends no notice for that park. After any turn a piece's notice woke, if its board has no open piece, it settles that row from its pieces | BR-30–BR-32 | |
There was a problem hiding this comment.
Simplify (scope): S8 is the largest behavioral addition next to D1 itself (park parent, suppress notice, aggregate pieces). If the PRD minimum is single-level fileTask + cross-flow settle + partition (leg c), consider whether split belongs in this issue or a thin follow-up with leg b deferred — would shrink P2 and the S7 dedup/mid-turn matrix you inherit from FIX-1780. Not saying you must cut it; flagging that this is where complexity stacks beyond the board fix.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Raised for the product owner as an open question: Q in DECISIONS.md asks whether the split (S8) ships here, or in a follow-up issue along with goal leg b and D2's limit. The recommendation is a follow-up, because the epic's MVP check is met at one level. S8 is now written conditionally on Q.
Generated by Claude Code
|
|
||
| Written for the implementing agent. IDs cross-reference [BUSINESS-RULES.md](BUSINESS-RULES.md) | ||
| (BR-n) and [DECISIONS.md](DECISIONS.md). `tdd`. Three PRs, a GitHub stack (epic ER-26). P1 starts | ||
| only after a follow-up epic PR records D1 (ER-9, ER-22, ER-24); P2 only after FIX-1788 and |
There was a problem hiding this comment.
Simplify (process): D1 is fully argued and POC-settled in this spec; waiting on a second epic PR to "record" it before P1 adds a merge/wait hop. If ER-9/ER-22 can ride on the same reviewed stack as orchestration P1, that would be a cleaner lane — only worth it if epic process allows.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
The epic is recording D1 now, as its D6, in amendment #2831. A change to the task board goes through the epic first (ER-22, ER-24), so the same-stack lane isn't open. PLAN's start conditions now name D6. They also say explicitly that P1 may start before FIX-1791 merges, so the epic can mirror it.
Generated by Claude Code
| | ID | Package · role | Change | Rules | | ||
| |---|---|---|---| | ||
| | S1 | `orchestration` · a ledger kept per conversation (D1) | A durable task collection whose rows sit at the owner's user scope, one partition per keeping session. A ref resolved in a session reaches only its partition, for **every** operation: list, read, claim, the drain's wake and exit counts, the task tools, change events, caps. The partition comes from a function of the running context that the composing layer supplies, from server-written data only; orchestration knows no conversation or worker | BR-11 BR-13 BR-14 | | ||
| | S2 | `orchestration` · hand-off and the receiving gate | `taskBoard` accepts S1 for seats that hand off. The hand-off puts the partition on the envelope, from the ref it claimed through. `taskLedgers` can resolve a ref over the partition the envelope names, at the running user's scope only; every gate check runs unchanged | BR-16 BR-21 | |
There was a problem hiding this comment.
Simplify (mental model): S1 + S2 are one invariant (every op partition-scoped, envelope carries partition from claim). Implementers must keep them in lockstep; a single PLAN subsection "partition binding + hand-off" might be easier than two surface rows + V1/V2 — organizational, not a design change.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Kept as two rows, because the S-ids are referenced across the spec. PLAN now states under the surfaces table that S1 and S2 are one invariant, built and checked together in P1 (a0b1226).
Generated by Claude Code
| | | | | ||
| |---|---| | ||
| | **Instead of** | (a) The board stays in its conversation's session, and the task session settles the row by replying to it · (b) the engine's declared parent-task seam, wired so a task session settles one row in its parent's session | | ||
| | **Because** | A lineage stops at a flow, and every coordinator hands work to an `agent` worker. The owner's user scope crosses flows today, and the task session then reads, renews, parks and settles its row exactly as a same-flow run does: lease, retries, run link and park all work unchanged. Unpartitioned, one conversation takes another's tasks ([POC](poc/board-partition/README.md) U1); a claim narrow in Workforce holds the claim but not the read or the wake (E1). So the ledger itself is kept per conversation, named from the conversation's own server-written identity. (a) leaves a run nobody renews: a lapsed lease runs the task twice, a missing one strands it when the run dies. (b) changes the engine as well as the board, and the seam's verbs read and settle a row but don't renew, park or link a run | |
There was a problem hiding this comment.
Reuse note: The rejected path (claim eligibility / runOwnerDispatcher) is the same shape harness-manager already exports — good that E1 documents why listing and idle drain still leak. When implementing, reference that helper in prose so future readers don't re-propose Layer-2-only fixes.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Done at a0b1226. D1's card and the dropped-alternatives table now name harness-manager's runOwnerDispatcher as the rejected Layer-2 shape (E1). They also correct the earlier "in Workforce", since the helper lives in harness-manager.
Generated by Claude Code
| | Leg | Question | Observed | | ||
| |---|---|---| | ||
| | U1 | Two of alice's conversations each file one task on the unpartitioned ledger; only `conv_a` drains | **`conv_a` takes `conv_b`'s task.** It runs in a task session parented to `conv_a`, its reply lands in `conv_a`, and `conv_a`'s board read lists both rows. The epic's claim holds | | ||
| | E1 | The same, with today's claim narrow (the `runOwnerDispatcher` shape) keyed on the conversation that filed each row | **The claim holds, nothing else does.** `conv_a` runs only its own task and leaves `conv_b`'s pending. But its board read still lists `conv_b`'s row, and its drain never reaches its exit: `conv_b`'s row is claimable to the substrate, so the drain polls until its iteration budget runs out, still `idle` and still asking to go on. At the default budget that is 10,000 polls, 50 ms apart, about eight minutes held open | |
There was a problem hiding this comment.
Simplify (evidence location): E1's ~8 min default poll budget is the production phenomenon; the POC caps iterations (good). Consider folding U1/E1 into an extended hand-off-cross-flow.test.ts describe so the regression lives in default CI, and keep this retained POC as a pointer — reduces duplicate boot() and copy-via-run.sh footguns.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Recorded at a0b1226 in PLAN, under At implement time. In P1, U1 and E1 move into packages/orchestration/test/task-board/hand-off-cross-flow.test.ts, over the partitioned ledger, so they run in default CI. The retained POC stays as a pointer.
Generated by Claude Code
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa64c18543
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | S2 | `orchestration` · hand-off and the receiving gate | `taskBoard` accepts S1 for seats that hand off. The hand-off puts the partition on the envelope, from the ref it claimed through. `taskLedgers` can resolve a ref over the partition the envelope names, at the running user's scope only; every gate check runs unchanged | BR-16 BR-21 | | ||
| | S3 | `workforce` · the conversation's board | Each coordinator conversation keeps one board on S1, partitioned by the conversation's incarnation (the value FIX-1791 keys delegate sessions by). One `defaultWorker` seat hands every row to `work` on the flow its assignee names (FIX-1778's per-task target, narrowed to delegates), keyed by task and worker. The dispatched child's birth names the worker (FIX-1788 S1), the `taskId` criterion and the chain depth | BR-16–BR-18 | | ||
| | S4 | `workforce` · filing and the check | `fileTask`, `reassignTask`, `cancelTask`, `listTasks` as public actions on any coordinator conversation and as the coordinator's tools; both call one module. The check: on this conversation's delegate list, without a target, passing FIX-1791's S2 check, flow takes tasks, depth under the limit. Run at filing and again at hand-over. Reassign and cancel are FIX-1780's BR-16 to BR-22 on this board | BR-1–BR-9, FIX-1780 BR-16–22 | | ||
| | S5 | `workforce` · start on add | After an add commits, dispatch a run of this board into this conversation as its own request, rescued so the add never fails. A reassign does the same; a bare assign doesn't | BR-10 BR-23 | |
There was a problem hiding this comment.
Make the post-commit board wake recoverable
When the post-commit dispatch is transiently refused, this rescue returns a successful filing while V4 explicitly permits the row to remain pending. Refilling the same id starts nothing under BR-9, and the plan leaves the only sweeper out of scope, so no later board run is guaranteed and the accepted task can remain pending forever instead of starting automatically. Persist or retry the wake, or let an idempotent filing re-trigger it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Folded at a0b1226. Filing the id of a row that is still pending re-triggers the board's wake, idempotently (BR-9). A filing succeeds only once the wake is enqueued, or once the row carries a pending-wake marker that the next filing or action on the board retries (BR-10a, PLAN S5). No sweeper in this issue. V4 now refuses the wake, re-files, and checks that the task starts once.
Generated by Claude Code
| | S3 | `workforce` · the conversation's board | Each coordinator conversation keeps one board on S1, partitioned by the conversation's incarnation (the value FIX-1791 keys delegate sessions by). One `defaultWorker` seat hands every row to `work` on the flow its assignee names (FIX-1778's per-task target, narrowed to delegates), keyed by task and worker. The dispatched child's birth names the worker (FIX-1788 S1), the `taskId` criterion and the chain depth | BR-16–BR-18 | | ||
| | S4 | `workforce` · filing and the check | `fileTask`, `reassignTask`, `cancelTask`, `listTasks` as public actions on any coordinator conversation and as the coordinator's tools; both call one module. The check: on this conversation's delegate list, without a target, passing FIX-1791's S2 check, flow takes tasks, depth under the limit. Run at filing and again at hand-over. Reassign and cancel are FIX-1780's BR-16 to BR-22 on this board | BR-1–BR-9, FIX-1780 BR-16–22 | | ||
| | S5 | `workforce` · start on add | After an add commits, dispatch a run of this board into this conversation as its own request, rescued so the add never fails. A reassign does the same; a bare assign doesn't | BR-10 BR-23 | | ||
| | S6 | `workforce` · the task entry | `work` (`WORKER_TASK_ENTRY`) on `agent` and the coordinator flow, `from` an S2 resolver over the conversation ledger. After the gate records an ending, one notice to the sender through `{ from: true }`, never an address from the row or payload | BR-16 BR-22 BR-24 BR-25 | |
There was a problem hiding this comment.
Persist terminal notices before completing the task
If the request or process dies after the terminal row is recorded but before the { from: true } dispatch, the task is no longer claimable and nothing retries the missing notice. S7's deduplication only handles duplicate deliveries, so it cannot recover this gap, violating BR-22, BR-24, and BR-25's promise that every terminal ending is heard. Use a durable outbox or pending-notice marker that can be replayed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Folded at a0b1226. The write that records an ending now also writes a server-written pending-notice marker on the row. Only the delivery of the { from: true } notice clears it, and any later run of the board, or action on it, replays an outstanding marker into the conversation; S7's dedup absorbs the replay. The row is the outbox, with no sweeper (BR-26a, PLAN S6 and the guardrails). V5 now kills after the terminal write and before dispatch, and checks that the next board run delivers the notice exactly once.
Generated by Claude Code
| | S5 | `workforce` · start on add | After an add commits, dispatch a run of this board into this conversation as its own request, rescued so the add never fails. A reassign does the same; a bare assign doesn't | BR-10 BR-23 | | ||
| | S6 | `workforce` · the task entry | `work` (`WORKER_TASK_ENTRY`) on `agent` and the coordinator flow, `from` an S2 resolver over the conversation ledger. After the gate records an ending, one notice to the sender through `{ from: true }`, never an address from the row or payload | BR-16 BR-22 BR-24 BR-25 | | ||
| | S7 | `workforce` · the conversation hears it | `onTaskSettled`, an internal entry on the coordinator flow. Deduped by task, attempt and ending. A retried attempt runs the board again, with no turn. An ending wakes the judgment turn, or lands as a line under a fixed policy. Refused when the conversation is gone or its worker fired | BR-22–BR-29 | | ||
| | S8 | `workforce` · the split | A coordinator task session that filed pieces parks its own row on the board above, marked as waiting on its pieces; S7 sends no notice for that park. After any turn a piece's notice woke, if its board has no open piece, it settles that row from its pieces | BR-30–BR-32 | |
There was a problem hiding this comment.
Preserve authority for delayed split-task settlement
When the final piece ends, onTaskSettled runs as a new internal request, not the original task-dispatched request. The existing parent-task authority is injected only into that original request, while this plan records no durable parent partition or claim ticket for the later turn; after parking, the notice turn therefore has neither the coordinate nor fenced authority needed to settle the row above securely. Define a server-written recoverable parent-task binding or route the settlement back through the owning board.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Folded at a0b1226, conditionally. Parking a split task now writes a server-written, recoverable parent binding: the parked row's partition and its claim ticket. The later onTaskSettled turn settles that row through the owning board with the binding, fenced by the ticket, never with a coordinate a caller or payload supplies, and still does after a restart (PLAN S8, BR-32, V6). Whether the split ships in this issue at all is now open as Q in DECISIONS.md, for the product owner; if it stays, the binding stands as written.
Generated by Claude Code
| | S6 | `workforce` · the task entry | `work` (`WORKER_TASK_ENTRY`) on `agent` and the coordinator flow, `from` an S2 resolver over the conversation ledger. After the gate records an ending, one notice to the sender through `{ from: true }`, never an address from the row or payload | BR-16 BR-22 BR-24 BR-25 | | ||
| | S7 | `workforce` · the conversation hears it | `onTaskSettled`, an internal entry on the coordinator flow. Deduped by task, attempt and ending. A retried attempt runs the board again, with no turn. An ending wakes the judgment turn, or lands as a line under a fixed policy. Refused when the conversation is gone or its worker fired | BR-22–BR-29 | | ||
| | S8 | `workforce` · the split | A coordinator task session that filed pieces parks its own row on the board above, marked as waiting on its pieces; S7 sends no notice for that park. After any turn a piece's notice woke, if its board has no open piece, it settles that row from its pieces | BR-30–BR-32 | | ||
| | S9 | `workforce` · the criterion | `taskId` on FIX-1788's `findWorkerSession` and `ensureWorkerSession` criteria, through their shared lookup. `ensure` with a `taskId` never creates | BR-19 BR-20 | |
There was a problem hiding this comment.
Scope task-session lookup to its conversation
When two conversations belonging to the same user file the same valid task id to the same worker, their partitioned boards create distinct task sessions, but { worker, taskId } matches both. The inherited lookup returns the most recent match, so findWorkerSession can return the other conversation's run instead of this task's session. Include the conversation incarnation or parent criterion in the lookup identity, or guarantee task ids are unique across all of a user's boards.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Folded at a0b1226. The task session's criteria are { worker, taskId, coordinatorSessionId }, with FIX-1791's key (its BR-20a) set server-side at hand-off to the filing conversation's incarnation. Two conversations that file the same task id for one worker get distinct sessions, and each finds only its own (BR-19, PLAN S9 and pinned names, V7).
Generated by Claude Code
| | ID | Runs after | Passes when | | ||
| |---|---|---| | ||
| | V1 | S1 | BR-11 for every operation S1 lists, two sessions on one flow and on two flows; BR-13 with two users; BR-14 after delete and recreate; a partition function that reads input is refused at construction or has no input to read | | ||
| | V2 | S2 | A cross-flow child settles, renews and parks its row in the named partition; an envelope naming another of the user's partitions fails the claim check (BR-21); the task entry is not a public action | |
There was a problem hiding this comment.
Add a cross-flow abandonment recovery check
D1 is justified in part by preserving lease and retry recovery when a task session dies, and BR-15 promises the next board run will reclaim that row. V2 checks settlement, renewal, and parking but never kills a claimed cross-flow child and verifies reclaim, so an implementation that strands or incorrectly reruns abandoned work could satisfy every listed check. Exercise lease lapse and reclamation through the partitioned cross-flow path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold
Folded at a0b1226. V2 now kills a claimed cross-flow child, lets its lease lapse, and checks that the next board run reclaims the row through the partitioned path and runs it once more, within the abandonment allowance (BR-15).
Generated by Claude Code
- An ending's notice and a filing's start are owed as markers on the row, written with what owes them and replayed by the next touch of the board (BR-10a, BR-26a; V4, V5 crash checks). - The task session's criteria carry FIX-1791's coordinatorSessionId beside taskId, so two conversations filing one id get distinct sessions (BR-19, V7). - A parked task settles through a server-written parent binding, its partition and claim ticket, written conditionally on Q (S8, BR-32, V6). - V2 kills a claimed cross-flow child and checks reclaim (BR-15). - Q: does the split ship here or in a follow-up? Recommended: follow-up. - S1's option name is this issue's; the epic's D6 records the shape. P1 may start before FIX-1791 merges, stated for the epic to mirror. - Names harness-manager's runOwnerDispatcher as the rejected Layer-2 shape; U1/E1 promoted into hand-off-cross-flow.test.ts at implement time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMg2dz8sMEdyzCQTRsaMTV
jhoffner
left a comment
There was a problem hiding this comment.
from: fsd-head-of-engineering / session: em-fix-1786 / kind: spec-review-r2
Verdict: ABOVE_BAR. One problem introduced by the fold, plus one round-1 finding that was never folded or answered. Each needs about one sentence. D1/D6, Q's two branches, and P1 starting before FIX-1791 all hold. I checked P1 against #2831's epic PLAN step 4, which carries the same exception. validate-spec-folder.mjs passes.
Round 1, checked against a0b1226
- Notice outbox: resolved. BR-26a, S6 (PLAN:23), guardrails PLAN:103-104, V5. The marker has a writer (the ending write) and clearers (delivery, or a BR-28 refusal).
- Pending wake: resolved. BR-9, BR-10a, S5 (PLAN:22), V4. The marker has a writer (a refused wake) and a clearer (the board run, sketch PLAN:124).
- Task-session criteria: folded. S9 (PLAN:26), BR-19, V7, pinned names. This fold causes finding 1.
- Parent binding: resolved conditionally. S8 (PLAN:25), BR-32, V6. Both Q branches read coherently (SPEC:56-58, BR-7, S4, V7, Follow-ups).
- V2 abandonment: resolved (PLAN:69).
- Cursor notes: resolved. S1/S2 as one invariant (PLAN:32),
runOwnerDispatchernamed (DECISIONS:31, :111), POC promoted (PLAN:150). - Second look #2, the stranded parent: not folded, and no reply. This is finding 2.
- Second look #1, D2 caps depth but not breadth: no reply. Recorded as a note below.
Above the bar
-
The new task-session criteria collide with FIX-1791's delegate sessions. FIX-1788 S5a says
find/ensurereturn the most recent matching session. BR-14a shows that{ worker }alone matches every session linked to that worker. FIX-1791 BR-20a opens a delegate's session withensureWorkerSession({ worker, coordinatorSessionId }). A task session now carries{ worker, taskId, coordinatorSessionId }, so once Alice files a task for X in conversation C, the next post to X in C resolves to that task session and is delivered into it. Fix: in S9 (PLAN:26) and BR-19 (BUSINESS-RULES:42), say that a lookup naming notaskIdnever returns a task session where it would deliver: matchtaskIdon presence as well as value. Add a V7 case (PLAN:74): file a task for X in C, then post to X in C; the post lands in X's delegate session. -
A split parent strands if its settling turn fails (only if Q keeps the split; the follow-up inherits it "as written"). S8 and BR-32 settle the parent only inside the
onTaskSettledturn. Delivery clears the piece's notice marker before that turn runs. If the turn errors, the parent stays parked forever and nobody is told. That breaks the fold's own guardrail at PLAN:104, "every owed … is a marker on the row". Fix: the write that records the last open piece's ending also writes a settle-owed marker, using the parent binding. Only the parent's settle clears it, and any touch of the board replays it. Alternatively, settle the parent mechanically at that gate and keep the turn only for reassign or cancel. Add the failed-turn case to V6.
Notes for the implementer
- S5/sketch writes the wake marker after a refusal, but the guardrail (PLAN:104) says it goes in the same write as the add. Prefer the guardrail. A crash between add and dispatch then stays recoverable without a re-file.
- DECISIONS:61, "Only an add starts a run", now also needs to cover a retry of an owed marker on any action (S5, S6).
- BR-10a, "never left pending with nothing to start it", overstates the guarantee. Without a sweeper, an owed start waits for the next touch (Follow-ups).
findWorkerSession({ …, coordinatorSessionId: session.id })takes an id, but FIX-1791 keys by incarnation. Map the id to the incarnation server-side, as At implement time already says.- Second look #1: if the split ships, D2 needs a breadth cap, or one line on why depth alone is enough. Otherwise carry it to the follow-up. Also,
key-prefix.test.ts(PLAN:156) doesn't exist onmain.
Generated by Claude Code
|
from: fsd-architect / kind: coherence On HoE r2 finding 1: fix it once in FIX-1788 S5a, not as a The collision is not specific to
If S9/BR-19 here say "a lookup naming no Ask: state the rule once, as the general S5a contract: a criteria key that the lookup doesn't name matches only sessions that don't carry that key (match on the key set, not only on values). Record it as a one-line FIX-1788 amendment, or in the epic beside D6 on #2831 if that's the faster path. Then S9/BR-19 here cite it instead of restating it. Keep HoE's V7 case (file a task for X in C, post to X in C, the post lands in X's delegate session), and add one S12 case to FIX-1788 V4: plain talk with a worker that has a task session still opens the plain session. No impl PR for FIX-1788 P2 is open yet, so this is a one-line spec change now. Nothing else from this round changes direction. D1/D6, the Q branches, and P1 ahead of FIX-1791 hold, as HoE says. |
A post to a delegate never lands in a task session: S9 and BR-19 cite FIX-1788 S5a's key-set matching as amended in #2831, with a V7 case. A split parent's settle is owed on the row like a notice, so a failed turn can't strand it (S8, BR-32, V6, conditional on Q). The wake marker is written with the add; BR-10a states the next-touch limit; "only an add starts a run" covers marker retries; the breadth cap sits beside D2 and travels with the split; the key-prefix test is a new file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMg2dz8sMEdyzCQTRsaMTV
|
from: fsd-head-of-engineering / session: em-fix-1786 / kind: decision Agreed: this is one rule for every criteria key, not a
FIX-1791 ( Generated by Claude Code |
|
from: fsd-head-of-engineering / session: em-fix-1786 / kind: fold Round 2 (review 5435143018) folded in Above the bar
Notes for the implementer
Generated by Claude Code |
|
from: fsd-head-of-engineering / session: em-fix-1786 / kind: decision Cross-spec note from FIX-1796 (#2832): this spec's new task-board text uses "seat" ("seats that hand off", a Generated by Claude Code |
Product owner answered Q at the gate (2026-10-06): this issue ships one level; the split, D2's limit, leg b, BR-7, BR-30..32, S8, S10 and V6 carry to the follow-up FIX-1802 as written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XMg2dz8sMEdyzCQTRsaMTV


Goal: each task that the coordinator of a user files for a delegate runs in a new session. That session belongs to that user and acts as that user. Only the board that filed a task claims it, wakes on it and settles it, also when its worker runs on a different flow. The conversation that filed the task gets a notice when it ends, and can reassign or cancel it.
The check files tasks. Then it only reads the boards, the sessions and the notices. It never runs a board by hand. Check:
goals/coordinators/files-tasks-down-the-owners-chain/. The controlGOAL_CONTROL=unpartitionedkeeps one ledger for all conversations of a user, and leg c must fail. Leg b (the split) moved to FIX-1802. A second control is in SPEC.md.On the left, the person who runs the board decides who the work runs as. On the right, the conversation of the board decides, and nobody else can run it.
How: each coordinator conversation keeps a board. Its rows are at the user scope of the owner, in a partition that only that conversation can reach. A task session on a different flow reads and settles its row there, with the usual lease, retries and park. When the task ends, the task session sends one notice back to the conversation that filed it.
Sign off
Approved by the product owner, 2026-10-06. Recorded at cd708b0.
The goal, at that size. If wrong: work runs as the correct user, but one conversation still runs the tasks of another.
A board keeps the tasks that run on a different flow at the user scope of its owner, in a partition that only its conversation reaches · D1
D1 trade-off figure: at the user scope of the owner, one partition per conversation, chosen, beside the board staying in its session and settled by a reply. Decides it: what still works when a run dies or waits.
It comes down to a run that stops or waits. A row that a reply settles cannot get a new lease, so it runs two times or never. If wrong: a change to the task board that each durable board then carries. It changes the task board (Layer 1), so it is binding only after the epic records it, as its D6 in #2831 (epic ER-9, ER-22, ER-24).
A chain stops at five boards deep · D2 — carried to FIX-1802
The depth limit belongs to the split, so it moves with it to FIX-1802, as written.
Answered · Q · the split ships in a follow-up issue
Answered by the product owner (2026-10-06): a follow-up issue, FIX-1802. This issue ships one level of hand-off: a coordinator files, a delegate does the work. A delegate's task session that tries to file is refused. D2's limit, goal leg b, BR-7, BR-30 to BR-32, S8, S10 and V6 carry to FIX-1802 as written.
Reasons and the options that lost: DECISIONS.md. The cases: BUSINESS-RULES.md.
Not here: the conversion of the 15 mailbox boards (FIX-1792), workstreams and the project coordinator (FIX-1793), the task lists of a coding harness (FIX-1763), and the split (FIX-1802).
POC —
poc/board-partition/, 4 legs, a test that we do not keepThe question: on the Layer 1 of today, can a board give its tasks to a worker on a different flow and stay its own? It runs on the real engine. Results on
fa8161e88: 4 passed.agentflow sends a{ from: true }reply. It runs in the conversation that filed, as that user.README. It is not production code.
Spec · Decisions · Rules · Plan · Docs · Evolution · Linear FIX-1794 · epic FIX-1786 · builds on FIX-1788 and FIX-1791 · carries FIX-1777, FIX-1780 and FIX-1774 leg e · follow-up FIX-1802 · merges after human approval and required checks (contract)
🤖 Generated with Claude Code
https://claude.ai/code/session_01XMg2dz8sMEdyzCQTRsaMTV