mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
## What changed Eligible interactive launches now start or reuse the shared daemon regardless of `features.daemon_auto_start`. Remote-control daemon eligibility also no longer checks this flag. Use `--no-daemon` to run without the shared background server. Treat `daemon_auto_start` as removed: ignore configured values with a migration notice, ignore managed requirements with a warning, and hide the flag from experimental feature discovery. Remove its launch telemetry tag. ## Testing Extend retired-feature requirement coverage and add a migration-notice snapshot. Update CLI and TUI integration tests for daemon startup and explicit `--no-daemon` usage. GitOrigin-RevId: e0290e5acd4bc0169a0f71c3296c567e46269ce3
40 lines
1.5 KiB
Rust
40 lines
1.5 KiB
Rust
//! Checks that interactive startup persists detection without replacing a user preference.
|
|
|
|
use super::focus_palette::PtyCodex;
|
|
use super::focus_palette::write_test_config;
|
|
use anyhow::Result;
|
|
use pretty_assertions::assert_eq;
|
|
use std::time::Duration;
|
|
use std::time::Instant;
|
|
|
|
#[test]
|
|
fn startup_records_screen_reader_detection() -> Result<()> {
|
|
let repo_root = codex_utils_cargo_bin::repo_root()?;
|
|
let home = tempfile::tempdir()?;
|
|
write_test_config(home.path(), &repo_root)?;
|
|
let path = home.path().join("config.toml");
|
|
let contents = std::fs::read_to_string(&path)?;
|
|
std::fs::write(&path, format!("{contents}\n[tui]\nanimations = true\n"))?;
|
|
let mut terminal = PtyCodex::start(&repo_root, home, &["--no-daemon"])?;
|
|
terminal.wait_for_startup()?;
|
|
let deadline = Instant::now() + Duration::from_secs(/*secs*/ 30);
|
|
loop {
|
|
let config: toml::Value = toml::from_str(&std::fs::read_to_string(&path)?)?;
|
|
if config["tui"].get("screen_reader_detection_done").is_some() {
|
|
assert_eq!(
|
|
config["tui"],
|
|
toml::Value::Table(toml::toml! {
|
|
animations = true
|
|
screen_reader_detection_done = true
|
|
})
|
|
);
|
|
return Ok(());
|
|
}
|
|
anyhow::ensure!(
|
|
Instant::now() < deadline,
|
|
"startup did not record detection"
|
|
);
|
|
terminal.read_output(Duration::from_millis(/*millis*/ 50))?;
|
|
}
|
|
}
|