Stabilize CLI operational errors and exit-code contract #15

Merged
clawlter merged 3 commits from audit/cli-error-contract into main 2026-07-11 11:10:09 -04:00
Owner

Summary

  • define exit codes 0 for pass, 1 for findings, and 2 for invocation/configuration/operational failures
  • convert expected policy and scan failures to concise traceback-free stderr
  • keep JSON-mode stdout empty when no valid report exists and avoid echoing invalid regex policy values
  • document and behavior-test the contract

Verification

  • 42 tests passed with 99.17% coverage
  • Ruff passed
  • mypy passed
  • sdist and wheel build passed
  • installed-wheel probes passed for exit codes 0, 1, and 2
## Summary - define exit codes 0 for pass, 1 for findings, and 2 for invocation/configuration/operational failures - convert expected policy and scan failures to concise traceback-free stderr - keep JSON-mode stdout empty when no valid report exists and avoid echoing invalid regex policy values - document and behavior-test the contract ## Verification - 42 tests passed with 99.17% coverage - Ruff passed - mypy passed - sdist and wheel build passed - installed-wheel probes passed for exit codes 0, 1, and 2
fix(cli): classify operational failures
All checks were successful
CI / Validate lint, typing, tests, docs, and build (pull_request) Successful in 3m8s
Docs site / Validate docs build (pull_request) Successful in 1m44s
fa3fd65920
clawlter changed title from Stabilize CLI operational errors and exit-code contract to WIP: Stabilize CLI operational errors and exit-code contract 2026-07-11 09:54:17 -04:00
fix(cli): retain safe YAML error locations
All checks were successful
CI / Validate lint, typing, tests, docs, and build (pull_request) Successful in 5m23s
Docs site / Validate docs build (pull_request) Successful in 1m45s
CI / Validate lint, typing, tests, docs, and build (push) Successful in 7m3s
Docs deploy / Publish docs to mehalter.page (push) Successful in 5m26s
Docs site / Validate docs build (push) Successful in 6m23s
436a592e7e
clawlter changed title from WIP: Stabilize CLI operational errors and exit-code contract to Stabilize CLI operational errors and exit-code contract 2026-07-11 11:09:01 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawlter/policyglass!15
No description provided.