Skip to content

ux(cli): ripr outcome (and calibrate cargo-mutants) answer a missing input file with a raw OS error and no way forward #7327

Closed

Description

@EffortlessSteven

Symptom

A user finishing the core loop — ripr check → add a focused test → "did the gap move?" — runs ripr outcome for the first time with plausible but not-yet-created snapshot paths:

$ ripr outcome --before before.json --after after.json
ripr: read before.json failed: The system cannot find the file specified. (os error 2)

The error names the file, but it is a raw io::Error string and gives no hint about what a "before"/"after" snapshot is or how to produce one, even though this is the most likely first-run state (the user has never captured a snapshot). The user must go back to --help and reconstruct the capture pipeline themselves.

Evidence

  • crates/ripr/src/cli/commands.rs:1313-1316 — the reader both --before/--after (outcome) and --mutants-json/--repo-exposure-json (calibrate cargo-mutants) flow through:
fn read_calibration_text(path: &Path) -> Result<String, String> {
    crate::bounded_input::read_to_string(path)
        .map_err(|err| format!("read {} failed: {err}", output::outcome::display_path(path)))
}
  • Observed on current main (built from 8a2e358): ripr outcome --before nope.json --after nope2.json → ripr: read nope.json failed: The system cannot find the file specified. (os error 2); same shape from ripr calibrate cargo-mutants --mutants-json nope.json --repo-exposure-json nope2.json.
  • The repo already holds the pattern this surface lacks: ripr plus with no input answers with the exact capture command — "Run ripr check --root . --format repo-exposure-summary-json > summary.json first, then ripr plus --repo-exposure-summary summary.json." (observed), and first-pr names a Regeneration command: for each missing artifact.

Why it frustrates

ripr outcome is the closing step of the loop the README and --help teach, so its most common failure is a first-time user who has not captured snapshots yet. The raw OS message reads as an internal fault rather than a missing-input state, and unlike the sibling surfaces (ripr plus, ripr first-pr) it does not route the user to the one command that produces the missing artifact. The user story: "I did what the loop said, I got a system error, I do not know if outcome is broken or my files are wrong."

Suggested direction

Smallest semantic-owner fix: in the outcome/calibrate read path, distinguish "file does not exist" (or is a directory, which already has its own message at commands.rs:1295-1298) and append one capture hint per input kind, e.g. for --before/--after: "capture a snapshot with ripr check --format repo-exposure-json > before.json (or pass a ripr check --json output)". Keep the existing message shape; do not restructure the readers.

Classification: verified_current. Confidence: medium-high (message text and read site traced; behavior observed on a from-source build of current main).

Activity

  1. EffortlessSteven commented on Oct 11, 2026

    @EffortlessSteven
    MemberAuthor

    Accepted on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions