Skip to content

test: regression tests for verdict.json serialization (never None)#2

Merged
dacervera merged 2 commits into
mainfrom
fix/verdict-json-none
Mar 10, 2026
Merged

test: regression tests for verdict.json serialization (never None)#2
dacervera merged 2 commits into
mainfrom
fix/verdict-json-none

Conversation

@dacervera

Copy link
Copy Markdown
Contributor

Summary

Adds two regression tests confirming verdict.json status field is always a valid string, never None.

What was investigated

Traced the full serialization path: pipeline.pyaggregator.run()Verdict.model_dump()_write_json(). Every path produces a valid status. The field_serializer on VerdictStatus explicitly calls .value. The fallback (aggregator crash) hardcodes VerdictStatus.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-trip
  • test_verdict_fallback_serialization — aggregator-crash fallback path

37/37 tests passing.

Akkari 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.
@dacervera
dacervera merged commit 016e9c6 into main Mar 10, 2026
6 checks passed
@dacervera
dacervera deleted the fix/verdict-json-none branch March 10, 2026 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant