Add soft assertion aggregation for test cases#20
Merged
Conversation
This lets one SkillGym run report multiple assertion failures together without losing assertion failure classification.
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.
Summary
Add
assert.soft.*so SkillGym test cases can collect multiple sync assertion failures and report them together at the end of the assert hook.Context
This wraps the existing Node strict assert surface and SkillGym grouped helpers in an execution-scoped soft assertion collector, then flushes or merges failures in
executeRunneras one finalAssertionError. It keeps runner failure classification stable, limits the first pass to sync assertions, and adds coverage for pure soft failures, mixed soft plus hard failures, and state isolation between runs.Fixes #18
Proposed Testing Scenario
Run a suite where one test case calls multiple
assert.soft.*helpers and confirm the run fails once with all assertion messages listed in order after the assert hook completes. Then add a hard assertion after a soft failure and confirm the final failure still comes through as a single assertion failure that includes both messages.