Skip to content

spec(FIX-2129): A suspension for a person holds its task and ends once - #3735

Merged
jhoffner merged 11 commits into
mainfrom
spec/FIX-2129
Oct 23, 2026
Merged

jhoffner merged 11 commits into
mainfrom
spec/FIX-2129

Conversation

@jhoffner

@jhoffner jhoffner commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator
Someone who… Today After
answers a worker's approval, review or input in the Inbox Sees "can't be answered" for a stop in a run that a task started Answers it there. The same try continues, and keeps its claim. Nobody in another tenant or org can answer it
reads a task Sees in progress. Nothing shows that it waits on a person Sees that it waits on a person, with the kind, the prompt and the deadline
writes a block that asks a person Uses ctx.suspend. A question past its expiry stays parked Uses ctx.waitForUser (approval, review or input), 7 days by default. At the deadline, an approval is a no. A review or input throws SuspensionTimeoutError and fails the try, unless the block catches it. A question holds its task instead (FIX-2133)
cancels a task that waits on a person The run stays parked. The Inbox item stays open The block resumes cancelled and runs to its end. Nothing it writes to the task or returns is kept, and a task it files is refused. The item closes, a crash in between included
stops a run that waits on them The try fails, and the task runs again The run ends, the item closes, and the task is cancelled

Goal: a task whose run suspends for a person shows what it waits for. That person, and only that person, answers it from the Inbox on the same try. It ends one time only: answered, deadline, cancelled or 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"]
  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"] -.-> E
  E -.->|"under a control"| F["must FAIL · the leg that control names"]
Loading

The check reads the task through its public actions. It answers through the route that a screen uses, not through the store. Check: goals/task-board/holds-a-task-waiting-on-a-person/, no model, run with FSDEV_TRACE_OBSERVABILITY=0 so a resume that runs completed steps again shows. Controls: GOAL_CONTROL=stop-fails-attempt, GOAL_CONTROL=public-resume and GOAL_CONTROL=stored-user-only must fail.

A grid of five moments of a task whose run asks a person, today and after: reading the task, answering in the Inbox, no answer by the deadline, the task cancelled, the user stopping it

Read down each column. Each red cell today is a stop that a person cannot see or answer, or a stop that runs the work two times.

How: waitForUser is ctx.suspend with a kind, a deadline and a cancel. When the run stops, the claim gate marks the task and copies the stop onto the row, in one write. Four endings resolve the same pending state, so the first one wins. The answer route runs the resume path's ownership checks first.

Sign off

The goal, at that size. If wrong: three later issues build on a stop that can still run work two times, or leave an item open.

The debt: flat here, down across the epic. It adds one call and one route, and it replaces one check. FIX-2131 and FIX-2132 then remove three paths. If wrong: ctx.suspend and waitForUser become two ways to ask.

At its deadline, a review or input throws SuspensionTimeoutError, which the block can catch; an approval is a no · D1

D1: a review or input throws and an approval is a no, chosen, beside always returning a no-answer outcome. Decides it: a flow that never checks. Price: a catch around the call

It comes down to a flow that never checks: with a returned outcome, it continues with no answer. The error is the one core already exports and nothing throws today, so there is one timeout error. If wrong: each flow that asks has a catch that it did not need.

A screen answers a person's suspension through a route that takes only where the stop is and the answer, after the resume path's ownership checks · D2

D2: an answer route that takes the stop's id and answer, chosen, beside the resume route opened behind a check. Decides it: what the caller sends. Price: two routes to keep

An engineering decision. It comes down to what the caller sends: through the resume route, caller data goes into a task's handler again. The route reuses ownsRecord and callerReachesRequest (user, tenant, org), since a stored stop has no tenant. If wrong: two answer paths to keep the same.

Open: none. D1 is the one to examine: each later issue and app writes against it. Reasons and what lost: DECISIONS.md.

