Skip to content

Implement end-of-run summary for logira run#8

Merged
melonattacker merged 1 commit into
mainfrom
feature/add-summary-output-after-run
May 12, 2026
Merged

Implement end-of-run summary for logira run#8
melonattacker merged 1 commit into
mainfrom
feature/add-summary-output-after-run

Conversation

@melonattacker
Copy link
Copy Markdown
Owner

This pull request introduces a new end-of-run summary feature for the logira run command, improving the user experience by providing concise summaries of run events and detections. It adds a --summary flag to control summary output, refactors exit code handling, and includes comprehensive tests for the new functionality.

End-of-run summary feature:

  • Added run_summary.go with logic to load and render a summary of run events, detection severities, risk assessment, and top detections at the end of each run. The summary is configurable via a new --summary flag (auto, off, or detections).
  • Updated run.go to parse the --summary flag, call the summary rendering function after each run, and enhance the help/usage output with new summary-related information and examples. [1] [2] [3] [4]

Exit code handling improvements:

  • Added a new ExitCodeError type to cli and refactored main error handling logic to return accurate exit codes for subcommands and errors. [1] [2]

Testing:

  • Added tests for the new summary logic in run_summary_test.go, verifying risk level calculation, summary rendering modes, and database seeding for test runs.
  • Added tests for the new exit code handling logic in main_test.go.

Miscellaneous:

  • Minor cleanup: removed an unused import in run.go.

@melonattacker melonattacker linked an issue May 12, 2026 that may be closed by this pull request
@melonattacker melonattacker merged commit 9b78c31 into main May 12, 2026
3 checks passed
@melonattacker melonattacker deleted the feature/add-summary-output-after-run branch May 12, 2026 13:58
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.

Add end-of-run summary output to logira run

1 participant