Skip to content

Conversation

@Demolus13
Copy link
Member

@Demolus13 Demolus13 commented Oct 13, 2025

Summary

This PR restructures the console rendering code to show table headers of verify-policy command, centralize table creation, add per-dependency rendering, move check-summary updates to the analyzer, clean up progress handling, and ensure the console output is checked for any Processing and marked as Failed before stopping or exiting.

Description of changes

  • Column names updated to Component ID, PURL, Policy Name for verify-policy command.
  • Introduced TableBuilder to centralize table construction and avoid repetitive table-building code. Many smaller helper methods were added (e.g. _make_checks_table, _make_failed_checks_table, _make_summary_table, mark_failed).
  • Added a Dependency class to represent and render per-dependency analysis sections (description, progress, failed checks, and summary) and allow rendering for dependency lists.
  • RichConsoleHandler was refactored to compose the live layout from reusable tables and dependency make_layout().
  • Calls that previously updated the console from the report/result objects were moved into the analyzer flow. The update_checks_summary() calls now happen from src/macaron/slsa_analyzer/analyzer.py for both the main record and dependency records so the console UI receives updates as analysis completes.
  • remove_progress_bar() is called when checks complete to ensure the progress task is removed from the live progress bar.
  • The mark_failed() method was added/extended to convert any in-progress Status entries to a failed state and is invoked when stopping or exiting.
  • Added a new "Logging and Console Output" section to docs/source/pages/developers_guide/style_guide.rst that documents the macaron.console use and how to interact with the rich handler.

Related issues

N/A

Checklist

  • I have reviewed the contribution guide.
  • My PR title and commits follow the Conventional Commits convention.
  • My commits include the "Signed-off-by" line.
  • I have signed my commits following the instructions provided by GitHub. Note that we run GitHub's commit verification tool to check the commit signatures. A green verified label should appear next to all of your commits on GitHub.
  • I have updated the relevant documentation, if applicable.
  • I have tested my changes and verified they work as expected.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 13, 2025
@Demolus13 Demolus13 self-assigned this Oct 13, 2025
@Demolus13 Demolus13 force-pushed the pgovale/ui-enhancements branch 3 times, most recently from 9ab4896 to 5b301a2 Compare October 21, 2025 05:17
@behnazh-w behnazh-w changed the title refactor: show table headers and handle exits refactor: show table headers in console and handle exits Oct 29, 2025
Signed-off-by: Demolus13 <parth.govale@oracle.com>
Signed-off-by: Demolus13 <parth.govale@oracle.com>
Signed-off-by: Demolus13 <parth.govale@oracle.com>
Signed-off-by: Demolus13 <parth.govale@oracle.com>
Signed-off-by: Demolus13 <parth.govale@oracle.com>
Signed-off-by: Demolus13 <parth.govale@oracle.com>
@Demolus13 Demolus13 force-pushed the pgovale/ui-enhancements branch from 6dd079c to 73faef3 Compare October 29, 2025 04:55
Signed-off-by: Demolus13 <parth.govale@oracle.com>
Signed-off-by: Demolus13 <parth.govale@oracle.com>
@Demolus13 Demolus13 marked this pull request as ready for review October 29, 2025 16:33
@Demolus13 Demolus13 requested a review from behnazh-w as a code owner October 29, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant