fix(cli): unwrap the walkforward UnknownKnob Debug frame into bare prose

render_bind_error's catch-all Debug-framed UnknownKnob although its
payload is already a fully-prosed message; the variant now renders the
payload alone. The two tests that pinned the frame verbatim repoint to
the prose fragments. Exit 2 unchanged. Completes the #247 defect
family: no Rust identifier reaches a user's stderr on either verb path.

closes #269
This commit is contained in:
2026-07-13 23:28:25 +02:00
parent 3d422341eb
commit bdafbdef59
2 changed files with 8 additions and 9 deletions
+5 -6
View File
@@ -1920,12 +1920,10 @@ fn override_paths(
/// (`KindMismatch { .. }` / `MissingKnob("..")`), the two variants the sweep
/// terminal actually raises past `override_paths`' own pre-flight (which
/// already rejects an unresolvable axis name as prose before either call
/// site below ever reaches the terminal). Other variants keep the
/// established `{:?}` rendering unchanged — in particular `UnknownKnob`
/// already carries a fully-prosed message string at both call sites here
/// (wrapped from `override_paths`' own `Result<_, String>`), and pinned
/// tests (`aura_walkforward_emits_an_unknown_axis_rejection_once` et al.)
/// depend on that Debug-wrapped shape.
/// site below ever reaches the terminal). `UnknownKnob` already carries a
/// fully-prosed message string (wrapped from `override_paths`' own
/// `Result<_, String>`) — unwrapped here rather than Debug-framed (#269), so
/// the walkforward path's rejection reaches stderr as bare prose too.
fn render_bind_error(e: &BindError) -> String {
match e {
BindError::MissingKnob(name) => format!(
@@ -1936,6 +1934,7 @@ fn render_bind_error(e: &BindError) -> String {
"axis {knob}: expected {expected:?}, supplied {got:?} — \
see `aura sweep <bp> --list-axes`"
),
BindError::UnknownKnob(msg) => msg.clone(),
other => format!("{other:?}"),
}
}