Skip to content

fix(runtime): unblock canceled MicroSandbox input streams - #1467

Draft
skevetter wants to merge 2 commits into
mainfrom
codex/microsandbox-logs-cancel-parity
Draft

skevetter wants to merge 2 commits into
mainfrom
codex/microsandbox-logs-cancel-parity

Conversation

@skevetter

Copy link
Copy Markdown
Contributor

Canceled MicroSandbox commands could remain blocked while copying an owned input stream, even after the child process exited. Agent binary transfer had the same problem because its progress wrapper hid the source closer. Close eligible non-file input on cancellation, join the callback before returning, and close each acquired transfer source exactly once so retries receive a fresh source. Normal completion, failed starts, caller-owned files, existing transfer limits, and original cancellation causes retain their behavior.

Add six actual-VM scenarios across the built-in driver and published external provider v0.1.7: completed stdout/stderr logs while running and stopped, cancellation of a ready parent/child tree, and cancellation with blocked owned stdin. Independent PID/start-time/nonce observation checks process death within the same ten-second cancellation bound; VM creation time, boot ID, subsequent command execution, and source contents must survive. The external test path uses the real self-executed runtime supervisor and prepared executable. Each cleanup owns only its recorded process or previously absent VM identity.

Validation:

  • Old production fails the new blocked-input and transfer-idle regressions; fixed focused race tests pass, including ownership, joining, fresh retries and original causes.
  • Final affected-package uncached race, vet, strict lint, all 13 pre-commit hooks, module verification, formatting and diff checks passed. The six-case Ginkgo dry run only verifies selection; native proof requires CI.
  • Integrated the completed Dockerless slice. Fresh full committed local CodeRabbit reviewed all eight PR files with zero findings. Current-head CI, including all existing VM suites and the six new logs/cancellation specs, Greptile and full remote CodeRabbit remain pending.

This does not establish TTY or arbitrary nonclosable-input cancellation, binary log fidelity or ordering, runtime compatibility failures, invalid-recreate preservation, host hardening, or existing-workspace migration. Built-in-provider cutover remains separately gated.

…gs-cancel-parity

# Conflicts:
#	.github/workflows/pr-ci.yml
#	sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev ready!

Name Link
🔨 Latest commit 6e9a952
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6acbd8142a091900081f6d2f
😎 Deploy Preview https://deploy-preview-1467--devsydev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@netlify

netlify Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 6e9a952
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6acbd814e46b8000084c5bfd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant