Description
Determine the prover pass/fail outcome once after accepted risks are applied, and make the full and compact renderers presentation-only.
Today, render_compact() and render_report() independently derive the return value from the number of active finding paths. This duplicates domain logic and can classify an unaccepted pathless finding as passing even though the prover contract says any unaccepted finding fails.
Context
Identified while reviewing #2395.
Relevant code:
crates/openshell-prover/src/lib.rs
crates/openshell-prover/src/report.rs
crates/openshell-prover/src/accepted_risks.rs
The public prove() -> Result<i32> contract can remain unchanged. The cleanup should move outcome evaluation out of rendering and remove the unused path arguments from render_compact().
Definition of Done
Description
Determine the prover pass/fail outcome once after accepted risks are applied, and make the full and compact renderers presentation-only.
Today,
render_compact()andrender_report()independently derive the return value from the number of active finding paths. This duplicates domain logic and can classify an unaccepted pathless finding as passing even though the prover contract says any unaccepted finding fails.Context
Identified while reviewing #2395.
Relevant code:
crates/openshell-prover/src/lib.rscrates/openshell-prover/src/report.rscrates/openshell-prover/src/accepted_risks.rsThe public
prove() -> Result<i32>contract can remain unchanged. The cleanup should move outcome evaluation out of rendering and remove the unused path arguments fromrender_compact().Definition of Done
render_compact()no longer accepts unused path arguments.Ok(0).Ok(0).Ok(1), including a pathless finding.