mirror of
https://github.com/openai/codex.git
synced 2026-10-25 18:28:38 +00:00
Expose a stable executor build identity in environment metadata (#43513)
## Why Executor compatibility checks need a build identity that distinguishes commits and compiler targets independently of the package release version. ## What changed - Add optional `providerId` to exec-server environment metadata, cached at startup and returned by initialization and `environment/info`. - Derive the ID as SHA-256 of `git:<lowercase commit>:<target>`. It identifies a standard build configuration, not exact executable bytes, and is omitted when the commit stamp or target is unavailable or invalid. - Embed the compiler target in `BuildInfo`, preserve compatibility with historical metadata without a target, and stamp Cargo release builds with `STABLE_GIT_COMMIT`. - Group Bazel build-script argument files under one `--arg-file` flag to reduce Windows command-line length while preserving file order. ## Testing Add deterministic build-ID vectors across targets, commit normalization and invalid input coverage, and historical metadata compatibility tests. Extend exec-server coverage for metadata caching and ensure runtime environment overrides cannot replace the executor's build identity. GitOrigin-RevId: 125a18c23de7ad006571940ba305836376c983f4
This commit is contained in:
@@ -244,11 +244,14 @@ metrics_exporter = {{ otlp-http = {{ endpoint = "{collector_url}/v1/metrics", pr
|
||||
.await
|
||||
.context("remote harness did not connect")???;
|
||||
|
||||
let environment_info = client.environment_info().await?;
|
||||
let expected_info = EnvironmentInfo {
|
||||
executor_version: "1.2.3-alpha.4".to_string(),
|
||||
// The build identity belongs to the spawned CLI, not this test process.
|
||||
provider_id: environment_info.provider_id.clone(),
|
||||
..EnvironmentInfo::local()
|
||||
};
|
||||
assert_eq!(client.environment_info().await?, expected_info);
|
||||
assert_eq!(environment_info, expected_info);
|
||||
std::fs::remove_file(&manifest)?;
|
||||
assert_eq!(client.force_environment_info().await?, expected_info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user