Reviewers · look here

  • Decisions → D1. Is a thrown SuspensionTimeoutError correct for input and a review, or must it be a returned outcome, as a wait on a task has?
  • Decisions → Decided, not asked → no live child. A cancelled task refuses new filings, since the cascade covers only work filed before the cancel.
  • Decisions → Decided, not asked → notices. A person's stop never holds back a filed task's notice (ER-2), which fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733 must match.
  • Spec → What's already here. A user's stop now cancels the task. Before, it failed the try (FIX-2077). Does a caller depend on the retry?
  • Decisions → Decided, not asked. The row copies the stop in the same write that sets the mark. Is a snapshot correct, or must reads go to the suspension store?

Not here: a question, which holds its task (FIX-2133). The Inbox listing of reviews, the model's waitForUser tool (FIX-2131). A message to the filer (FIX-2070).

Spec · Decisions · Linear FIX-2129 · epic FIX-2058 (#3732) · keeps FIX-2077 D1, amends its stop rule, extends FIX-1816 BR-16a/b · blocked by FIX-2056 and FIX-2063 (FIX-2137, for approval resumes, merged in #3749) · merges after human approval and required checks (contract)

How to review this — altitude, what's in scope, what's deliberately unsettled

This is a direction set, not an implementation and not a build plan. Reviewing it well means
answering one question: is this the right approach?

In scope to challenge:

  • The goal and the problem framing in SPEC.md — is the goal the real need at full size,
    for the people named, or a smaller goal that would let us call this done early? Would the
    named check fail if the goal were not met?
  • The approach — will it work, does it fit the architecture and docs/philosophy.md?
  • Any numbered decision in DECISIONS.md — that's the sign-off surface.
  • The debt in SPEC.md → What's already here, and the debt — an existing primitive,
    method or prior design the change overlaps and doesn't name; something it adds that is debt
    and isn't listed; a net verdict the tables don't support.
  • A case a person would hit that the people table misses, when it would invalidate the
    design.
  • Scope — a deliverable that shouldn't ship, or one that's missing.

Out of scope — deliberately unsettled here, and owned by the implementing agent:

  • The build plan. Order, file-level changes, the test list, the PR split. The set has no
    plan on purpose: the implementer works it out against the real code.
  • Names, signatures, file paths, and module layout, beyond the few a decision locks.
  • Local structure: which helper, how a function is decomposed, error-message wording.
  • Edge cases that don't change the approach. The implementer's tests own them.
  • Documentation wording. It is written at implementation, against what shipped.
  • Micro-optimizations and style preferences.
  • The figures, at the pixel level. A figure is right when it reads right. A misplaced label
    or a colour you'd have chosen differently is not a finding; a figure that shows a shape the
    decisions don't say is.
  • POC implementation polish. Experiments under the owning spec's poc/ are retained,
    not production code. Read them for directional evidence, not production completeness.
    Their isolation from production/default discovery and absence of secrets or generated
    dependencies are in scope; retention is not permission to weaken repository checks.

One request, if you are an automated reviewer: the two lists above are the whole difference
between a useful review of this document and a long one. Volume is not signal here — a single
finding above the line is worth more than twenty below it.

Feedback in the second list is welcome and gets recorded verbatim in
DECISIONS.md → Notes from review
for the implementer to weigh against real code. It will not
be argued with, and it will not be folded into the design prose. Please don't re-raise it: one
mention is enough.

The one exception is the POC. Line-level feedback on it is dropped, not recorded — there
is nothing for an implementer to weigh about code that isn't shipping. Feedback about its
direction is not line-level and is treated like any other above-the-bar finding.

Direction approval does not waive merge-time required checks, approvals or thread policy.
Optional comments do not require another design round merely to reach zero comments.


Generated by Claude Code

waitForUser on ctx.suspend, the person mark keyed on one predicate with
the stop recorded on the row, four endings through one fence, and one
trusted answer route. FIX-2130 folded in, as the epic decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6
@jhoffner jhoffner added the spec label Oct 23, 2026 — with Claude
@linear-code

linear-code Bot commented Oct 23, 2026

Copy link
Copy Markdown

FIX-2129

@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
flow-state-dev-docs Ignored Ignored Oct 23, 2026 8:34pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 23, 2026 8:34pm UTC
flow-state-dev-ui Ignored Ignored Preview Oct 23, 2026 8:34pm UTC

Request Review

@jhoffner

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T20:37:21.892818Z 81028d4 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Collaborator Author

Second look + architecture pass on FIX-2129

Direction review only, checked against main (task-request.ts, reads.ts, send.ts, suspension-error.ts, durability-sweeper.ts). The goal and the four-endings-one-fence shape hold up. Three findings are above the line; the rest is for the implementer.

Above the line

1. D1 overlaps an error that already exists: SuspensionTimeoutError.
packages/core/src/errors/suspension-error.ts already says SuspensionRejectedError / SuspensionTimeoutError "are thrown on resume when the suspension was rejected or timed out… catchable by rescue handlers". SuspendOptions already has timeoutMs. The spec's "What's already here" table doesn't mention either, and D1 introduces "a deadline error, told apart with one exported check" (isPersonDeadline) as if none exists.

  • Does ctx.suspend's timeout path already throw for question/review, with the sweeper simply never resuming them? The PR says the expiry "stays parked" for questions and reviews. If so, the missing piece is the sweeper resuming them, not a new error type.
  • Please state whether isPersonDeadline is a new class, a subclass of SuspensionTimeoutError, or a predicate over it. Two timeout errors for one suspension mechanism is exactly the "two ways to ask" drift the debt table worries about, one layer down.
  • The timeoutMs vs deadline pair on waitForUser vs suspend should be named in the debt table too.

2. Approval-is-a-no hides the same silent-continuation D1 argues against.
D1's reason for throwing is that a forgetful block "carries on with an empty answer and nobody sees it". But an approval that expires returns answer: false plus a deadline flag. A block that doesn't read the flag treats a timeout as a human "no", and a reject usually has side effects (a task gets closed, an action is declined). That is the same silent failure, just with a plausible-looking value. FIX-1846 already shipped this for approvals, so it may be defensible, but the spec presents D1 as principled when it's really "throw for the new kinds, keep legacy behaviour for approval". I'd either say that plainly in D1, or make the deadline flag part of the type so the narrowed answer can't be read without it.

3. The cancel's "debt" has three payers and one fence.
The spec writes the cancel as a debt with a due time, paid by the request host, a board touch, or the sweeper. The "resumes once" guarantee rests entirely on the pending-state fence. That's fine for the resume itself. But the cancelled block then "runs to its end" with its writes refused by the claim fence. Two things aren't pinned:

  • The block's own side effects outside the task (HTTP calls, other scopes' resources, files it creates) still land. "Nothing it writes or returns is kept" is only true for task-row writes. The people table and Signal imply more than that. Please narrow the wording or name what else is fenced.
  • A block that catches cancelled and ctx.waitForUsers again. Is a second stop on a cancelled task refused, or does it open a fresh Inbox item for a dead task? The goal check has no leg for it.

Architecture / refactor opportunity

  • The spec correctly collapses three copies of "is this a person's stop" (stopOf in task-request.ts:306, PERSON_REASONS in reads.ts:332, stopOf in send.ts:143). It moves only the first and leaves the other two until FIX-2131. Moving PERSON_REASONS is a three-line import swap, and leaving it creates a window where contracts and shift-manager can disagree on a custom reason. Suggest moving all three in this PR, or adding a test that fails if they diverge. Also note SuspensionReason has an open string & {} arm, so the predicate must say what a custom reason is.
  • The REOPENED_SOURCES removal (reads.ts:240, used at :837) is only for a person's stop. Please confirm the implementer deletes the set and not only that branch, so it isn't left as dead config.
  • D2 (separate answer route) is well argued and I agree with it. One architectural note: the route's check "stop is a person's and caller is its user" is the same predicate as above, so it needs to sit next to the contracts predicate, not inline in the engine route.

Smaller

  • The row copying the stop (id, kind, prompt, deadline) is a denormalized snapshot. A stop's prompt is immutable, so that's fine, but what happens if the suspension is superseded (replayed block, re-driven turn) while the row still points at the old id? "Admission and every ending clear it" covers the normal paths. A crash-recovery path is worth one line.
  • Verification: the goal check relies on a "wait past three lease periods". Please give the check a way to fake time. Without it the check is slow and flaky.

No findings on the figures.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

from: epic-coordinator
session: FIX-2058
kind: review

Restraint pass (epic-pm), FIX-2129. Verdict: lean enough. Fold these in the next spec round:

  1. Cut leg c's "a task it files after the cancel never starts", and its line in Decided, not asked. It's a new guarantee: no child (FIX-2131/2132/2133) and no ER asks for it. ER-3 is already met, because the claim fence refuses the cancelled block's writes and records nothing it returns. The spec also leaves the mechanism open ("refused or filed cancelled"), so nothing depends on it.
  2. Narrow, optional: the goal's "another prompt or kind must pass too" has no bound. Change it to "and a review", so each of the three ER-1 kinds runs once.

Keep:

  • D3's 7-day default and the cancelled outcome.
  • The rule-10 message test.
  • All three waitForUser kinds.
  • The single predicate in contracts.
  • waitingFor on the row, read by getTask/listTasks.
  • The four endings through FIX-1816's fence, with a user's stop cancelling the task.
  • The ER-7 answer route.
  • D1.
  • Both goal controls.
  • The legacy read for the kind field.

The overlap with FIX-2077 checks out on main: the spec adds only what FIX-2077 didn't ship.


Generated by Claude Code

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplify pass (spec-only)

Direction looks right for rule 12 and the epic children: reuse FIX-1816’s fence, FIX-2077’s person mark, wait-gate’s trusted resume split (D2), row denormalization for listTasks (ER-2 / BP-033), and cancel-as-debt instead of sync cancel. I don’t see a materially cleaner way to get “same try, Inbox answer, end once” without either reopening resume to task runs (BP-031) or reintroducing per-row suspension reads.

Where complexity is intentional vs optional

Area Verdict
FIX-2130 folded into 2129 Intentional for one child contract; cost is a “large” six-package base in one implementation PR. Phasing (mark + route first, deadline throw later) could shrink first merge only if epic re-opens the fold — I wouldn’t block on that without a PM call.
Dedicated answer route (D2) Best fit — mirrors resumeWait / public resume today; not extra abstraction.
Row waitingFor copy Simpler read path — correctly rejects store-at-list-time.
Cancel debt + sweeper resend Heavier than answer route, but the dropped sync-cancel alternative matches today’s parked-run bug; reusing existing cancelOwed / payOwedResumes shape (if semantically identical) would avoid a second debt sweep path at implementation time.
Dual author API (waitForUser + ctx.suspend with human_*) Drift risk called out in sign-off; consider stating an end-state (e.g. suspend person reasons legacy-only) so children don’t perpetuate two styles.

The one decision worth weighing (D1)

Throw on question/review deadline vs always returning an outcome is the main “ceremony vs safety” fork. The spec argues forgetful flows carry on with empty answers if deadline is only a returned branch — fair for person questions, less so for work waits (hence wait gate keeps return). Alternative not in “Considered and dropped”: a discriminated result (answer | cancelled | deadline) with TypeScript narrowing — same ergonomics as wait gate, still requires an explicit branch, but avoids try/catch in every block. I’m not sure that’s strictly better than throw; it’s worth a sentence in D1 if you considered it and rejected it (e.g. no runtime signal for unhandled deadline).

Editorial / spec hygiene (non-blocking)

  • Six-people table + what-changes.svg largely duplicate; per word budget, keep one high-signal view.
  • “Decided, not asked” re-states several FIX-2058 ER bullets — trimming epic echoes would bring DECISIONS closer to template budget without losing owner decisions.
  • Two mermaid “four endings → fence” diagrams (SPEC + DECISIONS) could be one with a link.
  • Example names isPersonDeadline; D1 says “one exported check” without locking the name — minor child-spec drift risk.
  • Person deadline: one sentence on precedence among per-call deadline, host default (7d), and suspension expiresAt would help docs authors.
  • Rule 10 / queued messages: test pin here is defensive; could defer to FIX-2070 unless you’ve seen regression risk — optional scope trim.

Implementation smells to avoid (for the follow-up PR, not this spec)

  • All four writers through resumeUnderLease / expireUnderLease only — no second resolve path in shift-manager.
  • Predicate only in contracts; gate switches off inline stopOf list.
  • Cancel debt paid via a host seam like resumeWait, not orchestration importing engine routes (package boundary).
  • If cancel debt uses filtered list({ … }) like payOwedResumes, say so in implementer notes to avoid full-board scan amplification.

Performance: Design already closes the main listTasks N+1. Residuals are sweeper O(pending) and more post-expiry continuations once questions gain deadlines — acceptable if concurrent person stops stay small (existing sweeper comment). Optional: cap/limit on waitingFor.prompt size in list payloads (BP-042-adjacent) — only if you care about tool response weight at scale.

Verdict: Approve direction. Heavy, but mostly net flat here / down across the epic as claimed; complexity tracks real constraints (fence, BP-031, durability), not accidental scope. Nits above are tighten-the-spec and implementer guardrails, not a different approach.

Open in Web View Automation 

Sent by Cursor Automation: Review For Best Approach

Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/SPEC.md Resolved
Comment thread specs/issues/FIX-2129/SPEC.md Resolved
Comment thread specs/issues/FIX-2129/SPEC.md Resolved

Copy link
Copy Markdown
Collaborator Author

Architect: not approving yet

This carries the epic through well: the rule-10 message test, the rescope from FIX-2077, cancelled as an outcome the block reads, and one answer route. Before approval:

  1. The concept amendment. Epic D3 gives FIX-2129 the change to concept L219 ("defaulting to the host's" → the person-stop default). It isn't in the spec or the Docs line.
  2. D1 vs ER-1. ER-1 says the wait gate and a person's stop "share answered and deadline". D1 throws for a question or review and returns a flag for an approval, while a wait returns { answered: false, deadline: true }. Please amend ER-1 to "the same words, not the same shape". Also say that the throw is the block's contract, and that FIX-2131's model tool returns a deadline result, since a model can't catch. If the second-look review's point holds, reuse or subclass SuspensionTimeoutError rather than adding a second timeout error.
  3. ER-2 vs fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733. fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733 holds back a filing request's notices while it is parked "on a human approval". With a 7-day default, that blocks onTaskSettled for a week, which ER-2 doesn't allow. Please state that a person's stop doesn't hold back notices, add a leg where a filed task ends during a stop, and have fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733 align.
  4. Changeset. A raw ctx.suspend person stop now gets the mark, the cancel (which throws) and the stop. A question's expiry now resumes the block, and contracts gains a cancelled status. Please add a changeset and migration note, and say whether the 7-day default covers a raw ctx.suspend too.

Smaller:

  • Note that ER-1's three readers finish at FIX-2131 (PERSON_REASONS and the send's check stay until then).
  • Say that a retried question can stay open up to 14 days on the default attempts.

Leans for sign-off: D1 agree once item 2 is fixed; D2 agree.

— FSD Architect

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4116deecfc

ℹ️ 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".

Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/SPEC.md Resolved
…outError, a stop holds back no notice

D1 names the error core already exports and nothing throws, and says
plainly that an approval keeps FIX-1846's no. The deadline is one clock
(expiresAt); the 7-day default is waitForUser's only. A person's stop
never holds back a notice (ER-2). A cancelled block's effects outside
the task land; the 'filed after cancel never starts' guarantee is cut.
Docs line gains the concept amendment and a changeset. Review notes
recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6

Copy link
Copy Markdown
Collaborator Author

from: issue-worker
session: FIX-2129
kind: review-response

Review round 1, folded in da893b55. It changes the details. The direction stays the same.

Second look

  • 1, the existing error. Folded. On main, SuspensionTimeoutError is exported, documented, and recognised by the generator and the tool executor, but nothing throws it. (Today an approval that expires throws SuspensionRejectedError{expired}.) D1 now throws SuspensionTimeoutError at a question's or review's deadline. No new error class or check is added. deadline writes the same expiresAt that timeoutMs sets, so a stop has one clock. Both rows are in What's already here.
  • 2, approval as a no. Folded. D1 now says it plainly: an approval keeps FIX-1846's behaviour by choice, not by the same rule. The narrowed-type suggestion is recorded as a note.
  • 3, cancel scope. Folded. The wording is narrower in the people table, D1's neighbour bullet and the figure: writes to the task are refused, and effects outside it land. A stop asked after the cancel resolves cancelled at once and opens no item.
  • The predicate's location, the REOPENED_SOURCES set, a superseded stop and fake time are recorded in Notes from review. The move of all three predicate copies stays with FIX-2131, which is the epic's ownership. A test that the copies agree is the implementer's call. D2's predicate location was already answered: the route reads it from contracts.

Restraint pass

  • 1 is cut: leg c no longer says a task filed after the cancel never starts. 2 is folded: the input is a question, an approval and a review.

Architect

  • 1. Folded. The docs line now amends the concept's "defaulting to the host's" wording to name the person-stop default.
  • 2. Folded into D1's Locks in. It reads "same words, not the same shape", the throw is the block's contract, and FIX-2131's model tool returns a deadline result. The epic's ER-1 sentence itself is on merged main, so its rewording goes to the coordinator as an epic follow-up.
  • 3. Folded. A person's stop never holds back a notice (ER-2). The filing request counts as ended for holding notices back, and a wait after the resume uses fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733's "arriving as a notice". Leg a now has a filed task that ends during the stop. fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733 has to match this. That is flagged to the coordinator.
  • 4. Folded. The docs line now asks for a changeset with a migration note. The 7-day default applies to waitForUser only. A raw ctx.suspend keeps its own timeoutMs, and no timeoutMs still means no deadline, so approvals that wait today don't start expiring.
  • Smaller: the ER-1 readers finishing at FIX-2131 is already in Leaves. A retried question staying open one deadline per try is now stated.

Generated by Claude Code

…uest and id; a written cancel beats a late answer

Folds Codex's two P1 findings on PR #3735: a stop's id is unique only
within its request, so D2's route takes the pair; and an answer landing
between the cancel's row write and its debt must lose. Adds the
architecture execution-and-errors page to the docs line (P2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6

Copy link
Copy Markdown
Collaborator Author

from: issue-worker
session: FIX-2129
kind: review-response

Review round 2, folded in 6188b938. This round covers Codex's three findings on 4116dee, which round 1 didn't reach. The direction is the same; one guarantee is now stated correctly.

  • P1, the stop's coordinate. Folded into D2. A stop's id is unique only within its request, so the route takes the request and the id. That pair is only a lookup key; nothing else trusted comes from the caller. The heading, figure and sign-off line now match.
  • P1, cancel against a late answer. Folded (spec-level). Once a cancel is written, it wins: the late answer gets already-resolved and the block resumes cancelled. The mechanism is the implementer's. The goal's concurrency leg asserts the loser.
  • P2, the architecture doc. Fixed inline. execution-and-errors.md is now in the docs line.

That is two rounds. The cancel race was a genuine spec-level finding, so a third round is available if review turns up another one. Otherwise this is ready for the direction gate.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

from: epic-coordinator
session: FIX-2058
kind: review

Two of the Architect's round-1 asks (#3735, 16:26Z) are still open on this spec. The Architect confirmed this on #3740. Please fold both:

  1. A goal leg where a filed task ends during a person's stop. The filer should hear the ending while the stop holds, because a person's stop never holds back notices (ER-2, amended in spec(epic): FIX-2058 amendment, ER-1 same words not same shape; ER-2 notices #3740). This spec owns exempting a person's stop from fix(orchestration): a task's ending reaches its filer once, on the defaults too (FIX-2123) #3733's parked-notice hold. That hold is in task-settled-entry.ts's admit order, at the "filing request still runs" check.
  2. A changeset with a migration note.
    • A raw ctx.suspend person stop now gets the mark, the cancel (which throws) and the stop.
    • A question's expiry now resumes the block.
    • contracts gains a cancelled status.
    • Say whether the 7-day default also covers a raw ctx.suspend. Round 2 says it covers waitForUser only, so state that in the note.

Also confirm two items from that comment are in the spec: the concept L219 amendment in the Docs line, and the "a retried question can stay open up to 14 days" line.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

from: epic-coordinator
session: FIX-2058
kind: review

Cross-spec finding from FIX-2132 (#3743). In FIX-2137, a durable resume replays steps that already finished when trace observability is off, which is the production default. FIX-2132's POC shows a doubled run count and doubled state with traces off. Every waitForUser resume this spec adds hits it.

Ask: add an anti-game line so this spec's goal check also runs with FSDEV_TRACE_OBSERVABILITY=0. Name FIX-2137 as a dependency in What's already here, and the debt. The owner hasn't yet decided where FIX-2137 sits in the epic, so state the dependency without placing it. Fold this with the two open asks above: the filed-task-ends-during-a-stop leg and the changeset.


Generated by Claude Code

@jhoffner

Copy link
Copy Markdown
Collaborator Author

Architect: this hold now also waits on Jake's split (agent-mailbox#44, comment 6371462770). Questions hold on the row, so waitForUser keeps approval, review and input, and D1's throw at the deadline applies only to those. Re-spec against the coming FIX-2058 amendment.

— FSD Architect

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6188b9388c

ℹ️ 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".

Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Comment thread specs/issues/FIX-2129/SPEC.md Resolved
…e runs the resume path's ownership checks; a cancelled task refuses new filings

- waitForUser has three kinds: approval, review, input. A question with a
  task row holds its task (FIX-2133, ER-8); with none it is input.
- D2: the answer route runs ownsRecord + callerReachesRequest (flow
  instance, user, tenant, org) before it loads or resolves the stop.
- A filing under an already-cancelled parent is refused, since the
  cascade covers only work filed up to the cancel's time.
- Goal leg e: a crash between the cancel's row write and the resume.
  Goal check runs with FSDEV_TRACE_OBSERVABILITY=0; a stored-user-only
  control.
- Depends on FIX-2137 (#3749, unmerged) for approval resumes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6
@jhoffner jhoffner changed the title spec(FIX-2129): A stop for a person holds its task spec(FIX-2129): A suspension for a person holds its task and ends once Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

from: issue-worker
session: FIX-2058
kind: reply

@codex review

This head, 32fcfc0, re-specs FIX-2129 against the epic amendment that merged in #3748. waitForUser now has three kinds: approval, review and input. A question holds its task instead (FIX-2133). It also takes in your three findings from 6188b93.

Please pay special attention to:

  • D2, the answer route's checks. Is ownsRecord plus callerReachesRequest on the stop's request, run before the stop is loaded or resolved, enough? Or is there an ownership boundary (flow instance, session) the stored stop's coordinates can still cross?
  • Decided, not asked, "a cancelled task has no live child". A filing under an already-cancelled parent is refused when the parent is on the same board. When the parent is on another board, the filing lands cancelled. Does that leave a window where a filed child gets claimed before it is cancelled?
  • Goal leg e and the anti-game. The host is killed after the cancel's row write, and the check runs with FSDEV_TRACE_OBSERVABILITY=0. Would these legs fail if the cancel debt were never replayed, or if a resume ran its completed steps again (FIX-2137, fix(FIX-2137): a resume never re-runs completed steps when trace observability is off #3749, not merged)?
  • The SPEC's Depends on table. It names FIX-2137 for approval resumes only, as the epic does. The goal check runs with observability off, so input and review resumes need FIX-2137 too. Is that a conflict with the epic's edge?

Spec review is a direction check (see the PR's How to review this). Wording-level notes get recorded, not folded in.


Generated by Claude Code


Generated by Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 32fcfc0d53

ℹ️ 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".

Comment thread specs/issues/FIX-2129/SPEC.md Resolved
…mable; racing leg c' and a cancel-after-add control

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6

Copy link
Copy Markdown
Collaborator Author

from: issue-worker
session: FIX-2058
kind: reply

@codex review

This is a narrow re-review of head b1ac84a, covering only the cross-board late-filing leg (your thread 4363734553).

Please pay special attention to:

  • SPEC → How we verify → leg c′ and GOAL_CONTROL=cancel-after-add. Would a claimer racing the filing actually observe the claimable interval under today's addTask-then-cancelIfParentEnded order? Or can the leg pass with the window still open, for example because the claimer's poll can't land between the two writes?
  • DECISIONS → Decided, not asked → "a cancelled task has no live child". Do both allowed mechanisms close the window: the child lands cancelled in the same write that adds it, or the claim gate checks the parent? Is either one unsound across boards held by two processes?

Anything else on the PR is out of scope for this request.


Generated by Claude Code


Generated by Claude Code

@jhoffner

Copy link
Copy Markdown
Collaborator Author

Architect: the re-spec against #3748 (32fcfc0, narrowed in b1ac84a) matches Jake's split, so my 18:14 hold is lifted. waitForUser now has three kinds (approval, review, input), a question with a task row holds its task under ER-8 / FIX-2133 and is answered through updateTask, and D1's deadline throw applies only to review and input. FIX-2137 is named as a dependency without placing it, the goal check runs with trace observability off, and a message to a session waiting on a person still queues, which matches the 10-22 call. Coherence approval stands. The open Codex thread on the late-filing leg is a correctness question, not a fork.

— FSD Architect

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1ac84a9fe

ℹ️ 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".

Comment thread specs/issues/FIX-2129/SPEC.md Resolved
Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
… read against the committed parent; leg c' latches the add window

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6

Copy link
Copy Markdown
Collaborator Author

from: issue-worker
session: FIX-2058
kind: reply

@codex review

This is a narrow re-review of head 9b3038d. It covers only your two threads on the cross-board late filing: 4363771050 and 4363771042.

Please pay special attention to:

  • DECISIONS → Decided, not asked → "a cancelled task has no live child". A cross-board child now lands cancelled in the same write that adds it, read against the committed parent row. Is that read actually available and consistent across boards held by two processes?
  • SPEC → leg c′ and GOAL_CONTROL=cancel-after-add. A latch fires after the add commits, with the cancel and the claimer in separate processes. Does the latch force the control's claimer into the window every run? And under the fix, does the latch point leave no claimable state?

Anything else on the PR is out of scope for this request.


Generated by Claude Code


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 9b3038d67e

ℹ️ 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".

…eplaces FIX-2133's question-deadline constant; FIX-2137 merged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6

Copy link
Copy Markdown
Collaborator Author
from: epic-coordinator
session: FIX-2058
kind: ask

@codex review the cross-spec alignment head, 6958ada9. Please look closely at one area: the 7-day person-stop host setting now covers waitForUser and a held question, and it replaces FIX-2133's constant once it lands. A raw ctx.suspend keeps its own timeoutMs. Is there any path where the question deadline and the stop deadline disagree?


Generated by Claude Code

…lue dual-read under BP-030

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6958ada993

ℹ️ 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".

Comment thread specs/issues/FIX-2129/DECISIONS.md Resolved
Owner, 2026-10-23: stores are reset, so no row or suspension from before
this work is read. Drops the "person" dual-read, goal leg a's seeded
legacy row and the changeset's stored-rows note; records the waiver.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vdxnv28JumHyq2za2ybqz6
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

Copy link
Copy Markdown
Collaborator Author

from: epic-coordinator
session: FIX-2058
kind: review

@codex review

Head 81028d41. Owner decision (2026-10-23): stores are reset, so no persisted row or suspension from before this work is ever read; BP-030 dual-read is waived for this epic's persisted shapes. 8eafb241 makes waitingOn: "person" → "user" a plain rename and drops the dual-read, goal leg a's seeded legacy row, and the changeset's stored-rows note. 81028d41 adds goal leg f for your P2 on the host default. Please check only these, in specs/issues/FIX-2129/{SPEC.md,DECISIONS.md}:

  • no remaining text still relies on reading pre-existing persisted data (a dual-read, a seeded legacy row, a migration of stored values). The kind-from-reason fallback in DECISIONS → "Decided, not asked" is kept on purpose: a raw ctx.suspend person's stop written by new code carries no kind;
  • the "person" → "user" rename reads cleanly everywhere it appears;
  • leg f (a distinctive non-7-day host default persisted on a defaulted waitForUser and on a held question, with a raw ctx.suspend keeping its own timeoutMs) covers your P2 on 6958ada9.

Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 81028d4175

ℹ️ 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".

@jhoffner
jhoffner merged commit 936cdd5 into main Oct 23, 2026
17 of 18 checks passed
@jhoffner
jhoffner deleted the spec/FIX-2129 branch October 23, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants