Repository navigation
Description
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 fromripr calibrate cargo-mutants --mutants-json nope.json --repo-exposure-json nope2.json. - The repo already holds the pattern this surface lacks:
ripr pluswith no input answers with the exact capture command — "Runripr check --root . --format repo-exposure-summary-json > summary.jsonfirst, thenripr plus --repo-exposure-summary summary.json." (observed), andfirst-prnames aRegeneration 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
EffortlessSteven commentedon Oct 11, 2026
Accepted on
main.779b72ba178d22b94f7973255fe277e91a500c95outcome --before/--afterandcalibrate cargo-mutants --mutants-json/--repo-exposure-jsonsnapshots now reportnot foundplus the per-caller capture command instead of a raw OS error