feat!: introduce confidence scores for check facts#620
Conversation
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
9968c46 to
7f92fe2
Compare
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
01d446e to
9aedac6
Compare
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
|
Under this new schema, the confidence score is recorded for a |
For this particular example, I think of |
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
bc4374a to
d25bf57
Compare
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
nathanwn
left a comment
There was a problem hiding this comment.
I think the PR should be good to merge.
Thanks for the PR.
Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
This PR changes the data model and allows specifying confidence scores for check results, which is especially useful when a check reports multiple candidate results. All of these confidence scores are added to the check tables in the database. However, the fact that has the highest confidence is shown in the HTML/JSON report only. The justifications are no longer required to be added manually to the CheckResultData. Instead, they are curated directly from the results in the table. If a column has specified JustificationType in the column mapping, it will be picked up automatically and rendered as plain text or href depending on the specified type. If a check fails or is skipped, we show a default Not Available. justification. This allows to create HTML/JSON reports from the database reproducibly. Signed-off-by: behnazh-w <behnaz.hassanshahi@oracle.com>
Confidence score and justification type
This PR allows specifying confidence scores for check results, which is especially useful when a check reports multiple candidate results. All of these confidence scores are added to the check tables in the database. However, the fact that has the highest confidence is shown in the HTML/JSON report only.
The justifications are no longer required to be added manually to the
CheckResultData. Instead, they are curated directly from the results in the table. If a column has specifiedJustificationTypein the column mapping, it will be picked up automatically and rendered as plain text or href depending on the specified type. If a check fails or is skipped, we show a defaultNot Available.justification. This allows to create HTML/JSON reports from the database reproducibly.Refactoring
For this feature to work, the following refactorings are done as well:
CheckFactsORM mapping, which all the check mappings inherit from. That caused some circular dependency issues for theExpectationORM mapping. I have refactored and improved this mapping accordingly.asset_urltoProvenanceAvailableFacts. That required adding a newSLSAProvenanceDatawrapper class for GitHub release provenances.Documentation
I have added elaborate instructions for adding a new check and explained the current interface.