Skip to content

feat(sdk): configure reverse tunnel HTTP timeout with ADX rc15 - #193

Merged
rcyw merged 1 commit into
inclusionAI:developfrom
WenYuLuo:lwy/adx-rc15-tunnel-timeout-20261130
Nov 30, 2026
Merged

rcyw merged 1 commit into
inclusionAI:developfrom
WenYuLuo:lwy/adx-rc15-tunnel-timeout-20261130

Conversation

@WenYuLuo

Copy link
Copy Markdown
Collaborator

Long-running HTTP calls through a reverse tunnel can exceed the default 600-second wait. Expose HttpReverseTunnel(http_timeout_seconds=3600) and forward the typed setting to ADX on fresh creation so Execd and the local tunnel client agree. Snapshot restores inherit the captured server setting, while reconnecting configures the new local client without changing the sandbox. Update the SDK guide, maintained example and regression coverage.

Prepare AKernel SDK 0.2.0rc12 with the published adx-environment==0.1.0rc15 dependency, and align the ADX source reference, platform archive and Execd archive. Platform artifacts come from Buildkite #322, based on master 82c4852f with the CI-only fixes in ADX #466. The native SDK was published from master 02721454 by SDK build #24; its source directory is unchanged in the platform build.

Validation:

  • Five timeout unit regressions cover the native ADX request encoder, confirmed client timeout, omitted values, snapshot inheritance, reconnect and input bounds.
  • Complete SDK check: 551 unit tests collected (538 passed, 13 skipped); 35 benchmark tests passed; Ruff and mypy passed.
  • Wheel and sdist: twine checks, isolated installation, dependency checks, imports, versions and CLI smoke passed against public PyPI.
  • ADX configuration contracts: 55 passed, one skipped because no local Linux ADX CLI was available.
  • Platform and Execd archives: SHA-256, every manifest file hash, AMD64 ELF architecture and matching Execd/rootfs verified. All 27 bundled SDK wheel files match the published PyPI payload.
  • Buildkite #322 passed after one retry of timing-sensitive Redis lease tests on the same commit; no lease assertions or time budgets were changed.
  • Linux build-helper tests: 79 passed; runtime contracts: 19 passed.
  • ADX acceptance: public L0/auth, five AFS component cases and OwnerFS/DFS SDK smoke across two physical hosts. Missing checks and cleanup errors are empty. This is the Base pipeline's L0 + AFS smoke scope; the separate Full Test pipeline was not run.

Expose a per-tunnel HTTP wait through the typed ADX creation option and
configure reconnected local clients. Preserve captured timeout settings
on snapshot restore, and document the distinction from WebSocket setup.

Update the native SDK dependency and matching platform/Execd archives,
including the source reference and verified build provenance. Prepare
the next AKernel SDK release candidate with regression coverage and
an updated reverse tunnel example.

Signed-off-by: robbluo <luo1442@gmail.com>
@WenYuLuo
WenYuLuo requested a review from rcyw November 30, 2026 10:05
@rcyw

rcyw commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator

I verified 2786e292ded5c47e01f51ce61950aa4747c78384 on local AMD64 Runsc standalone with AKernel SDK 0.2.0rc12 from this PR and the published adx-environment==0.1.0rc15.

  • Platform, Execd and the EROFS runtime rootfs came from ADX build 3d8e2f7d77819bc04d9f16907292e52978960acb. Both archive checksums passed, and the installed manifests agreed on the Execd and rootfs digests. The published SDK came from its own release build, and its wheel contents matched the SDK candidate from #322. Buildkite #322 AMD64 manifest SDK build #24
  • With the timeout omitted, Execd and the active TunnelClient both used 600 seconds and the quick request returned HTTP 200.
  • With Sandbox.create(..., reverse_tunnel=HttpReverseTunnel(..., http_timeout_seconds=3600)), Execd startup and the active TunnelClient both confirmed 3600 seconds. The upstream waited 660.000 seconds before sending headers. The sandbox received HTTP 200 after 660.010 seconds with the expected body, reverse-tunnel-timeout-465-ok\n.

Both test sandboxes were deleted and confirmed absent from the API. The standalone node was stopped and removed. Agent-DX #465 Agent-DX #462

A follow-up before release should preserve the effective timeout when a failed pause rebinds the tunnel. I reproduced this with the published rc15 SDK and simulated transport. A snapshot-restored sandbox inherited 3600 seconds while the caller omitted the timeout. When pause() failed and the sandbox stayed running, AKernel rebuilt the client from the caller's descriptor and its timeout dropped to 600 seconds. Execd retained 3600 seconds. Please cover that rollback path in the regression test. Rebinding code

@rcyw
rcyw merged commit fe414c2 into inclusionAI:develop Nov 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants