workflow: fail runs on hook conflicts - #327
Merged
Merged
Conversation
fantix
force-pushed
the
fantix/hook-conflict-replay
branch
from
August 26, 2026 18:40
6065d0c to
3679374
Compare
fantix
force-pushed
the
fantix/hook-conflict-replay
branch
from
August 26, 2026 21:55
3679374 to
1ae5cca
Compare
Replay hook conflict events immediately so losing runs do not remain running indefinitely. Add a typed HookConflictError that survives event serialization across Python and TypeScript.
fantix
force-pushed
the
fantix/hook-conflict-replay
branch
from
August 27, 2026 01:05
1ae5cca to
4889d1f
Compare
fantix
marked this pull request as ready for review
August 27, 2026 01:41
msullivan
approved these changes
Aug 27, 2026
Co-authored-by: Michael J. Sullivan <sully@msully.net>
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 fixes a bug that,
await UserHook.wait(token=SAME_TOKEN)may hang forever under a race condition.The handler now performs another replay pass inside the same delivery, after receiving the
hook_conflictfrom the world, to fail the run.BaseHook.wait()may now raise a newly-addedvercel.workflow.HookConflictError(new public API), carrying the conflictingtokenand an optionalconflicting_run_idSummary
HookConflictErrorwith Python/TypeScript-compatible serialization.