Expand description
Detect quoted single-command misuse in rch exec
(bd-session-history-remediation-ocv9i.13.1).
Agents repeatedly ran rch exec "cargo check --all-targets" — the whole
command as one quoted string, with no -- separator. Clap then treats
cargo check --all-targets as a single program name and RCH tries to exec a
bogus binary. This module detects that shape and, instead of running
anything, returns a clear correction: rch exec -- cargo check --all-targets.
detect_exec_misuse is pure: given the argv after exec and whether a
-- separator was present, it decides misuse and builds the suggestion. The
ExecMisuseReport carries reason_code = exec_quoted_command_misuse, the
parsed suggestion, and the original argv for a machine-readable error.
Structs§
- Exec
Misuse Report - The result of checking
rch execargv for quoted-command misuse.
Constants§
- QUOTED_
MISUSE_ REASON - The stable reason code string for this misuse (not an
RCH-Innnincident code — it is a CLI-usage error, surfaced verbatim in the JSON error).
Functions§
- detect_
exec_ misuse - Detect quoted single-command misuse. Pure.