|
| 1 | +Fresh native AsyncSandbox failed-entry proposed repair, 2026-10-16 |
| 2 | + |
| 3 | +Owner Dhiraj Bokde PR2645: |
| 4 | +https://github.com/NVIDIA/OpenShell/pull/2645 |
| 5 | +Owner source42f2ab96891c0ac848b9d8aad55f27ec147b1e90 remains untouched upstream. |
| 6 | +Untouched-source RED packet is parent commit6f4b5f9 on this same evidence carrier. |
| 7 | +Original dot packet remains unavailable; this is fresh, independently readable proof. |
| 8 | + |
| 9 | +Requirement/ownership: AsyncSandbox creates AsyncSandboxClient.from_active_cluster |
| 10 | +inside __aenter__; the client constructor creates its own grpc.aio channel. No |
| 11 | +caller-owned channel is supplied here. Existing normal __aexit__ closes this client |
| 12 | +and resets wrapper state. Failed/cancelled __aenter__ bypasses Python's __aexit__, so |
| 13 | +it must release what it acquired. This is deterministic owned-resource cleanup, not |
| 14 | +a permanent GC leak claim or a request to close caller-owned shared channels. |
| 15 | + |
| 16 | +Only production change: AsyncSandbox.__aenter__ protects post-construction entry |
| 17 | +with except BaseException, awaits client.close(), clears _session/_client in finally, |
| 18 | +then re-raises. Catch includes task cancellation; successful entry/body and normal |
| 19 | +__aexit__ are unchanged. Class docstring records ownership/failure cleanup contract. |
| 20 | +No OIDC redesign, remote sandbox deletion/adoption, async client API change, original |
| 21 | +owner branch rewrite or competing upstream PR. |
| 22 | + |
| 23 | +Same exact combined command before/after: |
| 24 | +<venv>/bin/python -m pytest -q python/openshell/async_sandbox_test.py python/openshell/sandbox_test.py review-evidence/2645-native-entry_test.py |
| 25 | +Corrected-fixture RED:114PASS/6FAIL in14.76s,exit1. |
| 26 | +Proposed repair GREEN:120PASS in6.78s,exit0; no warnings/skips/xfails reported. |
| 27 | +Includes37 existing async owner tests,75 existing sync owner tests,8 native cases. |
| 28 | +Six failed-entry cases: native PERMISSION_DENIED or task cancellation at create, |
| 29 | +attach/get, readiness; original actual channel stays READY after failed async-with |
| 30 | +entry. Repair produces SHUTDOWN and clears wrapper state. Original RPC code/details |
| 31 | +and CancelledError remain observable. Two success controls confirm channel READY |
| 32 | +inside context body, SHUTDOWN/reset after ordinary exit. Test finally closes any |
| 33 | +failed-head retained channels, avoiding environmental leak and overstated persistence. |
| 34 | + |
| 35 | +Complete production AsyncSandbox -> actual gateway metadata -> AsyncSandboxClient |
| 36 | +-> grpc.aio channel -> generated CreateSandbox/GetSandbox RPC -> real aio loopback |
| 37 | +service. No SDK method/client/stub/channel replacement or extracted helper. |
| 38 | +Ephemeral metadata only. Test observes actual channel via wrapper state in server |
| 39 | +handler, never substitutes source objects. delete_on_exit=False intentionally isolates |
| 40 | +channel lifecycle from remote sandbox deletion semantics. |
| 41 | + |
| 42 | +Environment: native Linux ARM64 Python3.14.8;grpcio/grpcio-tools1.84.0; |
| 43 | +protobuf7.36.2;httpx0.28.1;cloudpickle3.1.2;pytest9.1.1;pytest-asyncio1.4.0. |
| 44 | +Bindings generated with owner tasks/python.toml python:proto task; only uv Python |
| 45 | +invocation substituted for isolated venv Python. No generated bindings committed. |
| 46 | +Initial fixture used nonexistent response type names and produced112PASS/8FAIL; |
| 47 | +corrected to actual SandboxResponse before accepted RED, source unchanged then. |
| 48 | + |
| 49 | +LIMITED: loopback service is not a production gateway deployment, real provisioning, |
| 50 | +OIDC HTTP cleanup instrumentation, repeated cancellation during cleanup, close() |
| 51 | +exceptions, dependency-minimum matrix, full SDK suite, hosted CI, Rust, Docker, |
| 52 | +macOS/VM/GPU or performance acceptance. No current-main async implementation claim. |
| 53 | +Parent independent machine source review requested separately, not personal human |
| 54 | +review, DCO signoff, maintainer approval or permission to create upstream PRs. |
| 55 | +Dhiraj owns original SDK implementation; dot historical evidence credit preserved; |
| 56 | +ChatGPT fresh native tests and narrow proposed repair under scoped user direction. |
| 57 | +Canonical queue67 bounded manual lease6219784722. Original admission gates retained. |
0 commit comments