Stabilize process streams and releases - #827
Merged
Merged
Conversation
Prevent an older build from replacing a newer Worker and container release when several commits reach a release branch close together.
Shell prompts can arrive before command output, so collect terminal data until the expected command result is observed.
ghostwriternr
requested review from
aron-cf,
scuffi and
whoiskatrin
as code owners
July 17, 2026 13:18
🦋 Changeset detectedLatest commit: e5c529b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
ghostwriternr
enabled auto-merge (squash)
July 17, 2026 13:18
Preview publishing resolves workspace dependency versions and requires every internal package to declare one.
commit: |
Contributor
🐳 Docker Images Published
Usage: FROM cloudflare/sandbox:0.0.0-pr-827-e5c529bcVersion: 📦 Standalone BinaryFor arbitrary Dockerfiles: COPY --from=cloudflare/sandbox:0.0.0-pr-827-e5c529bc /container-server/sandbox /sandbox
ENTRYPOINT ["/sandbox"]Download via GitHub CLI: gh run download 29942111277 -n sandbox-binaryExtract from Docker: docker run --rm cloudflare/sandbox:0.0.0-pr-827-e5c529bc cat /container-server/sandbox > sandbox && chmod +x sandbox |
ghostwriternr
force-pushed
the
naresh/stabilize-next-release
branch
3 times, most recently
from
July 17, 2026 15:04
31400ef to
ffa2892
Compare
Destroy partially initialized sandboxes so failed environment setup does not leak resources into disposable pull request deployments.
ghostwriternr
force-pushed
the
naresh/stabilize-next-release
branch
from
July 17, 2026 15:18
ffa2892 to
c285625
Compare
Member
Author
|
Temporarily closing to run the existing privileged cleanup for the saturated disposable E2E environment. Will reopen after cleanup completes. |
auto-merge was automatically disabled
July 17, 2026 15:24
Pull request was closed
ghostwriternr
force-pushed
the
naresh/stabilize-next-release
branch
from
July 17, 2026 15:34
c285625 to
61e6eea
Compare
Worker RPC stream capabilities can close without delivering retained process events. Pull each event explicitly and keep runtime control alive until the local subscription settles.
ghostwriternr
marked this pull request as draft
July 20, 2026 10:57
ghostwriternr
force-pushed
the
naresh/stabilize-next-release
branch
from
July 21, 2026 14:54
37f17f9 to
4ea6fba
Compare
ghostwriternr
force-pushed
the
naresh/stabilize-next-release
branch
2 times, most recently
from
July 21, 2026 15:14
6da925d to
047dc46
Compare
* Establish runtime operation admission Bind SDK operations to activated runtime incarnations so starts, streams, handles, forwarding, and teardown cannot cross runtime replacement. * Fence preview and tunnel operations Preview and tunnel workflows need one exact runtime authority across admission, side effects, transport lifetime, and durable publication. Keep discovery and stale-owner cleanup non-waking while preventing old sessions and interrupted callbacks from publishing runtime-owned state. * Fence backup operations to one runtime Keep archive transfer and cleanup under the same admitted runtime so a replacement cannot replay side effects or switch controls mid-attempt. Preserve independent sandbox-lifetime interruptions and durable restore ownership for explicit caller reconciliation. * Thread runtime leases through mounts Keep mount setup and long-lived local sync pinned to one runtime while making unmount and teardown cleanup non-waking. Exact incarnation and sandbox-lifetime fences prevent stale registry publication. * Scope extension workflows to runtimes Keep extension control, sidecar connection, and callback streaming inside one admitted runtime so stale remotes cannot reconnect after replacement. * Remove implicit runtime ownership Delete transitional identity and transport retry paths so runtime work is admitted once, scoped to an exact incarnation, and never replayed. * Add runtime lifecycle regressions Exercise deterministic real-container replacement and non-waking lookup paths while ensuring failed WebSocket closure cannot retain runtime authority. * Test control server exit recovery Exercise real control-process replacement without assuming the container entrypoint is namespace PID 1. * Fix runtime execution regressions Restore sandbox environment and workspace defaults that were masked by cold-start admission failures. Observe completed stop boundaries in incarnation tests and fully destroy discarded warm containers before releasing capacity. * Upgrade container lifecycle handling Use the upstream fix for stop events racing replacement startup instead of maintaining SDK-specific lifecycle fencing. Preserve JSON null environment values as explicit unsets. * Stabilize sandbox proxy transports Preserve watches, process logs, and terminal output across Workers RPC boundaries while retaining the inherited Container request APIs. Keep runtime replacement and control-plane routing explicit so callers do not attach resources to stale container incarnations. * Stabilize lifecycle regression workflows Explicit restores must reapply committed backups when their destination has changed. Inactivity expiry must also complete without re-entering the sandbox stop gate, while E2E workflows synchronize on observable process and terminal behavior. * Add Sandbox reconstruction harness Characterize Durable Object memory loss separately from persisted Sandbox configuration across eviction and local Worker reloads. Align the local Cloudflare test toolchain so the real container-backed harness remains reproducible. * Reconcile delayed runtime stops Allow the first waking establishment after a physical stop to clean up the previous runtime without treating its delayed onStop bookkeeping as invalidation of the sequential replacement. * Wire pending stop reconciliation Route container start and stop hooks through replacement-start marking and observed-stop reconciliation while keeping explicit stop and destroy as hard invalidations. * Accept both terminal container stop statuses Control-server exit can surface stopped_with_code when the monitor reports a numeric exit code. Match the wait helper. * Bump E2E deploy hash for CI rerun * Bump E2E deploy hash again * Add isolated browser test containers * Parallelize isolated browser tests * Integrate browser container readiness * Fix browser test import order * Bound browser test concurrency * Bootstrap Wrangler in rollout checks * Reduce browser cold-start pressure * Limit browser cold starts to one * Avoid orphaned browser configuration * Restore parallel browser coverage * Clarify release notes for callers Rewrite the PR #833 changesets in plain language so release notes describe user-visible behavior instead of internal runtime jargon.
ghostwriternr
marked this pull request as ready for review
July 22, 2026 17:23
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.
Keep process log and port-watch subscriptions connected until they settle. Worker RPC stream capabilities do not reliably preserve retained event delivery, so observations now pull events explicitly and hold runtime control until the local subscription finishes or is canceled.
Serialize branch releases so an older build cannot replace a newer Worker and container deployment. Also clean up partially initialized E2E sandboxes, make the terminal assertion insensitive to asynchronous prompts, and declare the internal execution package version required by preview publishing.
The rewritten history removes the diagnostic probes and reverted experiments used to isolate the Worker RPC stream boundary. Its final tree is unchanged from the previously reviewed branch.