test: regression tests for verdict.json serialization (never None)#2
Merged
Conversation
added 2 commits
March 9, 2026 22:56
Adds two tests confirming verdict.json status field is always a valid string across all verdict paths (PASS, PASS_WITH_NOTES, REVISE, REJECT) and the aggregator-crash fallback path. Covers serialization, JSON round-trip, and the fallback Verdict constructor. Investigation found the original bug was likely caused by partial writes during crash-resilience work, resolved by progressive saves in 4b9bd5a. No code fix needed — regression tests lock it down. Closes: fix/verdict-json-none
References ANTHROPIC_API_KEY_GH_SHAREDIN_QUORUM instead of ANTHROPIC_API_KEY to match the actual repository secret name.
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
Adds two regression tests confirming
verdict.jsonstatus field is always a valid string, neverNone.What was investigated
Traced the full serialization path:
pipeline.py→aggregator.run()→Verdict.model_dump()→_write_json(). Every path produces a valid status. Thefield_serializeronVerdictStatusexplicitly calls.value. The fallback (aggregator crash) hardcodesVerdictStatus.REJECT.Root cause: Likely a partial write during crash-resilience development, resolved by progressive saves in
4b9bd5a. No code fix needed.Tests added
test_verdict_json_serialization_never_none— all 4 verdict paths × serialization + JSON round-triptest_verdict_fallback_serialization— aggregator-crash fallback path37/37 tests passing.