Repository navigation
fix(runtime): unblock canceled MicroSandbox input streams - #1467
Conversation
…gs-cancel-parity # Conflicts: # .github/workflows/pr-ci.yml # sites/docs-devsy-sh/content/docs/developing-providers/runtime-protocol.mdx
✅ Deploy Preview for devsydev canceled.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
✅ Deploy Preview for images-devsy-sh canceled.
|
|
@greptileai review |
|
|
The native-verification sentence in the review summary is stale. For exact head The logs/cancellation job reports |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
I inspected the complete eight-file review, including the retained security architecture and merge-risk assessment. No actionable defect or architecture-level concern remains. The supplied-stream ownership and Close-unblocks-Read requirement are intentional: direct caller-owned files and failed starts remain protected, delivery owns each acquired source, and cleanup joins before return. Arbitrary blocking Close implementations and independently shared input are outside the established contract; the precautionary interface-documentation proposal does not establish a defect in this change. The documentation-coverage warning counts private helpers/tests and unsupported functions. Existing comments explain non-obvious ownership and joining invariants; adding comments solely to repeat helper names would not improve this contract. All 81 implementation CI jobs, all 64 actual MicroSandbox VM cases, Greptile 5/5 and the completed full CodeRabbit review cover exact head |
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.
The initial native run passed all four cancellation cases and the preceding 58 VM scenarios. Both logs assertions found the markers joined to earlier binary SSH output without a line boundary. Give each marker a leading newline as well as its trailing newline, retaining exact-line assertions, both channels and all existing deadlines. An owned shell replay rejects the old framing and accepts the corrected framing; the final-head CI run now passes actual running/stopped logs.
Validation:
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.