Skip to content

Make environment provider snapshots path-free#21794

Merged
starr-openai merged 1 commit into
mainfrom
starr/local-env-provider-pr20667
May 8, 2026
Merged

Make environment provider snapshots path-free#21794
starr-openai merged 1 commit into
mainfrom
starr/local-env-provider-pr20667

Conversation

@starr-openai
Copy link
Copy Markdown
Contributor

@starr-openai starr-openai commented May 8, 2026

Summary

  • make EnvironmentProvider::snapshot path-free and keep providers focused on provider-owned remote environments
  • let provider snapshots request local inclusion via include_local, with environments.toml including local and CODEX_EXEC_SERVER_URL excluding local
  • move reserved local environment construction into EnvironmentManager using ExecServerRuntimePaths

Follow-up to #20667

Testing

  • just fmt
  • git diff --check
  • devbox: bazel build --bes_backend= --bes_results_url= //codex-rs/exec-server:exec-server
  • devbox: bazel test --bes_backend= --bes_results_url= //codex-rs/exec-server:exec-server-unit-tests

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

💡 Codex Review

assert!(!Arc::ptr_eq(&provider_local, &manager.local_environment()));

P1 Badge Update stale local environment pointer assertion

from_provider_snapshot now inserts Arc::clone(&local_environment) for the reserved local id, so get_environment("local") and local_environment() intentionally point to the same Arc. This unchanged negative assertion will panic and fail the exec-server test suite whenever this test runs.

ℹ️ 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".

@starr-openai starr-openai force-pushed the starr/local-env-provider-pr20667 branch 3 times, most recently from d5e5617 to c9f17aa Compare May 8, 2026 18:38
@starr-openai starr-openai changed the title Separate local environment provider Make environment provider snapshots path-free May 8, 2026
@starr-openai starr-openai force-pushed the starr/local-env-provider-pr20667 branch from c9f17aa to 6ff4664 Compare May 8, 2026 18:48
@starr-openai starr-openai force-pushed the starr/local-env-provider-pr20667 branch 3 times, most recently from 3f3d438 to e978b79 Compare May 8, 2026 20:52
@starr-openai starr-openai requested a review from a team as a code owner May 8, 2026 20:52
@starr-openai starr-openai force-pushed the starr/local-env-provider-pr20667 branch from e978b79 to 9515ace Compare May 8, 2026 21:03
@starr-openai starr-openai force-pushed the starr/local-env-provider-pr20667 branch from 9515ace to 7792a66 Compare May 8, 2026 21:40
Make EnvironmentProvider snapshots path-free and keep providers focused on provider-owned remote environments. Providers can request local inclusion with include_local, while EnvironmentManager owns local environment construction from ExecServerRuntimePaths and injects the reserved local id when requested.

Co-authored-by: Codex <noreply@openai.com>
@starr-openai starr-openai force-pushed the starr/local-env-provider-pr20667 branch from 7792a66 to b35596b Compare May 8, 2026 22:02
@starr-openai starr-openai merged commit dac108f into main May 8, 2026
26 checks passed
@starr-openai starr-openai deleted the starr/local-env-provider-pr20667 branch May 8, 2026 22:30
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants