Repository navigation
FEAT: add raise-on-empty variants to true/false score aggregators - #2984
Merged
Roman Lutz (romanlutz) merged 6 commits intoOct 10, 2026
Merged
Roman Lutz (romanlutz) merged 6 commits into
Roman Lutz (romanlutz) merged 6 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…erings Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Roman Lutz (romanlutz)
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2883.
Aggregating an empty score list with
TrueFalseScoreAggregatortoday returnsvalue=Falsewith aCOMPLETEresult, which is indistinguishable from a genuine "veto" verdict, and there is no way to opt into a strict check. The float-scale aggregators already solve this withraise_on_emptyvariants (AVERAGE_RAISE_ON_EMPTY,MAX_RAISE_ON_EMPTY,MIN_RAISE_ON_EMPTYinfloat_scale_score_aggregator.py); this adds the same three opt-in variants to the true/false family —AND_RAISE_ON_EMPTY,OR_RAISE_ON_EMPTY,MAJORITY_RAISE_ON_EMPTY— raisingValueError("No scores available for aggregation")on empty input. Default behavior is unchanged.Tests and Documentation
Test:
pytest tests/unit/score/test_true_false_score_aggregator.py— the 7 new tests fail onmain(AttributeError: type object 'TrueFalseScoreAggregator' has no attribute 'AND_RAISE_ON_EMPTY') and pass on this branch; the existing tests, including the pinned empty-input default, are unchanged and pass. Also ranruff format --checkandruff check(v0.16.9) on the touched files.No JupyText notebooks affected; the float-scale
*_RAISE_ON_EMPTYvariants are likewise not listed indoc/code/scoring/3_combining_scorers.py.