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.
Summary
All three built-in agent rollout ingesters derive
started_at/ended_atby takingmin()/max()over raw timestamp strings.Current behavior
packages/data-designer-engine/src/data_designer/engine/resources/agent_rollout/claude_code.pypackages/data-designer-engine/src/data_designer/engine/resources/agent_rollout/codex.pypackages/data-designer-engine/src/data_designer/engine/resources/agent_rollout/atif.pyThis assumes the incoming timestamps are lexicographically sortable in chronological order.
Why this is worth fixing
ATIF specifies
timestampas ISO 8601, but ISO 8601 still allows different UTC offsets and precisions. For example,2025-01-01T00:30:00+01:00is earlier than2025-01-01T00:00:00Z, but a raw string comparison orders it later.That means we can derive incorrect
started_at/ended_atvalues even when the source timestamps are individually valid.Proposed direction
started_at/ended_at.Non-goal
This issue is about timestamp normalization only. It is not about reordering ATIF steps; ATIF already defines
step_idas the ordinal turn index and expects sequential steps.