mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
## What changed Honor `features.daemon_auto_start` as a stable, default-enabled setting instead of ignoring it with a deprecation warning. Apply it to interactive daemon auto-start and remote-control daemon eligibility, and accept it in managed feature requirements. Preserve explicit `false` values when saving the setting, even when the server reports a disabled default. Record the setting and disabled auto-start outcomes in launch telemetry. ## Testing Update coverage for restarting a discovered daemon with auto-start disabled and for persisting an explicit opt-out when the server default is disabled. Adjust embedded-backend tests to disable auto-start through configuration. GitOrigin-RevId: cbf079e3e27b4a7e6e802bf8f19dae653dd7472c
40 lines
1.4 KiB
Rust
40 lines
1.4 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, &[])?;
|
|
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))?;
|
|
}
|
|
}
|