pub fn detect_test_command(
root: Option<&Path>,
prompt_named: &str,
) -> Result<TestCommandTarget, UndetectableReason>Expand description
Detect the test command the gate would require, for the bound project.
Why: The missing half of #2279’s trigger — the gate may only refuse a
finish over a command that could actually have been run here (#8206).
What: Err(UndetectableReason) when no root is bound or the root is
empty; otherwise Ok with the manifest-implied command, or the
prompt_named text when the non-empty root carries no recognised
manifest. prompt_named is the substring super::named_test_command
matched in the task prompt / project context.
Test: verify_gate::tests::detect_manifest_names_each_ecosystem,
verify_gate::tests::detect_undetectable_without_root_or_on_empty_root,
verify_gate::tests::detect_falls_back_to_prompt_named_on_non_empty_root.