Harden CLI error and numeric bounds contracts #30

Merged
clawlter merged 1 commit from audit/cli-error-contracts into main 2026-07-13 06:52:05 -04:00
Owner

Remediates HUI-005 and HUI-019.

  • present expected filesystem, JSON input, and SQLite failures as concise stderr with exit 1
  • preserve argparse exit 2 for invalid numeric bounds before database creation
  • reject negative search limits/intervals and non-positive iteration counts
  • preserve tracebacks for unexpected programming errors
  • add installed-entrypoint subprocess coverage for stderr/stdout and failure status contracts

Verification:

  • 26 pytest tests pass
  • Black, isort, and strict Pyright pass
  • build and Twine checks pass
  • clean-wheel CLI smoke passes with PYTHONPATH unset
Remediates HUI-005 and HUI-019. - present expected filesystem, JSON input, and SQLite failures as concise stderr with exit 1 - preserve argparse exit 2 for invalid numeric bounds before database creation - reject negative search limits/intervals and non-positive iteration counts - preserve tracebacks for unexpected programming errors - add installed-entrypoint subprocess coverage for stderr/stdout and failure status contracts Verification: - 26 pytest tests pass - Black, isort, and strict Pyright pass - build and Twine checks pass - clean-wheel CLI smoke passes with PYTHONPATH unset
Harden CLI error and bounds contracts
Some checks failed
Python CI / Validate formatting, typing, and tests (pull_request) Successful in 6m48s
Python CI / Build source and wheel distributions (pull_request) Has been cancelled
1940dfbea4
clawlter force-pushed audit/cli-error-contracts from 1940dfbea4
Some checks failed
Python CI / Validate formatting, typing, and tests (pull_request) Successful in 6m48s
Python CI / Build source and wheel distributions (pull_request) Has been cancelled
to b36f5f6bf6
All checks were successful
Python CI / Validate formatting, typing, and tests (pull_request) Successful in 8m9s
Python CI / Build source and wheel distributions (pull_request) Successful in 6m25s
Python CI / Validate formatting, typing, and tests (push) Successful in 8m15s
Python CI / Build source and wheel distributions (push) Successful in 7m19s
2026-07-11 20:59:48 -04:00
Compare
clawlter changed title from Draft: Harden CLI error and numeric bounds contracts to Harden CLI error and numeric bounds contracts 2026-07-11 21:02:17 -04:00
Author
Owner

Independent review APPROVED for HUI-005/HUI-019 at signed rebased head b36f5f6bf6. No blocker, important, minor, or question findings. Fresh-clone focused subprocess tests (12), full suite (28), Black, isort, strict Pyright, isolated build/Twine, clean-wheel installed-entrypoint behavior, numeric-bound parse timing, stderr/stdout/status contracts, narrow unexpected-exception boundary, signature, and redaction-safe diff scan passed. Merge only after both exact-head Forgejo Python CI contexts succeed; then verify signed linear main and default-branch CI. HUI-004 source changes are disjoint; its concurrent branch currently needs a test-only conflict resolution against the already-merged HUI-001 tests during its own rebase.

Independent review APPROVED for HUI-005/HUI-019 at signed rebased head b36f5f6bf68ed93ef3e232273cbae97f4e40a714. No blocker, important, minor, or question findings. Fresh-clone focused subprocess tests (12), full suite (28), Black, isort, strict Pyright, isolated build/Twine, clean-wheel installed-entrypoint behavior, numeric-bound parse timing, stderr/stdout/status contracts, narrow unexpected-exception boundary, signature, and redaction-safe diff scan passed. Merge only after both exact-head Forgejo Python CI contexts succeed; then verify signed linear main and default-branch CI. HUI-004 source changes are disjoint; its concurrent branch currently needs a test-only conflict resolution against the already-merged HUI-001 tests during its own rebase.
Author
Owner

Independent review verdict: APPROVED at signed SHA b36f5f6bf6. Focused subprocess and installed-entrypoint failures, full suite, Black/isort/Pyright, build/Twine, clean-wheel smoke, narrow expected-exception handling, stderr/stdout and exit-status contracts, invalid numeric bounds, unexpected RuntimeError visibility, and redaction-safe diff/secret checks all passed. Both required exact-head Forgejo contexts succeeded. PR was integrated with the repository rebase/linear policy; default-branch push CI is being verified separately.

Independent review verdict: APPROVED at signed SHA b36f5f6bf68ed93ef3e232273cbae97f4e40a714. Focused subprocess and installed-entrypoint failures, full suite, Black/isort/Pyright, build/Twine, clean-wheel smoke, narrow expected-exception handling, stderr/stdout and exit-status contracts, invalid numeric bounds, unexpected RuntimeError visibility, and redaction-safe diff/secret checks all passed. Both required exact-head Forgejo contexts succeeded. PR was integrated with the repository rebase/linear policy; default-branch push CI is being verified separately.
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/hermes-usage-insights!30
No description provided.