chore: migrate execution dataclasses to Pydantic — 24 classes, -218 LOC (AC-489, AC-481)#597
Merged
jayscambler merged 4 commits intomainfrom Apr 1, 2026
Merged
Conversation
…C-481) Converted 24 dataclasses across 9 execution files from @DataClass to Pydantic BaseModel. Eliminates ~316 lines of to_dict/from_dict boilerplate. Files: objective_verification.py, verification_dataset.py, rubric_calibration.py, phased_execution.py, agent_task_evolution.py, bias_probes.py, trajectory_harness.py, evaluator_guardrail.py, judge.py Special case: PhasedExecutionResult.to_dict kept custom (wraps model_dump + adds computed properties: all_completed, failed_phase, completed_phases). TDD: Added test_serde_conventions.py with budget test (manual serde methods ≤ 135) and execution module enforcement test. Fixed 4 test files: positional → keyword construction. 12 files changed, 226 insertions, 444 deletions (-218 net)
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
Migrated 24 execution module dataclasses to Pydantic BaseModel, continuing the batch from analytics (#594), knowledge (#595), and harness (#596). -218 LOC net.
Changes
9 files, 24 classes:
objective_verification.pyverification_dataset.pyrubric_calibration.pyphased_execution.pyagent_task_evolution.pybias_probes.pytrajectory_harness.pyevaluator_guardrail.pyjudge.pySpecial case
PhasedExecutionResult.to_dictkept custom — wrapsmodel_dump()and adds computed properties (all_completed,failed_phase,completed_phases).TDD
Added
test_serde_conventions.py:Verification
ruff check src— all checks passedmypy src— zero errorspytest tests/— all tests passIssues
Continues AC-489 and AC-481