Skip to content

fix(cli): fail fast on an unusable bootstrap or report path#876

Merged
Chemaclass merged 1 commit into
mainfrom
fix/validate-paths
Jul 25, 2026
Merged

fix(cli): fail fast on an unusable bootstrap or report path#876
Chemaclass merged 1 commit into
mainfrom
fix/validate-paths

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #875

Third in the same class as #871 and #873: an unusable path was accepted, the work it
configured was skipped, and the run still reported success.

--env missing.sh was sourced unchecked — it leaked a raw No such file or directory,
ran no tests at all, and exited 0. An unwritable report destination produced a
passing suite, no file on disk, and exit 0, so a CI job uploads an empty artifact from
a green build.

💡 Changes

  • Check the --env/--boot bootstrap is readable before sourcing it, and error with a non-zero exit when it is not
  • Check every report destination (--report-json, --log-junit, --report-tap, --report-html, --log-gha) up front against the resolved configuration, so an unwritable path fails before the suite runs rather than after it has passed
  • Validate --seed as a non-negative integer, matching the options covered in fix(cli): validate option values instead of dropping bad ones #874
  • Add acceptance coverage for each failure mode plus regression guards that a valid bootstrap and a writable report path still work

Both were accepted without a check, the work they configured was skipped,
and the run still exited 0.

  --env missing.sh      sourced unchecked: leaked a raw 'No such file or
                        directory', ran no tests at all, exit 0
  --report-json <bad>   suite passed, redirect failed after the fact, no
                        report on disk, exit 0 -- a CI job uploads an
                        empty artifact from a green build

The bootstrap is checked before it is sourced; the report destinations
are checked up front against the resolved configuration, so the failure
is reported before the suite runs rather than after it has passed.
--seed joins the other numeric options in being validated.

Closes #875
@Chemaclass Chemaclass added the bug Something isn't working label Jul 25, 2026
@Chemaclass Chemaclass self-assigned this Jul 25, 2026
@Chemaclass
Chemaclass merged commit 0e30a8b into main Jul 25, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/validate-paths branch July 25, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant