refactor: split sandboxed-exec engine out of codex-core (slice F)#527
Open
CSRessel wants to merge 1 commit into
Open
refactor: split sandboxed-exec engine out of codex-core (slice F)#527CSRessel wants to merge 1 commit into
CSRessel wants to merge 1 commit into
Conversation
…x-sandbox New crate codex-sandbox owns exec, exec_env, spawn, safety, sandboxing, seatbelt (+ policies), landlock, text_encoding, truncate, and error (CodexErr/SandboxErr). Its integration tests move with it. Policy types (ShellEnvironmentPolicy*) hoist to codex_protocol::config_types alongside the Mcp types. codex-core keeps config/auth/model-metadata and now depends on codex-sandbox (matching the existing call direction); tui, cli, linux-sandbox, and core_test_support import codex_sandbox directly. Dead Config-coupled truncate ctor and uncalled helpers deleted. Slice F of docs/specs/crate-layering.md §6.
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Slice F of
docs/specs/crate-layering.md§6 (stacked on #526). The codex-core god crate is dissolved into two honest crates:codex-sandbox(new, 3.1k LOC) — the pure exec engine:process_exec_tool_call, spawn, platform sandbox selection (Seatbelt/Landlock/Windows), env policy application, output encoding/truncation, and theCodexErr/SandboxErrtypes. No config or auth dependencies; the policy types it consumes live incodex_protocol::config_types(ShellEnvironmentPolicy family hoisted there, same pattern as slice E's Mcp move). Its integration tests (exec/seatbelt/text_encoding) move with it.codex-core(11.3k LOC) — what remains: config/config_loader, auth/token_data, MCP auth helpers, git_info, model metadata, project_doc, features, otel_init. Depends on codex-sandbox (matching the pre-existing call direction: config calls platform-sandbox selection).Also deleted along the way:
TruncationPolicy::new(&Config)plus four uncalled truncate helpers, andTruncationPolicy::mul(clippy trait-confusable, zero callers). Renaming codex-core itself is deferred to a dedicated pass.Validation
cargo check --workspace --all-targetsclean; standalonecargo check -p codex-sandboxclean (caught two tokio features masked by workspace unification — the independent-crate payoff working)nori sandbox linux -- echosmoke through the moved enginesandbox/docs.md, updates to core/linux-sandbox/windows-sandbox/cli/tui/protocol/root docs and the README crate table🤖 Generated with Nori
Co-Authored-By: Nori contact@tilework.tech