[observability] Fold turn config into turn started\n\nMove turn-specific observation definitions into an events::turn module and\nre-export them from the shared event namespace.\n\nExtend turn.started with resolved configuration so the canonical event models\nthe runtime fact directly instead of mirroring the analytics reducer's separate\nconfig fact. Project turn.started into the existing resolved-config fact plus\nturn-start notification, and update conformance coverage so the observation path\nmatches the legacy codex_turn_event output.\n\nUpdate the design doc to describe resolved turn config as part of turn.started.

This commit is contained in:
Albin Cassirer
2026-04-19 16:08:18 -07:00
parent 7418d6e364
commit 3198988a52
6 changed files with 326 additions and 96 deletions
+4 -4
View File
@@ -145,8 +145,8 @@ Example:
use codex_observability::Observation;
#[derive(Observation)]
#[observation(name = "turn.config_resolved", uses = ["analytics"])]
struct TurnConfigResolved<'a> {
#[observation(name = "turn.started", uses = ["analytics"])]
struct TurnStarted<'a> {
#[obs(level = "basic", class = "identifier")]
thread_id: &'a str,
@@ -154,7 +154,7 @@ struct TurnConfigResolved<'a> {
turn_id: &'a str,
#[obs(level = "basic", class = "operational")]
model: &'a str,
started_at: i64,
}
```
@@ -292,7 +292,7 @@ output schemas.
| Observations | Analytics output |
| --- | --- |
| `thread.started` | `codex_thread_initialized` |
| `turn.started`, `turn.ended` with token usage, and future config observations | `codex_turn_event` |
| `turn.started` with resolved config, `turn.ended` with token usage | `codex_turn_event` |
| `turn.steer_resolved` | `codex_turn_steer_event` |
| compaction lifecycle observations | `codex_compaction_event` |
| skill/app/plugin/guardian observations | existing feature events |