Skip to content

Add environment provider snapshot#20058

Merged
starr-openai merged 5 commits intomainfrom
starr/environment-provider-snapshot
Apr 29, 2026
Merged

Add environment provider snapshot#20058
starr-openai merged 5 commits intomainfrom
starr/environment-provider-snapshot

Conversation

@starr-openai
Copy link
Copy Markdown
Contributor

@starr-openai starr-openai commented Apr 28, 2026

Summary

  • Change EnvironmentProvider to return concrete Environment instances instead of EnvironmentConfigurations.
  • Make DefaultEnvironmentProvider provide the provider-visible local environment plus optional remote environment from CODEX_EXEC_SERVER_URL.
  • Keep EnvironmentManager as the concrete cache while exposing its own explicit local environment for local_environment() fallback paths.

Validation

  • just fmt
  • git diff --check

@starr-openai starr-openai force-pushed the starr/environment-provider-snapshot branch from 7dc4e28 to 430fde2 Compare April 28, 2026 18:45
@starr-openai starr-openai force-pushed the starr/environment-provider-snapshot branch 2 times, most recently from ee5489a to c96c688 Compare April 28, 2026 21:30
@starr-openai starr-openai marked this pull request as ready for review April 28, 2026 21:43
Comment thread codex-rs/exec-server/src/environment_provider.rs Outdated
@starr-openai starr-openai force-pushed the starr/environment-provider-snapshot branch from c96c688 to f02bda7 Compare April 28, 2026 21:57
Comment thread codex-rs/exec-server/src/environment.rs
@starr-openai starr-openai force-pushed the starr/environment-provider-snapshot branch 2 times, most recently from 3ee024e to f8a9938 Compare April 28, 2026 22:17
@starr-openai starr-openai requested a review from a team as a code owner April 28, 2026 22:17
Separate provider-owned environment configuration listing from EnvironmentManager's concrete environment cache. The default provider preserves the existing CODEX_EXEC_SERVER_URL behavior while the manager keeps local environment ownership internal.

Co-authored-by: Codex <noreply@openai.com>
@starr-openai starr-openai force-pushed the starr/environment-provider-snapshot branch from f8a9938 to 1526b2c Compare April 28, 2026 22:29
Comment thread codex-rs/exec-server/src/environment.rs Outdated
);
environments.insert(id, Arc::new(environment));
}
environments.insert(
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.

interesting that this is not returned by the provider

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.

we have some places that depend on local env being there via local_environment, so I put this in EnvironmentManager itself to guarantee its set and configured properly. Then the env provider just provides external ones.

this is why:

DefaultProvider should probably also return the local one.
doesn't.

Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai left a comment

Choose a reason for hiding this comment

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

DefaultProvider should probably also return the local one.
Can we return the full Environment?

starr-openai and others added 4 commits April 28, 2026 17:42
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@starr-openai starr-openai merged commit e1ec9e6 into main Apr 29, 2026
25 checks passed
@starr-openai starr-openai deleted the starr/environment-provider-snapshot branch April 29, 2026 03:05
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 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