Skip to content

Fix regular trace ATIF trajectory shape#379

Merged
mmprotest merged 1 commit into
mmprotest/add-full-transcript-and-atif-v1.7-artifactsfrom
mmprotest/fix-atif-artifact-patch-to-version-1.7
Jun 3, 2026
Merged

Fix regular trace ATIF trajectory shape#379
mmprotest merged 1 commit into
mmprotest/add-full-transcript-and-atif-v1.7-artifactsfrom
mmprotest/fix-atif-artifact-patch-to-version-1.7

Conversation

@mmprotest

Copy link
Copy Markdown
Owner

Motivation

  • Ensure the regular-runner trace-debug trajectory artifact (trajectory.json) conforms to ATIF v1.7 while keeping the new trace-debug artifact feature intact.
  • Preserve existing provider-reported input/output token telemetry in the full transcript artifact and avoid changing runtime gating or export failure behavior.

Description

  • Edited villani_code/atif_export.py to emit an ATIF v1.7-shaped trajectory with sequential step_id, source and message fields, ATIF-standard per-agent metrics.prompt_tokens/metrics.completion_tokens, llm_call_count, tool_calls entries using tool_call_id/function_name/arguments, and observation.results entries with source_call_id and serialized content; redaction is preserved.
  • Kept transcript.full.json generation unchanged except for ensuring tests still validate provider-reported usage telemetry is present and unmodified.
  • Updated tests/test_regular_trace_artifacts.py to assert the ATIF v1.7 root/step/tool/observation/final-metrics shape and to validate telemetry preservation, redaction, gating, and non-fatal export behavior.
  • Made minimal, targeted changes only and preserved the existing integration boundary and artifact-writing guards.

Testing

  • Ran pytest -q tests/test_regular_trace_artifacts.py tests/test_debug_mode_and_recorder.py which passed (22 passed).
  • Ran pytest -q tests/test_trace_runtime_path.py which passed (8 passed).
  • Ran pytest -q tests/test_loop.py and observed pre-existing failures unrelated to this patch (3 failing tests due to an UnboundLocalError in Runner.run retry path); these failures were present after the change and the patch did not modify that codepath.
  • Harbor validator was not available in the environment so no Harbor schema run was performed (harbor not installed).
  • Confirmations: the patch modified villani_code/atif_export.py and tests/test_regular_trace_artifacts.py; trace-debug transcript token telemetry remains preserved in transcript.full.json; trajectory.json now 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

@mmprotest mmprotest merged commit 9adaba7 into mmprotest/add-full-transcript-and-atif-v1.7-artifacts Jun 3, 2026
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant