From 8da9fb7d5256783e63c79373f13ca4065040c6f2 Mon Sep 17 00:00:00 2001 From: Hunter Bown Date: Sat, 23 May 2026 11:11:11 -0500 Subject: [PATCH] test(qa-pty): retarget harness at codewhale-tui binary The qa_pty integration tests booted the canonical TUI via `Harness::cargo_bin("deepseek-tui")`. After the previous commit renamed the canonical bin to `codewhale-tui` and made `deepseek-tui` a tiny deprecation shim that forwards to it via PATH, those tests launched the shim and hung waiting for a TUI frame because the sealed PATH in the test sandbox has no `codewhale-tui`. Point the harness at `cargo_bin("codewhale-tui")` directly. Also add a `CARGO_BIN_EXE_codewhale-tui` compile-time fallback in the harness so older Cargo versions still work, alongside the existing legacy `deepseek-tui` fallback. Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/tui/tests/qa_pty.rs | 4 ++-- crates/tui/tests/support/qa_harness/README.md | 2 +- crates/tui/tests/support/qa_harness/harness.rs | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/tui/tests/qa_pty.rs b/crates/tui/tests/qa_pty.rs index 708e78be..d5d4b5f5 100644 --- a/crates/tui/tests/qa_pty.rs +++ b/crates/tui/tests/qa_pty.rs @@ -38,7 +38,7 @@ fn boot_minimal_without_retry() -> anyhow::Result<(qa_harness::harness::SealedWo fn spawn_minimal( ws: qa_harness::harness::SealedWorkspace, ) -> anyhow::Result<(qa_harness::harness::SealedWorkspace, Harness)> { - let h = Harness::builder(Harness::cargo_bin("deepseek-tui")) + let h = Harness::builder(Harness::cargo_bin("codewhale-tui")) .cwd(ws.workspace()) .seal_home(ws.home()) // Provide a stub key so the onboarding screen is bypassed and the TUI @@ -165,7 +165,7 @@ fn skills_menu_shows_local_and_global_skills() -> anyhow::Result<()> { "Workspace beta skill", )?; - let mut h = Harness::builder(Harness::cargo_bin("deepseek-tui")) + let mut h = Harness::builder(Harness::cargo_bin("codewhale-tui")) .cwd(ws.workspace()) .seal_home(ws.home()) .env("DEEPSEEK_API_KEY", "ci-test-key-not-real") diff --git a/crates/tui/tests/support/qa_harness/README.md b/crates/tui/tests/support/qa_harness/README.md index b78cf77c..c869316a 100644 --- a/crates/tui/tests/support/qa_harness/README.md +++ b/crates/tui/tests/support/qa_harness/README.md @@ -46,7 +46,7 @@ spin up a PTY just to assert a function returns the right value. 3. Spawn: ```rust - let mut h = Harness::builder(Harness::cargo_bin("deepseek-tui")) + let mut h = Harness::builder(Harness::cargo_bin("codewhale-tui")) .cwd(ws.workspace()) .seal_home(ws.home()) .env("DEEPSEEK_API_KEY", "ci-test-key") diff --git a/crates/tui/tests/support/qa_harness/harness.rs b/crates/tui/tests/support/qa_harness/harness.rs index 4344973a..3ebebde4 100644 --- a/crates/tui/tests/support/qa_harness/harness.rs +++ b/crates/tui/tests/support/qa_harness/harness.rs @@ -221,6 +221,12 @@ impl Harness { if let Some(path) = std::env::var_os(&key) { return PathBuf::from(path); } + if name == "codewhale-tui" + && let Some(path) = option_env!("CARGO_BIN_EXE_codewhale-tui") + { + return PathBuf::from(path); + } + // Legacy fallback for callers still referencing the old bin name. if name == "deepseek-tui" && let Some(path) = option_env!("CARGO_BIN_EXE_deepseek-tui") {