From 86966c3230053548bf3005cd59f4d80f6afdec3b Mon Sep 17 00:00:00 2001 From: jif Date: Tue, 13 Oct 2026 10:24:11 +0000 Subject: [PATCH] Materialize the thread before testing a discovered daemon restart (#53631) Empty drafts need not survive a daemon restart. Update the `discovered` scenario in `codex-rs/cli/tests/daemon_startup.rs` to rename the thread before restarting the daemon and include `thread-name` in the status line. Wait for the confirmed footer name before issuing `/daemon` so the test proceeds only after the thread is materialized. GitOrigin-RevId: a91508582826fa1bd0cc7b89d9a1af7e8b4e1999 --- codex-rs/cli/tests/daemon_startup.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/codex-rs/cli/tests/daemon_startup.rs b/codex-rs/cli/tests/daemon_startup.rs index 1a2cdaee73..f507583635 100644 --- a/codex-rs/cli/tests/daemon_startup.rs +++ b/codex-rs/cli/tests/daemon_startup.rs @@ -175,7 +175,7 @@ async fn daemon_startup(command: &str) -> Result<()> { notice.model_migrations.\"gpt-5.6-terra\" = \"gpt-6-sol\"\n\ [projects.{}]\ntrust_level = \"trusted\"\n", if command == "discovered" { - "tui.status_line=[\"model\",\"thread-id\"]" + "tui.status_line=[\"model\",\"thread-id\",\"thread-name\"]" } else { "" }, @@ -275,7 +275,10 @@ async fn daemon_startup(command: &str) -> Result<()> { "Restartbackgroundserver?" } else if command == "discovered" { args.extend(["--disable".into(), "daemon_auto_start".into()]); - steps.push_back(("GPT-5.6-Terra", b"/daemon\r")); + // Empty drafts need not survive a daemon restart. Renaming materializes the + // thread; wait for the confirmed footer name, not the echoed command. + steps.push_back(("GPT-5.6-Terra", b"/rename daemon-restart-test\r")); + steps.push_back(("·daemon-restart-test", b"/daemon\r")); steps.push_back(("Restartbackgroundserver", b"2")); steps.push_back(("Restartbackgroundserver?", b"2\r")); steps.push_back(("GPT-5.6-Terra", b"/status\r"));