fix(diagnostics): unify diagnostic serialization#895
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
15e1501 to
62dc260
Compare
62dc260 to
69cb217
Compare
|
Automation follow-up (2026-07-06): the first CI run failed in Pushed
Updated validation:
Keeping |
|
Automation status update (2026-07-06): refreshed CI is green on Current GitHub checks:
Moved labels from |
|
Users Simulation automation review (2026-07-06): ready by simulation on head Evidence:
Caveat: the CI GLM user-endpoint artifact still has |
…none-policy # Conflicts: # src/benchflow/sandbox/daytona_dind.py
|
Daily scan follow-up (2026-07-07): resolved the merge conflict on current head Conflict resolution was limited to
GitHub now reports the PR mergeable; |
|
Users Simulation automation review (2026-07-07): ready by simulation on current head Evidence:
Caveat: the GLM user-endpoint artifact has healthy tokens/timing but |
|
Users Simulation automation review (2026-07-08): ready by simulation on head Evidence:
Thermo-nuclear review: no structural blocker found. The diagnostic change is narrow and does not add broad special-case branching. Metadata caveat: GLM artifact token/timing coverage is healthy, but Labels: |
|
Users Simulation automation review (2026-07-10): blocked on head What passed:
Blocking finding:
No model-backed rollout artifacts were accepted in this pass; the blocker is in the startup-diagnostic path before the rollout artifact gate. |
|
Daily scan follow-up (2026-07-10): pushed Fix:
Local validation in
Keeping |
|
Users Simulation automation follow-up (2026-07-10): ready by simulation on current head The structured-diagnostic blocker from #895 (comment) is addressed by the latest head: invalid Daytona DinD Validation now available:
Moving the PR back to |
|
Users Simulation automation follow-up (2026-07-10): ready by simulation on current head The earlier blocker on Current-head checks are green:
Restoring labels to |
# Conflicts: # src/benchflow/sandbox/daytona_dind.py
|
Daily scan refresh (2026-07-11): merged current Conflict resolution kept current main's stop-file Daytona DinD heartbeat loop, which avoids orphaned sleep without the older trap-only branch, and preserved this PR's structured Validation before push from isolated worktree
Pushed head |
|
Daily scan CI follow-up (2026-07-11): refreshed GitHub CI is green on head Current checks:
Moving back to |
|
Users Simulation automation review (2026-07-11): ready by simulation on head Scope checked: diagnostic Evidence:
Artifact health:
Thermo review: no blocker. |
Purpose
Fixes the remaining open scope of #531 after #858: diagnostic
to_dict()serialization had an inconsistentNonepolicy. The baseDiagnostic.to_dict()keptNonefields whileTransportClosedDiagnostic.to_dict()dropped selected optional fields, so result JSON diagnostic info shapes were not governed by one rule.Changes
Diagnostic.to_dict()omit unpopulatedNonefields for every diagnostic subclass.TransportClosedDiagnosticcompacting behavior for emptyraw_message, while delegatingNonefiltering to the shared base method.Nonevalues.sleepchild on termination, so fast commands return promptly. Also adds explicit type guards for Daytona DinD kwargs thattyflagged while validating the file.Validation
uv run --extra dev python -m pytest tests/test_acp.py::TestDiagnosticRegistry -q-> 6 passeduv run --extra dev python -m pytest tests/test_acp.py tests/test_api_error_capture.py tests/test_oracle_chokepoint.py tests/test_integration_check_results.py::test_check_results_flags_sandbox_startup_error_with_diagnostics tests/test_integration_check_results.py::test_check_results_flags_transport_error_with_diagnostics -q-> 153 passed, 1 skippeduv run --extra dev python -m pytest tests/test_daytona_dind_compose_up.py -q-> 12 passeduv run --extra dev python -m pytest tests/test_daytona_dind_compose_up.py::test_long_exec_heartbeat_returns_promptly_after_fast_command tests/test_daytona_dind_compose_up.py::test_long_exec_heartbeat_only_wraps_long_commands tests/test_acp.py::TestDiagnosticRegistry -q-> 8 passeduv run --extra dev ruff check src/benchflow/diagnostics.py src/benchflow/sandbox/daytona_dind.py tests/test_acp.py tests/test_daytona_dind_compose_up.pyuv run --extra dev ruff format --check src/benchflow/diagnostics.py src/benchflow/sandbox/daytona_dind.py tests/test_acp.py tests/test_daytona_dind_compose_up.pyuv run --extra dev ty check src/benchflow/diagnostics.py src/benchflow/sandbox/daytona_dind.pygit diff --checkNotes
This intentionally leaves
price_sourceenum modeling out of scope, matching the narrowed #531 follow-up. It does change optional diagnostic info dicts to omit unset optional fields consistently; top-level diagnostic fields inresult.jsonremain present throughRolloutDiagnostics.to_result_fields().Closes #531