Files
codex/codex-rs/core-api
akak-oai 936ac6dbe6 Add critical-path snapshots for turn milestones (#64935)
## Why

The completed turn profile describes the whole turn. A host measuring latency
to an intermediate event needs the elapsed time and critical path at that event.

## What changed

Expose `turn_milestones` through `codex-core-api` and bind host-provided watches
when a regular turn starts. Add helpers to match published assistant text to
the sampled response and capture a one-shot observation with its source,
elapsed time, and critical path at the cutoff.

## Testing

Add tests that verify a cutoff during a second sampling round includes earlier
sampling and joined tool work, stale or cancelled candidates leave the watch
available, and elapsed time is recorded even when critical-path capture is
disabled.

GitOrigin-RevId: 507b7aaf8819b5cedf608ea66807c632bcb59c82
2026-12-01 06:25:16 +00:00
..