Skip to content

fix: exit 1 when scan --fail-on-risk or inventory could not read every path - #29

Merged
llbbl merged 1 commit into
mainfrom
fix/unread-path-exit-codes
Oct 21, 2026
Merged

llbbl merged 1 commit into
mainfrom
fix/unread-path-exit-codes

Conversation

@llbbl

@llbbl llbbl commented Oct 20, 2026

Copy link
Copy Markdown
Contributor
  • scan --fail-on-risk now exits 1 when the scan skipped a path it could not read or classify, in text and --json. Plain scan still exits 0. Before, a CI gate built on it passed on an incomplete scan.
  • inventory still completes every mode (write, --check, --stdout) when paths were skipped, then lists them on stderr and exits 1. A mode that already failed keeps its own exit code.
  • optimize keeps exit 2 for an unreadable path, since it refuses before any paid call.
  • docs/exit-codes.md, scan, inventory, README and usage text now agree on these codes.

Closes #23

…y path

`scan --fail-on-risk` now exits 1 when the scan skipped a path it could not read or classify, in text and `--json`. Plain `scan` still exits 0. Before, a CI gate built on it passed on an incomplete scan.

`inventory` still completes every mode (write, `--check`, `--stdout`) when paths were skipped, then lists them on stderr and exits 1. A mode that already failed keeps its own exit code.

`optimize` keeps exit 2 for an unreadable path, since it refuses before any paid call.

docs/exit-codes.md, scan, inventory, README and usage text now agree on these codes.
@llbbl
llbbl merged commit 41e2c13 into main Oct 21, 2026
2 checks passed
@llbbl
llbbl deleted the fix/unread-path-exit-codes branch October 21, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: exit 1 when scan --fail-on-risk or inventory could not read every path

1 participant