Skip to content

CLI papercuts: --help handling, fold TTY hang, wasm magic pre-check, suite --name #39

Description

@lann

From the adversarial review (2026-08-04). Batch of verified CLI papercuts (ct-runner usage/parse-error fixes already landed in a4016a3):

  1. --help is a loaded footgun on every binary/subcommand: component-test lock --helpError: reading --help ... No such file or directory; same for fold --help; ct-runner --help → exit 2 with the same shape. Any leading unknown flag is consumed as the input path. Fix: reject positional args starting with -; handle -h/--help/--version explicitly in each hand-rolled parser (three small match arms; no clap needed).
  2. component-test fold with no stdin redirect blocks forever (stdin read precedes all validation). If stdin is a TTY, print a note to stderr or error out (std::io::IsTerminal).
  3. Wrong-file-type errors expose parser internals: ct-runner README.mdexpected `(` --> <anon>:1:1 (WAT parser on markdown); component-test lock README.md → hex dump of the bad magic. Pre-check the wasm magic and say "not a WebAssembly component: ".
  4. Suite identity is the artifact filename stem — one suite ends up with three names (crate sample-suite, case root sample, recorded sample_suite), and results consumers key off the recorded one. Add --name to ct-runner and component-test lock, or default to the inventory's common root segment. Note the envelope/lockfile suite-name cross-check (a4016a3) currently only warns, partly because of this.

Related: #13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    toolingCLI, lockfiles, composition helpers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions