fix(eve): close custom worlds during graceful shutdown - #1390
Draft
bob-obringer wants to merge 3 commits into
Draft
fix(eve): close custom worlds during graceful shutdown#1390bob-obringer wants to merge 3 commits into
bob-obringer wants to merge 3 commits into
Conversation
Signed-off-by: Bob Obringer <bob@neynar.com>
Signed-off-by: Bob Obringer <bob@neynar.com>
Contributor
|
@bob-obringer is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Signed-off-by: Bob Obringer <bob@neynar.com>
bob-obringer
force-pushed
the
agent/close-dev-workers-gracefully
branch
from
July 30, 2026 01:53
4c9783f to
6f0f073
Compare
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.
Description
Custom Workflow worlds currently start in both production and development, but neither lifecycle reliably closes them:
closehook, andeve startdoes not route signals through that hook lifecycle;shutdownIPC event and awaiting itsexitacknowledgement.This draft makes the two halves one coordinated lifecycle:
closehook and awaitworld.close?.();waitUntiltasks; Eve sets the signal exit code without callingprocess.exit(), so neither path can truncate the other;shutdown, get up to 300 ms to acknowledge completion, and are then terminated as a bounded final reap if they are unresponsive.The development grace period fits inside the CLI child's existing 550 ms IPC shutdown budget. Vercel and development-sandbox runtimes retain their existing lifecycle ownership.
This is distinct from #1142, which coordinates the outer CLI child process, and from #787/#790, which preserve admitted work while generations change. This change closes the custom resources owned inside those production and worker processes. It does not add crash recovery.
How did you test your changes?
pnpm fmtpnpm lintpnpm typecheck— 32/32 package tasks passedpnpm guard:invariantspnpm docs:check— 79 docs, 250 import paths across 333 code blocks, and 79 MDX files passedpnpm check:depspnpm test:unit— 536 files, 5,656 passed, 1 skippedpnpm test:integration— 84 files, 568 passed, 1 skippedSIGTERM, the custom World releases its lock, and an immediate restart reacquires and releases itThe full scenario run passed 64/65 files (374 tests passed, 15 skipped). Two Next/Vercel assembly tests fail before building because Vercel CLI selects pnpm 10 and rejects ignored
esbuild/sharpscripts. The same two failures reproduce unchanged on pristineorigin/main; all lifecycle scenario files pass.PR Checklist
CONTRIBUTING.mdevepackagegit commit --signoff)