core-agent-ide/codex-rs/protocol/src
Owen Lin aa3fe8abf8
feat(core): persist trace_id for turns in RolloutItem::TurnContext (#13602)
This PR adds a durable trace linkage for each turn by storing the active
trace ID on the rollout TurnContext record stored in session rollout
files.

Before this change, we propagated trace context at runtime but didn’t
persist a stable per-turn trace key in rollout history. That made
after-the-fact debugging harder (for example, mapping a historical turn
to the corresponding trace in datadog). This sets us up for much easier
debugging in the future.

### What changed
- Added an optional `trace_id` to TurnContextItem (rollout schema).
- Added a small OTEL helper to read the current span trace ID.
- Captured `trace_id` when creating `TurnContext` and included it in
`to_turn_context_item()`.
- Updated tests and fixtures that construct TurnContextItem so
older/no-trace cases still work.

### Why this approach
TurnContext is already the canonical durable per-turn metadata in
rollout. This keeps ownership clean: trace linkage lives with other
persisted turn metadata.
2026-03-05 13:26:48 -08:00
..
prompts Revert "Revert "realtime prompt changes"" (#13398) 2026-03-03 14:41:26 -08:00
account.rs add error messages for the go plan type (#10181) 2026-01-30 01:17:25 +00:00
approvals.rs feat(app-server): support mcp elicitations in v2 api (#13425) 2026-03-05 07:20:20 -08:00
config_types.rs support 'flex' tier in app-server in addition to 'fast' (#13391) 2026-03-03 22:46:05 -08:00
custom_prompts.rs [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939) 2025-10-30 18:18:53 +00:00
dynamic_tools.rs feat(app-server, core): allow text + image content items for dynamic tool outputs (#10567) 2026-02-04 16:12:47 -08:00
items.rs image-gen-event/client_processing (#13512) 2026-03-04 16:54:38 -08:00
lib.rs Revert "Add skill approval event/response (#12633)" (#12811) 2026-02-26 01:02:42 +00:00
mcp.rs feat: replace custom mcp-types crate with equivalents from rmcp (#10349) 2026-02-02 17:41:55 -08:00
message_history.rs Generate JSON schema for app-server protocol (#5063) 2025-10-20 11:45:11 -07:00
models.rs image-gen-core (#13290) 2026-03-03 23:11:28 -08:00
num_format.rs Fix execpolicy parsing for multiline quoted args (#9565) 2026-01-22 22:16:53 -08:00
openai_models.rs chore: add web_search_tool_type for image support (#13538) 2026-03-05 07:02:27 +00:00
parse_command.rs [app-server] remove serde(skip_serializing_if = "Option::is_none") annotations (#5939) 2025-10-30 18:18:53 +00:00
plan_tool.rs Plan mode: stream proposed plans, emit plan items, and render in TUI (#9786) 2026-01-30 18:59:30 +00:00
protocol.rs feat(core): persist trace_id for turns in RolloutItem::TurnContext (#13602) 2026-03-05 13:26:48 -08:00
request_user_input.rs Better handling skill depdenencies on ENV VAR. (#9017) 2026-01-29 14:13:30 -05:00
thread_id.rs feat: sqlite 1 (#10004) 2026-01-28 15:29:14 +01:00
user_input.rs Enforce user input length cap (#12823) 2026-02-25 22:23:51 -08:00