conformance: prompt fixtures fail on any host that has the optional tools
Summary
The prompt conformance family (crates/tui/tests/fixtures/conformance/prompt/) cannot pass on a host that has the optional host-probed tools installed. The pin file the check compares against — host_probed_tools.golden.json — has never existed in this repository, and nothing records it.
The events family does not have this problem, because it pins the recorded host's tool set before running. The prompt family does not pin, so its result depends on what the runner happens to have installed.
The two families are not symmetric
crates/tui/src/conformance/events.rs:300 pins the recorded host before the turn runs:
let _host_tools = codewhale_dependencies::pin_recorded_host_tools(recorded_host_tools(case));
recorded_host_tools reads recorded_platform.host_tools from the case file, and pin_recorded_host_tools (crates/dependencies/src/lib.rs:396-412) makes host_tool_available (:375-388) answer from that set for the thread. So every events case reproduces the recording host regardless of what the runner has — the events goldens do contain image_ocr and pandoc_convert even though the machines running them need not have tesseract or pandoc.
The prompt family has no equivalent:
$ git grep -n 'pin_recorded_host_tools\|recorded_platform' -- crates/tui/src/conformance/prompt.rs
(no output)
capture_prefix therefore records whatever the current host produced, because the catalog consults the live probe at crates/tui/src/core/engine/tool_catalog.rs:308, :350 and crates/tui/src/tools/registry.rs:1126, :1141.
What that produces
crates/tui/src/conformance/prompt.rs:223-245 compares every host-probed definition this host produced against the pin:
let probed_path = dir.join("host_probed_tools.golden.json");
let mut pinned: BTreeMap<String, Value> = std::fs::read_to_string(&probed_path)
.ok()
.and_then(|text| serde_json::from_str(&text).ok())
.unwrap_or_default();
let mut drift = Vec::new();
for (tool, definition) in &probed_seen {
if pinned.get(tool) != Some(definition) {
drift.push(tool.clone());
pinned.insert(tool.clone(), definition.clone());
}
}
if !drift.is_empty() {
let merged = Value::Object(pinned.into_iter().collect());
failures.record(
"host_probed_tools",
golden::check_golden(&probed_path, &golden::pretty(&merged))...
);
}
The file has never existed at any commit on any ref:
$ git log --all --diff-filter=ADR --name-status -- '*host_probed_tools*'
(no output)
And none of the three prompt goldens contain any of the four tool names, so the fixtures were recorded on a host that offered none of them:
agent_suggest.tools.golden.json code_execution=no image_ocr=no js_execution=no pandoc_convert=no
plan_mode.tools.golden.json code_execution=no image_ocr=no js_execution=no pandoc_convert=no
trusted_project_instructions.tools.golden.json code_execution=no image_ocr=no js_execution=no pandoc_convert=no
On a host with none of the four, the loop is empty, drift stays empty, the check is skipped (it prints host cannot offer [...]; their pinned definitions were not checked), and the family passes. On a host with any of them, drift is non-empty on the first run and check_golden (crates/tui/src/conformance/golden.rs:66-91) returns missing golden ... outside update mode. The family fails.
Re-recording does not resolve it durably. CODEWHALE_CONFORMANCE_UPDATE=1 would write the local tool definitions into the pin, and those are version-dependent — a pandoc 2.x description and a pandoc 3.x description are different bytes — so the next contributor's machine drifts again, and the goldens become a function of whoever recorded last.
The case files describe a host that did not do the recording
All nine case files carrying a recorded_platform block (six under events/, three under prompt/) declare the identical block:
"recorded_platform": {
"recorded_on": "macOS",
"os": "macos",
"shell": "/bin/bash",
"sandbox_enforcement": "local_os",
"no_new_privs_active": null,
"host_tools": ["code_execution", "image_ocr", "js_execution", "pandoc_convert"]
}
For the events family this is live data and it does its job. For the prompt family it is inert — prompt.rs never reads it — and it contradicts the recordings, which plainly happened without those tools. So the field is misleading precisely where it is unused.
Why this has not surfaced
No workflow runs this suite. The only conformance hit under .github/workflows is pet.yml, which is workflow_dispatch-only and exercises the Kotlin/Swift port under pet/. CODEWHALE_CONFORMANCE_UPDATE appears nowhere under .github, and .gitignore does not exclude the missing fixture. So the failure is only reachable by a contributor who runs the suite locally on a machine with those tools installed.
Reproducing
On a machine with pandoc, tesseract, node and python on PATH:
$ cargo test -p codewhale-tui model_visible_prefix_bytes_match_goldens
The prompt cases fail on host_probed_tools with missing golden .../host_probed_tools.golden.json. On a machine with none of the four, the same command passes.
$ git log --all --diff-filter=ADR --name-status -- '*host_probed_tools*'
$ git grep -n 'pin_recorded_host_tools\|recorded_platform' -- crates/tui/src/conformance/prompt.rs
Notes
- I am not proposing a fix. The two obvious directions — pin the prompt family the way events does, or drop the host-probed comparison from the prompt family — change different things about what the prompt goldens are supposed to guarantee, and that is a maintainer decision rather than a patch.
- Unrelated to #7153, which is about streaming during compaction.
🤖 Generated by SpikeBot 000(CodeWhale-LOCAL)
Engine packet, October 31. Inspect the shared recorded-host turn driver and qualify the first-request conformance fixtures on hosts with different optional tool availability. Paths are crates/tui/src/conformance/prompt.rs and crates/tui/tests/fixtures/conformance/prompt.
Verified on Engine main c7721b94c1a. The three recorded first-request cases now fingerprint the complete model-visible catalog. Each matched both with all four optional executables installed and with them removed from PATH. The shared scripted host pins deferred schemas in both environments. GitHub #7174 remains open for release tracking.
Thanks @SparkofSpike for the precise write-up, including the asymmetry between the events and prompt families and the proof that the host_probed_tools pin had never existed. c7721b94c1a on main removes the separate host-probed projection: the prompt cases now pin the recorded host's tools and fingerprint the full model-visible tool catalog. All three existing cases passed both on a developer PATH with optional tools installed and with an empty executable PATH. This is candidate work for 0.10.3, not a shipped release. Because it is a test fix, you can check it on main now with cargo test -p codewhale-tui model_visible_prefix_bytes_match_goldens on your tool-equipped machine. We will close this once you confirm or 0.10.3 ships.
Written by Claude Opus 5.5 for the Codewhale maintainers.
A test result for this family on current main (207144cdc), macOS arm64, host has tesseract and pandoc installed:
cargo test -p codewhale-tui --lib model_visible_prefix_bytes_match_goldensaborts withfatal runtime error: stack overflow, aborting(SIGABRT) under the default test stack — reproducible on every run.- The macOS crash report shows the overflow inside the
Engine::handle_admitted_messagepoll chain with only ~62 frames total: debug-build async poll frame bloat, not runaway recursion. RUST_MIN_STACK=16777216on the same command:test result: ok. 1 passed; 0 failed.
Since c7721b94c landed with [skip ci], this family has not run in CI; posting so the next runner of the Test job is not surprised. Happy to send a PR that runs each prompt case on a thread with an explicit 16 MiB stack if that is the shape you want.
Thank you @Aboysky for running model_visible_prefix_bytes_match_goldens on macOS arm64 with tesseract and pandoc installed. That confirms c7721b94c1 holds on a tool-equipped host once stack headroom is present, and it isolates the bare cargo test abort to debug-build async poll frame size on the default test thread stack (CI and the dev scripts export a 16 MiB RUST_MIN_STACK; see .config/nextest.toml).
A small PR that runs each prompt case on an explicit 16 MiB std::thread::Builder stack, so bare cargo test passes without RUST_MIN_STACK, is very welcome. main is frozen for the 0.10.3 candidate, so if you open it against main with Refs #7174 we will land it right after the 0.10.3 tag. Thanks @SparkofSpike for the original report; this issue stays open until 0.10.3 ships.
Written by Claude Sonnet 5.5 for the Codewhale maintainers.
Thank you @SparkofSpike for showing that the prompt fixtures compared a host-probed tool list that was never pinned, and @Aboysky for confirming the fix on a host with tesseract and pandoc. The fix is in the v0.10.3 sources (c7721b94c1): the prompt cases fingerprint the full model-visible tool catalog. It is a test change, so check out the v0.10.3 tag to run it (the package itself is npm install -g [email protected]). Please reopen if model_visible_prefix_bytes_match_goldens still fails on a tool-equipped host with RUST_MIN_STACK=16777216.