Task · CXO-0022

Adopt the September wire-format additions: turn metadata, prompt-cache options, usage attribution

Description

The 2026-09-03 drift probe over the synced corpus (codex/assessment-2026-09-03-drift-probe.txt) surfaced wire data the reducer does not read yet. The decoder is not broken by any of it (live selfobs: 0 decode errors), so this is adoption, not repair.

New on the wire since 2026-08-09, with what it answers:

Constraints: every new attribute key is a contract decision recorded in internal/attr with its class (Bounded with a cap, or Identity) and covered by TestEveryEmittedAttributeKeyIsOnContract; nothing new becomes a metric dimension in this task without a corpus-measured cardinality in the notes; gen_ai.agent.name keeps its Agent Observability contract (codex | codex/subagent) and the turn-metadata agent_name lands under a codexlb.* key; identifiers stay off metrics and labels.

Acceptance Criteria

Definition of Done

Implementation Plan

Wave 1 after wiring and baseline lane: decode the frozen September fields into Loki and spans only, test fixtures, and refresh the full-scan baseline if profiler output changes.

Implementation Notes

Wire adoption landed at ea31d46, duration-string TTL decoding at 4cd37d3, and review corrections at 05c53ed. Synthetic reducer tests cover root turn, agent, sandbox, window, prompt-cache, safety retry, and identifier-free attribution sums. D9 classes are registered and Loki plus response spans carry the fields without new metric dimensions. Attribution-specific sums use dedicated codexlb.usage.attribution keys while standard GenAI usage keys retain aggregate response totals. Documentation landed at fc1d1aa. Final just check passed at 334a4db; full corpus just test was cancelled and this local source is not yet pushed or deployed.

Final Summary

Adopted the frozen September metadata, prompt-cache, safety retry, and attribution fields into turns, Loki, and spans without new metric dimensions or retained item IDs. Synthetic regressions, content-free full baseline evidence, documentation, and final just check passed; final-SHA publish is tracked separately.

View the source file on GitHub