[core] Keep step results ordered behind waits parked on unread hook payloads (#3406) (backport to stable) - #3718
Draft
VaguelySerious wants to merge 1 commit into
Draft
[core] Keep step results ordered behind waits parked on unread hook payloads (#3406) (backport to stable)#3718VaguelySerious wants to merge 1 commit into
VaguelySerious wants to merge 1 commit into
Conversation
Contributor
🦋 Changeset detectedLatest commit: dc97a73 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (105 failed)redis (20 failed):
turso (85 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
VaguelySerious
marked this pull request as ready for review
August 21, 2026 20:31
pranaygp
marked this pull request as draft
August 21, 2026 23:59
Contributor
|
Converting to draft so we can confirm that it doesn't cause regression in main beta branch before we re confident about rolling this backport over to stable |
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.
Manual backport of #3406 (cherry-pick
fbebf710) tostable.This is the prerequisite for the #3700 backport (#3702), which cannot terminate without it. Opened separately so the two land in order.
Why this is on stable's critical path
#3700's log-order-draws turnstile waits on any lower armed barrier, which is a wider waits-for relation than
gatesOn. Its deadlock-freedom argument rests on this PR's change tocomputeResolvesOnItsOwn: with the unconditionalstep -> trueshortcut in place, a step spinning above an armed wait parked behind an unclaimed hook payload is reported self-resolving,hasParkedCommittedDeliverystays true, the dispenser never retires the payload, and the chain never opens.Verified empirically: with #3700 cherry-picked onto
stablewithout this commit, its own turnstile termination pin fails withUnconsumed event: step_created. With this commit underneath, the full unit suite is green in both flag modes.Separately, this is a
CORRUPTED_EVENT_LOGfix in its own right (a step result overtaking an earlierwait_completedthrough an unread hook payload) and belongs on the maintenance line regardless.Adaptations
private.ts: the cherry-pick'sawaitEarlierDeliveriesdoc block reverted [core] Pin draw order to event-log order: retire delivery barriers through one ordered dispenser #3554's dispenser paragraph back to the pre-[core] Pin draw order to event-log order: retire delivery barriers through one ordered dispenser #3554 per-barrier-FIFO argument, which is stale onstable(Backport #3554: [core] Pin draw order to event-log order: retire delivery barriers through one ordered dispenser #3629 already landed [core] Pin draw order to event-log order: retire delivery barriers through one ordered dispenser #3554). Resolved tomain's converged text, sogatesOn,resolvesOnItsOwn,computeResolvesOnItsOwnandawaitEarlierDeliveriesare now byte-identical tomain.delivery-barrier-coverage.test.ts: section renumbered 4 -> 3 and "Cases 1-3" kept as "Cases 1-2".stablehas no workflowAbortController, so the abort-delivery section the upstream file carries is not portable (the header already recorded that from the Backport #3554: [core] Pin draw order to event-log order: retire delivery barriers through one ordered dispenser #3629 backport).workbench/fastify/public/index.html(an unrelated deletion in the upstream commit) does not exist onstableand is dropped.Verification
pnpm vitest run src/inpackages/core: 853 passed, 3 expected fail, 3 skipped, 0 failures.@workflow/corebuild (tsc) clean.