Skip to content

Fix exit codes, date checks and knowledge base rebuild end date - #88

Merged
verovaleros merged 6 commits into
developmentfrom
fix/cli-review-findings
Oct 13, 2026
Merged

verovaleros merged 6 commits into
developmentfrom
fix/cli-review-findings

Conversation

@verovaleros

Copy link
Copy Markdown
Member

Summary

Fixes problems found while reviewing #87 (development into main).

  • rebuild-kb processed and cached today's incomplete data. The next day's blocklists would then miss attacks that arrived after the rebuild. The rebuild now stops at yesterday, and a start date of today is rejected.
  • run-models with a start date after the end date did nothing and exited with success. It now prints an error and exits with code 1.
  • Invalid dates printed an error but exited with code 0. They now exit with code 1, so scripts and scheduled jobs can detect the failure.
  • A future date printed "Invalid date format". It now says the date cannot be in the future.
  • generate_historical_blocklists.py imported lib.aip..., which fails with the documented PYTHONPATH=lib setup. It now imports aip... like the rest of the code.
  • README: the rebuild command now says "until yesterday".

Testing

  • Unit tests pass. The future-date test now also checks the error message.
  • Checked by hand that a reversed date range, a badly formatted date, a future date and rebuild-kb for today each print an error and exit with code 1.
  • generate_historical_blocklists.py imports without errors.

@verovaleros
verovaleros marked this pull request as ready for review October 13, 2026 08:14
@verovaleros
verovaleros merged commit c6ff012 into development Oct 13, 2026
3 checks passed
@verovaleros
verovaleros deleted the fix/cli-review-findings branch October 13, 2026 08:14
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.

1 participant