Skip to content

Normalize rollout timestamps before deriving started_at/ended_at #497

@eric-tramel

Description

@eric-tramel

Summary

All three built-in agent rollout ingesters derive started_at / ended_at by taking min() / max() over raw timestamp strings.

Current behavior

  • packages/data-designer-engine/src/data_designer/engine/resources/agent_rollout/claude_code.py
  • packages/data-designer-engine/src/data_designer/engine/resources/agent_rollout/codex.py
  • packages/data-designer-engine/src/data_designer/engine/resources/agent_rollout/atif.py

This assumes the incoming timestamps are lexicographically sortable in chronological order.

Why this is worth fixing

ATIF specifies timestamp as ISO 8601, but ISO 8601 still allows different UTC offsets and precisions. For example, 2025-01-01T00:30:00+01:00 is earlier than 2025-01-01T00:00:00Z, but a raw string comparison orders it later.

That means we can derive incorrect started_at / ended_at values even when the source timestamps are individually valid.

Proposed direction

  • Parse timestamps before comparing them.
  • Normalize to a consistent representation for started_at / ended_at.
  • Apply the same policy across Claude Code, Codex, and ATIF ingestion.
  • Add regression tests that cover differing offsets and mixed-but-valid ISO 8601 inputs.

Non-goal

This issue is about timestamp normalization only. It is not about reordering ATIF steps; ATIF already defines step_id as the ordinal turn index and expects sequential steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyHuman-approved, agent can buildchore🧹

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions