Skip to content

POC: one overlap harness for the abort checks (FIX-1665) - #2982

Closed
cursor[bot] wants to merge 2 commits into
mainfrom
poc/FIX-1665-smaller-overlap-harness
Closed

cursor[bot] wants to merge 2 commits into
mainfrom
poc/FIX-1665-smaller-overlap-harness

Conversation

@cursor

@cursor cursor Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This PR does not merge. It is a smaller shape of #2971. Fold the subtraction there, then close this unmerged after that PR lands.

Subtracted

request-attempt-overlap.test.ts copied the parked-run harness already in request-finalization-overlap.test.ts (the two gates, the second onFinished hold, interrupt, then /continue). One harness now drives the retention checks and the abort checks. Net −102 lines (156 insertions, 258 deletions). The abort registry, runAction, and the host are unchanged.

The parked handler also returns when its signal aborts, so an aborted run can finish. The retention checks still release on the gate.

What still passes

pnpm --filter @flow-state-dev/engine exec vitest run --root . test/request-finalization-overlap.test.ts test/abort.test.ts

7 overlap tests, including the it.fails cross-process repro, and 108 abort tests. All passed.

Same assertions: after one run ends, abort still reaches the other; one abort reaches both live runs; the cross-process finalize case stays red.

Open in Web View Automation 

claude and others added 2 commits October 9, 2026 18:57
…g keeps the other's controller (FIX-1665)

The abort registry held one controller per request id, so when the stale
sweep and /continue left two runs of one request live in a process, the
second registration replaced the first, and whichever run ended first
deregistered the survivor's controller. The survivor could then no longer
be aborted.

The registry now holds one controller per live run under the id: an abort
fires all of them, and a run deregisters only its own controller.
`deregisterAbortController` keeps its id-only form (removes all).

Also adds a repro of the cross-process half of FIX-1665 (a run in another
process finalizes and deregisters the id while this one still writes),
marked it.fails: fencing it needs a store-contract decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DME8pzA4e4Rc7fRLGsYavW
POC only. The new overlap file copied the parked-run harness that
request-finalization-overlap already had.

Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
@vercel

vercel Bot commented Oct 9, 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 9, 2026 7:55pm UTC
flow-state-dev-kitchen-sink Ignored Ignored Oct 9, 2026 7:55pm UTC
flow-state-dev-ui Ignored Ignored Oct 9, 2026 7:55pm UTC

Request Review

@linear-code

linear-code Bot commented Oct 9, 2026

Copy link
Copy Markdown

FIX-1665

jhoffner commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Closing this POC because #2971 already includes it. Its test changes match #2971's exactly, and #2971 adds the abort-registry.ts doc updates on top. Nothing here is left to land.


Generated by Claude Code

@jhoffner jhoffner closed this Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Closing unmerged: its test-harness subtraction was folded into #2971 (6dff11e), which has merged.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants