agrag.common.data_models.stage_failure.cap_failures
cap_failures(failures:list[StageFailure]) -> CappedFailures
Return failures capped per stage, with the untruncated true count.
Logs a warning when truncation occurs, since the capped list alone no longer reflects how many items actually failed.
Parameters:
- failures (
list[StageFailure]) – Every failure the stage recorded.
Returns:
CappedFailures– The capped list, the true failure count, and whether the list wasCappedFailures– truncated.