mirror of
https://github.com/openai/codex.git
synced 2026-12-03 00:41:03 +00:00
## Why Daemon lifecycle commands previously required a standalone managed installation. A complete CLI package can supply the daemon executable and helpers without requiring a separate installer run. ## What changed - Let `codex app-server daemon start`, `restart`, and `bootstrap` copy the invoking package into `CODEX_HOME/packages/app-server-daemon` when no daemon installation exists. - Validate the package's platform, required helpers, executable identity, and copied contents before selecting the staged release. - Preserve existing dedicated and legacy daemon selections, reject broken selections instead of replacing them, and leave the CLI package and selection unchanged. - Preserve standalone release pins and latest-channel eligibility, and select dedicated releases using Unix symlinks or Windows junctions. ## Testing Add package preparation tests for complete copies, incomplete packages, broken selections, legacy preservation, and update-channel handling. Add Windows junction creation and retargeting coverage, plus CLI integration tests that launch the copied package through `start`, `restart`, and `bootstrap`. GitOrigin-RevId: abd2f4f82eae0885434ea30603c2c1c0ca760bef
20 lines
726 B
Rust
20 lines
726 B
Rust
//! Verifies Windows selection without requiring an elevated daemon.
|
|
use pretty_assertions::assert_eq;
|
|
|
|
#[cfg(windows)]
|
|
#[test]
|
|
fn daemon_junction_can_be_created_and_retargeted_without_cli_links() {
|
|
let home = tempfile::TempDir::new().unwrap();
|
|
let root = home.path().join("packages/app-server-daemon");
|
|
for version in ["first", "second"] {
|
|
let release = root.join("releases").join(version);
|
|
std::fs::create_dir_all(&release).unwrap();
|
|
super::select_release(&root, &release).unwrap();
|
|
assert_eq!(
|
|
root.join("current").canonicalize().unwrap(),
|
|
release.canonicalize().unwrap()
|
|
);
|
|
}
|
|
assert!(!home.path().join("packages/standalone").exists());
|
|
}
|