codex/codex-rs/core/tests
Owen Lin 196964ef10 Preserve root turn attribution in turn-start events (#44611)
## Why

Persisted turn-start events lack the originating root turn ID, so they cannot directly associate child turns with the root turn that initiated them.

## What changed

- Add optional `root_turn_id` to `TurnStartedEvent`. Use the inherited root turn ID when available, otherwise the turn's own ID.
- Centralize turn-start emission for regular turns, shell commands, and manual compaction so they record attribution consistently.
- Carry attribution into `ThreadHistoryTurnChange` when processing turn-start events and retain it through completion in the history builder.
- Keep older records compatible by defaulting missing attribution to `None`.

## Testing

Add coverage for root and child turn attribution, persistence when tool collisions fail a turn before sampling, history change propagation, and deserialization of older turn-start records.

GitOrigin-RevId: 54a80b828ca7d1c4c19f13d468c01d052e1b9130
History 2026-09-10 18:24:13 +00:00
..
common Remove the unused legacy remote compaction implementation (#44273) 2026-09-09 18:40:53 +00:00
remote_env_windows Apply remote platform semantics to exec safety checks (#42113) 2026-09-01 18:24:56 +00:00
suite Preserve root turn attribution in turn-start events (#44611) 2026-09-10 18:24:13 +00:00
all.rs [codex] Use expect in integration tests (#28441) 2026-06-15 21:53:47 -07:00
responses_headers.rs Sanitize credentials from Git remote metadata (#40713) 2026-08-25 21:34:05 +00:00