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
This commit is contained in:
jif
2026-10-13 10:32:38 +00:00
committed by copyberry
parent f5297229c1
commit 86966c3230
+5 -2
View File
@@ -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"));