Skip to content

feat(sandboxes): add JavaScript execution and session facade - #270

Merged
shawnwu-kong merged 12 commits into
mainfrom
codex/sandbox-hosting-p7
Oct 5, 2026
Merged

shawnwu-kong merged 12 commits into
mainfrom
codex/sandbox-hosting-p7

Conversation

@shawnwu-kong

@shawnwu-kong shawnwu-kong commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add client.sandboxes for one-shot commands, sessions, binary files, lifecycle controls, scoped HTTP access, grants, and async disposal. Preserve nonzero command exits as result data and accept explicit replay identities without automatic command replay.

Public preset listings use anonymous transport. requestId is limited to creation and execution through SandboxReplayOptions. Canonical Hosting request schemas use catalog-owned preset strings, and public memory options accept catalog numbers with wire-size validation.

Execution transport uses the larger of the client timeout and command timeout plus 120 seconds, in milliseconds. Published declarations preserve the disposable lib reference and are verified by an isolated strict ES2022/DOM consumer with no fixture or Node ambient types. Disposal skips terminating/terminated sessions and accepts already-removed 404 responses; scoped access tokens remain directly readable but are non-enumerable for routine JSON/object logging. Documentation distinguishes one-shot HTTP 504 / same-key 409 from session command timeout results.

Validation

  • Synced current main, including its Orval and Next.js security updates; regenerated native clients without weakening compatibility fixtures or quality policy.
  • Full pnpm quality:checks passed on pinned Node 22.23.3 after the human-review fixes: audit, full lint/format, unused and deterministic generated checks, source/consumer types, 105 tooling tests, 2,397 unit tests and 2,397 typed-runtime tests across 123 suites, package/isolated-consumer checks, installed-package quickstart, and example build.
  • Native mutation checks on all seven changed implementation files/regions passed at 100%: 453 killed, zero survivors, timeouts, uncovered mutants, or errors. Thresholds and exclusions are unchanged.
  • New regressions reproduced the pre-fix timeout/disposal/token failures and cover both execution APIs, custom/default timeout budgets, cleanup behavior, token logging, and catalog-to-request type round trips.
  • All 45 remote checks passed on 77524af, including every mutation shard, Node 20 lint/tests/build, mutation inventory, and the Quality Gate.
  • Previous disposable local API acceptance covered presets, one-shot nonzero exits, sessions, binary files, and async disposal. Hosted cross-language live acceptance remains pending coordinated rollout.

Coordination

Hosting Kong/volcano-hosting#1354; Python Kong/volcano-sdk-python#372; Ruby Kong/volcano-sdk-ruby#316. Hosting staging acceptance consumes SDK main, so merge SDK implementations before final acceptance. No package publication or deployment.

@shawnwu-kong

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T16:16:32.579026Z 1ff8f0e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6c2513fd5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/index.d.ts Outdated
@CLAassistant

CLAassistant commented Sep 24, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@shawnwu-kong

Copy link
Copy Markdown
Contributor Author

Completed the first review fix and strengthened the wire-contract tests. Final local validation: 1,997 unit tests, 100% coverage, all 256 Sandbox mutants killed, lint/types/export/package checks passed. No quality thresholds or exclusions changed.

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ff8f0e8bd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/sandboxes.ts Outdated
Comment thread src/sdk-public-types.ts Outdated

@swkeever swkeever left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blockers, inline:

  1. exec (session and one-shot) is capped by the 60s client-wide timeout regardless of timeoutSeconds.
  2. The shipped .d.ts loses the esnext.disposable lib reference, so strict consumers can't compile against SandboxSession extends AsyncDisposable.

Everything else is non-blocking. Released contracts look intact (the -6278 is diff-algorithm noise in openapi.d.ts; patience diff shows it as purely additive), and the earlier Codex threads are addressed.

Comment thread src/sandbox-session.ts Outdated
Comment thread src/sdk-public-types.ts Outdated
Comment thread src/sdk-public-types.ts Outdated
Comment thread docs/sandboxes.md Outdated
Comment thread src/sandbox-session.ts Outdated
Comment thread src/sandbox-wire.ts

@tkkhq tkkhq left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The earlier catalog-to-request type defect is resolved, including catalog memory values; the isolated strict Sandbox consumer check passed. The execution timeout and disposal regressions also pass. Complete the pending CI/CLA gates before merge; hosted installed-package acceptance remains required before release.

@shawnwu-kong
shawnwu-kong merged commit 79fee17 into main Oct 5, 2026
47 checks passed
@shawnwu-kong
shawnwu-kong deleted the codex/sandbox-hosting-p7 branch October 5, 2026 20:13
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.

4 participants