Repository navigation
POC: one wait-for-abort helper in the stop-hook tests - #2542
Closed
cursor[bot] wants to merge 2 commits into
Closed
cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
…n (FIX-1690) ctx.session.stopRequest(id) records the abort route's own fenced write (recordRequestStop, now shared by both callers) on a request the session's own reads would show, and answers stopped / already-finished / not-in-this-session. Requests and sessions only: no Workforce word. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cnm5DbhFmkarpesBpPQ9Dq
makeStoppableFlow copied makeBlockingFlow's signal wait. One helper covers both, and the six stopRequest cases are unchanged. Co-authored-by: Jake Hoffner <jhoffner@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Collaborator
|
The test-helper subtraction was folded into #2538, which has merged, so I'm closing this POC without merging it. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR does not merge
Draft POC off the head of #2538. Fold the subtraction into that PR, then close this unmerged.
What I subtracted
makeStoppableFlowcopiedmakeBlockingFlow's wait-for-abort promise: check an already-aborted signal, then race a timer againstabort. That body now lives once, ascompletedNaturallyUnlessAborted, and both factories call it. Also dropped the banner comment that restated the describe, and theAwaited<ReturnType<SessionScopeHandle["stopRequest"]>>alias in favor ofStopRequestOutcome.Production code is untouched.
recordRequestStop,requestInSessionScope, andctx.session.stopRequeststay as they are.Calling
defineFlowtwice and reusingactions.runregisters the kind twice, so that lost. Astop: trueflag onmakeBlockingFlowis a one-caller option.What still passes
packages/engine/test/abort.test.ts:ctx.session.stopRequest— 6/6runAction — cross-process abort delivery(the suite that usesmakeBlockingFlow) — passed in the same run (19 passed, 85 skipped on the combined filter)Net on
abort.test.ts: 28 insertions, 54 deletions.