Repository navigation
refactor(prover): separate outcome evaluation from rendering - #2632
eviehoward wants to merge 1 commit into
Conversation
|
This pull request has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. |
|
I'm still keeping an eye on this, AFAIK it's still mergeable- please let me know if anything needs changing or if a rebase is needed 🙂 |
Signed-off-by: Evie Howard <evhoward@redhat.com>
5dc783d to
b1dbd85
Compare
|
Thanks for addressing my concerns @eviehoward LGTM |
|
This pull request has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. |
|
Commenting to remove stale label- still keeping an eye on this, please lmk if anything needs changing or if a rebase is needed 🙂 |
There was a problem hiding this comment.
Thanks for the clear write-up. Looks good to me, with the renderers being presentation-only and pass/fail living in one place, which is what #2411 asked for.
Two non-blocking suggestions:
- Consider making
outcomepublic and moving it next toFinding(infinding.rs). The gateway path builds findings throughrun_all_queriesand never goes throughprove(), so a shared, public pass/fail helper is more useful than a private one inlib.rs, and it gives the logic a home independent of the CLI entry point. apply_accepted_riskstreats a pathless finding as accepted, while the newoutcometreats an unaccepted pathless finding as a failure. They never meet today because the queries only emit findings with at least one path, but it's worth stating that invariant in one place, probably as a doc comment onFinding::paths, so the two don't drift.
One small thing on the compact renderer: the summary now counts findings instead of paths. That reads fine to me and nothing depends on the old string, just flagging it since it is a visible output change.
Once CI runs on the runners, this looks good to merge.
|
/ok to test |
@zredlined, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/ |
|
/ok to test b1dbd85 |
|
Label |
johntmyers
left a comment
There was a problem hiding this comment.
gator-agent
PR Review Status
No blocking findings remain. This focused refactor implements #2411: prove() evaluates the outcome after accepted risks, both renderers only present findings, and the four outcome tests exercise the production helper.
@eviehoward, I checked the helper you added and its call from prove(). @zredlined, I checked your suggestions about helper visibility and pathless findings; those remain optional and do not prevent testing. The compact summary now counts findings, and both banners correctly show REVIEW for an unaccepted pathless finding.
Blocking findings: None.
Carried findings: None.
Gator metadata
- Validation: Localized prover refactor implementing #2411; no conflicting duplicate found.
- Docs: No material published-contract change; the minor summary wording correction does not require a docs gate under pragmatic review calibration.
- Checks: DCO passes. Current-head Branch Checks (including Trivy), Helm Lint, and Branch E2E Checks are queued. Maintainer approval remains outstanding.
- E2E:
test:e2eapplied; authorized/ok to testcreated the matching current-head mirror and queued the E2E workflow with the label present. - Head SHA:
b1dbd85de4f71f6b3e44becd9ef07216f4c1d338 - Base SHA:
6e6e6493b3df093540cfcc43b4a1df501470e561 - Merge base SHA:
6e6e6493b3df093540cfcc43b4a1df501470e561 - Patch ID:
52ddc8300294de80d95f2a90a07f86ecc4f19757 - Gator payload:
12 - Review mode:
initial - Previous reviewed SHA:
none - Review budget exhausted:
no - Maintainer decision required:
no - Next state:
gator:watch-pipeline
Summary
Moves exit-code logic out of the renderers and into prove(), so outcome evaluation happens once in a single place rather than independently in each renderer.
Related Issue
Closes #2411
Changes
Testing
mise run pre-commitpassesChecklist