Skip to content

Commit 12023a3

Browse files
authored
fix(desktop): require a Codex adapter with Astra support (#7427)
## Summary Buzz considers codex-acp 1.6.2 current because the supported adapter floor is still 1.1.7. That adapter bundles Codex 0.148.0, so updating a separate Codex CLI to 0.153.4 leaves managed agents on the older runtime and unable to use GPT-6 Astra. Raise the supported adapter floor to the published 1.10.0 release, which depends on `@openai/codex ^0.153.3`. Existing discovery and installation code then classifies older adapters as outdated and offers the managed reinstall path. Update the availability and install-plan regressions to cover the observed 1.6.2 installation and the new minimum. This follows the existing version-floor policy. It does not automatically update a running installation: the user must complete Buzz’s offered adapter upgrade. Future upstream compatibility changes may require another floor update. ### Related issue No exact duplicate found in searches for Astra, CODEX_PATH, bundled Codex, outdated runtime, and codex-acp 1.10. Related: #3097 raised the older floor to 1.1.7 (already present on main); #2422 covers lost error details for runtime mismatches. Neither resolves this version gap. Originating conversation: buzz://message?channel=3286cd76-f83e-4c7d-8317-10a16580744d&id=8b79a73078217222b870fff144c27e7d27bcd5a67c966869c18fe726db716898 ### Testing - Isolated npm install of codex-acp 1.10.0 resolved bundled Codex 0.153.4, with no CODEX_PATH override. - Live macOS ACP probe: initialize protocol v1 → session/new → select gpt-6-astra[medium] → prompt. Received `OK` and `stopReason: end_turn`; usage metadata confirms gpt-6-astra. - Existing adapter 1.6.2 initialized but advertised no Astra model in the same probe. - Desktop Rust formatting and `git diff --check` pass. - `just desktop-tauri-test`: 3,266 passed, 20 ignored, zero failures across the Desktop workspace and integration tests. - Workspace and Desktop Clippy, frontend static checks, and `just file-size-check` pass. - Repository `just ci`: still running the remaining mobile/build/workspace-test stages. The installed Buzz app and managed adapter were not replaced or restarted. The live check validates the new adapter/runtime path; a complete packaged Desktop upgrade workflow remains untested. Signed-off-by: Stephen DeLorme <[email protected]>
1 parent ad9591c commit 12023a3

4 files changed

Lines changed: 35 additions & 27 deletions

File tree

‎desktop/src-tauri/src/commands/agent_discovery.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ mod tests {
11671167
// Simulate the minimum supported adapter version.
11681168
std::fs::write(
11691169
&bin,
1170-
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.1.7'\nexit 0\n",
1170+
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.10.0'\nexit 0\n",
11711171
)
11721172
.expect("write script");
11731173
std::fs::set_permissions(&bin, std::fs::Permissions::from_mode(0o755))
@@ -1189,10 +1189,10 @@ mod tests {
11891189

11901190
let dir = tempfile::tempdir().unwrap();
11911191
let bin = dir.path().join("codex-acp");
1192-
// A 1.x adapter below MIN_CODEX_ACP_VERSION must still be reinstalled.
1192+
// The observed adapter bundles Codex 0.148.x and must be upgraded.
11931193
std::fs::write(
11941194
&bin,
1195-
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.1.5'\nexit 0\n",
1195+
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.6.2'\nexit 0\n",
11961196
)
11971197
.expect("write script");
11981198
std::fs::set_permissions(&bin, std::fs::Permissions::from_mode(0o755))

‎desktop/src-tauri/src/managed_agents/discovery.rs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,12 +783,14 @@ pub(crate) fn classify_runtime(
783783
/// The oldest `codex-acp` version supported by Buzz managed agents.
784784
///
785785
/// Older 1.x adapters are detected successfully, but can still bundle a Codex runtime
786-
/// that does not reliably give `buzz` CLI subprocesses outbound relay access.
786+
/// that cannot use newer models. Adapter 1.6.2 bundles Codex 0.148.x, which rejects
787+
/// GPT-6 Astra even when the separately installed Codex CLI has been updated.
788+
/// Published adapter 1.10.0 depends on `@openai/codex ^0.153.3`.
787789
///
788790
/// Bump policy: raise this only when a newer adapter fixes a defect that breaks managed
789791
/// agents, and only to a version already published on npm — every user below the floor is
790792
/// offered a reinstall on their next discovery pass.
791-
pub(crate) const MIN_CODEX_ACP_VERSION: (u64, u64, u64) = (1, 1, 7);
793+
pub(crate) const MIN_CODEX_ACP_VERSION: (u64, u64, u64) = (1, 10, 0);
792794

793795
/// Probe the full version of a `codex-acp` binary by running `--version`.
794796
///

‎desktop/src-tauri/src/managed_agents/discovery/tests.rs‎

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ fn codex_adapter_availability_available_for_minimum_supported_binary() {
684684
let bin = dir.join("codex-acp");
685685
std::fs::write(
686686
&bin,
687-
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.1.7'\nexit 0\n",
687+
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.10.0'\nexit 0\n",
688688
)
689689
.expect("write script");
690690
std::fs::set_permissions(&bin, std::fs::Permissions::from_mode(0o755)).expect("chmod script");
@@ -721,27 +721,6 @@ fn codex_adapter_availability_outdated_for_0x_binary() {
721721
);
722722
}
723723

724-
#[cfg(unix)]
725-
#[test]
726-
fn codex_adapter_availability_outdated_for_older_1x_binary() {
727-
use std::os::unix::fs::PermissionsExt;
728-
729-
let dir = tempfile::tempdir().expect("temp dir");
730-
let bin = dir.path().join("codex-acp");
731-
std::fs::write(
732-
&bin,
733-
"#!/bin/sh\necho '@agentclientprotocol/codex-acp 1.1.5'\nexit 0\n",
734-
)
735-
.expect("write script");
736-
std::fs::set_permissions(&bin, std::fs::Permissions::from_mode(0o755)).expect("chmod script");
737-
738-
assert_eq!(
739-
codex_adapter_availability(&bin),
740-
AcpAvailabilityStatus::AdapterOutdated,
741-
"a 1.x adapter below the floor must be offered an upgrade"
742-
);
743-
}
744-
745724
/// The strict three-component parse fails closed: a version Buzz cannot compare
746725
/// against the floor is treated as outdated rather than assumed current.
747726
#[cfg(unix)]

‎desktop/src-tauri/src/managed_agents/discovery/tests/codex_version.rs‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,30 @@ fn probe_codex_acp_version_uses_augmented_path_for_env_shebang_interpreter() {
4646
"the injected augmented PATH should allow /usr/bin/env to find node"
4747
);
4848
}
49+
50+
#[cfg(unix)]
51+
#[test]
52+
fn codex_adapter_availability_outdated_for_older_1x_binary() {
53+
use super::super::{codex_adapter_availability, codex_adapter_is_outdated};
54+
use crate::managed_agents::AcpAvailabilityStatus;
55+
use std::os::unix::fs::PermissionsExt;
56+
57+
for version in ["1.1.5", "1.1.7", "1.6.2", "1.9.0"] {
58+
let dir = tempfile::tempdir().expect("temp dir");
59+
let bin = dir.path().join("codex-acp");
60+
std::fs::write(
61+
&bin,
62+
format!("#!/bin/sh\necho '@agentclientprotocol/codex-acp {version}'\nexit 0\n"),
63+
)
64+
.expect("write script");
65+
std::fs::set_permissions(&bin, std::fs::Permissions::from_mode(0o755))
66+
.expect("chmod script");
67+
68+
assert_eq!(
69+
codex_adapter_availability(&bin),
70+
AcpAvailabilityStatus::AdapterOutdated,
71+
"adapter {version} must be offered an upgrade"
72+
);
73+
assert!(codex_adapter_is_outdated(&bin));
74+
}
75+
}

0 commit comments

Comments
 (0)