Backport #3439: [core] Gate the unconsumed-event check on delivery idleness - #3442
Conversation
🦋 Changeset detectedLatest commit: 6233a82 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 |
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
feb1545 to
6233a82
Compare
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (101 failed)redis (18 failed):
turso (83 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
|
(AI) Rebased onto current What caused it: the branch was cut when Resolution: because export function isDeliveryIdle(ctx: WorkflowOrchestratorContext): boolean {
return ctx.pendingDeliveries === 0 && !hasParkedCommittedDelivery(ctx);
}The previous resolution had adapted this to Validation: Worth flagging for review: the shipped The |
Automated backport of #3439 to
stable(backport job run).AI recommendation: This is a pure correctness fix (patch changeset) for a real defect that exists on
stable: the unconsumed-event check's fixedDEFERRED_CHECK_DELAY_MSwindow races in-flight deliveries and raises a spuriousReplayDivergenceError, which escalates toCorruptedEventLogErrorand kills otherwise healthy runs. The touched files (packages/core/src/events-consumer.ts,private.ts,workflow.ts) all exist onstablewith the same timing-bet logic, and the change adds only an internal predicate plus tests, no user-facing API or feature. Note thatstablelacks thehasParkedCommittedDelivery/delivery-barrier machinery from #3183, so the cherry-pick will need adaptation and careful review.Merge conflicts were resolved by AI (opencode with
anthropic/claude-opus-5). Please review the conflict resolution carefully before merging.