Skip to content

Enable V8 sandboxing for source-built builds#21146

Merged
cconger merged 1 commit into
mainfrom
cconger/v8-sandbox-probe
May 5, 2026
Merged

Enable V8 sandboxing for source-built builds#21146
cconger merged 1 commit into
mainfrom
cconger/v8-sandbox-probe

Conversation

@cconger
Copy link
Copy Markdown
Contributor

@cconger cconger commented May 5, 2026

Summary

This is the first PR in the V8 in-process sandboxing rollout.

It adds the build-system and Rust feature plumbing needed to support sandboxed V8 builds, then enables sandboxing by default for the source-built Bazel V8 path that we control directly. It deliberately keeps the published rusty_v8 artifact workflows on their current non-sandboxed contract so this PR can land and ship independently before we change any released artifacts.

Rollout plan

  • PR 1: land sandbox plumbing and default source-built Bazel V8 to sandboxed mode

  • PR 2: publish sandbox-enabled release artifacts and add compatibility validation

    • Produce sandboxed artifact pairs for every released Cargo target that does not already use the source-built Bazel path.
    • Add CI coverage that consumes those sandboxed artifacts and verifies:
      • codex-v8-poc reports sandbox enabled
      • codex-code-mode builds/tests against the sandboxed path
  • PR 3: switch release consumers to sandboxed artifacts by default

    • Update released artifact selectors/checksums.
    • Enable the Rust v8_enable_sandbox feature in the default release path.
    • Make the sandboxed artifact family the normal path for published builds.
  • PR 4: remove rollout-only compatibility paths

    • Remove the temporary non-sandbox release compatibility config once the new default has shipped and baked.
    • Keep the invariant tests permanently.
@cconger cconger requested a review from bolinfest May 5, 2026 05:06
Add the V8 build flags and Rust feature plumbing needed for in-process sandboxing, default source-built Bazel consumers to sandbox-enabled artifacts, and keep published rusty_v8 release workflows on the existing non-sandboxed contract until matching release artifacts are available.

Allow the temporary sandbox forwarding features while the V8 artifact migration is in flight.
@cconger cconger force-pushed the cconger/v8-sandbox-probe branch from 947d292 to c4e1127 Compare May 5, 2026 17:31
Comment on lines +28 to +31
MANIFEST_FEATURE_EXCEPTIONS = {
"codex-rs/code-mode/Cargo.toml": {"sandbox": ("v8/v8_enable_sandbox",)},
"codex-rs/v8-poc/Cargo.toml": {"sandbox": ("v8/v8_enable_sandbox",)},
}
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.

This was here as part of the transition. The purpose of this is to categorically disallow features in our Cargo workspace because we end up building more permutations of crates.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

At the end of PR 4 this should be removed completely, but this is a temporary exception will allow me to migrate in the short term since the source for producing our artifacts is version locked (same repo) as the code on the consumer side for v8 that we bazel build.

The goal is to have these default on, and no feature to disable.

@cconger cconger merged commit 3646038 into main May 5, 2026
29 checks passed
@cconger cconger deleted the cconger/v8-sandbox-probe branch May 5, 2026 21:36
@github-actions github-actions Bot locked and limited conversation to collaborators May 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants