Fix regular trace ATIF trajectory shape#379
Merged
Conversation
9adaba7
into
mmprotest/add-full-transcript-and-atif-v1.7-artifacts
8 of 10 checks passed
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.
Motivation
trajectory.json) conforms to ATIF v1.7 while keeping the new trace-debug artifact feature intact.Description
villani_code/atif_export.pyto emit an ATIF v1.7-shaped trajectory with sequentialstep_id,sourceandmessagefields, ATIF-standard per-agentmetrics.prompt_tokens/metrics.completion_tokens,llm_call_count,tool_callsentries usingtool_call_id/function_name/arguments, andobservation.resultsentries withsource_call_idand serializedcontent; redaction is preserved.transcript.full.jsongeneration unchanged except for ensuring tests still validate provider-reportedusagetelemetry is present and unmodified.tests/test_regular_trace_artifacts.pyto assert the ATIF v1.7 root/step/tool/observation/final-metrics shape and to validate telemetry preservation, redaction, gating, and non-fatal export behavior.Testing
pytest -q tests/test_regular_trace_artifacts.py tests/test_debug_mode_and_recorder.pywhich passed (22 passed).pytest -q tests/test_trace_runtime_path.pywhich passed (8 passed).pytest -q tests/test_loop.pyand observed pre-existing failures unrelated to this patch (3 failing tests due to anUnboundLocalErrorinRunner.runretry path); these failures were present after the change and the patch did not modify that codepath.villani_code/atif_export.pyandtests/test_regular_trace_artifacts.py; trace-debug transcript token telemetry remains preserved intranscript.full.json;trajectory.jsonnow uses ATIF v1.7 field names and structures as required; and benchmark, autonomous/Villani, small-model, planning-only, prompts, tool flow, validation, and existing transcript/gating behavior were not changed and remain covered by the tests.Codex Task