guardrails icon indicating copy to clipboard operation
guardrails copied to clipboard

Bug/onfail status updates

Open zsimjee opened this issue 10 months ago • 1 comments

This PR changes the way we define statuses on ValidationOutcome. Before, the status was defined by whether or not there were any unresolved errors remaining in the outcome (with some bugs). For example, if a guard ran out of reasks and the payload still failed validation at the end, the status was reported as 'fail'. However, if a field failed validation and was modified (refrained, filtered, or fixes), that was reported as a non-failure. In this way, ValidationOutcome's status was intentioned as a reflection of whether the guarded_output is useable at it's final destination. To see which validators had actually failed, users would need to iterate over guard.history.last.iterations[n].failed_validations.

If this PR is accepted, the new definition of ValidationOutcome status is whether or not on final pass (i.e. after all reasks etc) any validation failed at all. This means that if a result was fixed, refrained, or filtered, the guarded_output would be set appropriately, but the ValidationOutcome would be status='fail'. In the case of a reask where the reask'ed values pass validations, the ValidationOutcome would be status='pass'.

The big gap with this new definition is what to do with scenarios where reasks are exhausted. Currently, they're treated as 'failures', but the problem with this is that if they are status='fail' and actual usable outcomes are also status='fail', then how do users differentiate usable vs unusable outcomes?

zsimjee avatar Apr 09 '24 12:04 zsimjee

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 11 '24 01:08 github-actions[bot]

This PR was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Aug 25 '24 03:08 github-actions[bot]