Skip to content

[codex] trace pre-sampling skill and persistence latency#29042

Merged
rphilizaire-openai merged 1 commit into
mainfrom
dev/rphilizaire/trace-presampling-latency
Jun 19, 2026
Merged

[codex] trace pre-sampling skill and persistence latency#29042
rphilizaire-openai merged 1 commit into
mainfrom
dev/rphilizaire/trace-presampling-latency

Conversation

@rphilizaire-openai

Copy link
Copy Markdown
Contributor

Summary

  • Add trace spans around skill listing, selection, catalog rendering, and prompt loading.
  • Trace extension and legacy skill injection along with connector/session bookkeeping.
  • Trace conversation recording through rollout persistence, thread-store append, and local writer flush.
  • Record bounded item, input, connector, catalog, and skill counts on the relevant spans.

Why

run_turn traces had a substantial pre-sampling attribution gap after skill/plugin preparation and before run_sampling_request. Skill context recording and the synchronous rollout flush were covered only by the outer turn span, making it impossible to distinguish skill work, event emission, and persistence latency.

This change uses function-level #[tracing::instrument] attributes only and does not change runtime behavior.

Validation

  • just test -p codex-core-skills -p codex-skills-extension -p codex-thread-store — 196 passed.
  • just test -p codex-core suite::skills::user_turn_includes_skill_instructions — passed.
  • Broader affected-crate run compiled all four crates and ran 2,948 tests: 2,920 passed; 28 unrelated sandbox/timing-sensitive integration tests failed, including Seatbelt permission errors and websocket/mock timeouts.
  • Rust formatting completed and git diff --check passed. The aggregate formatter also attempted unavailable uv/dotslash formatters and could not rewrite the parent justfile under the workspace sandbox.

@rphilizaire-openai
rphilizaire-openai merged commit a57b268 into main Jun 19, 2026
31 checks passed
@rphilizaire-openai
rphilizaire-openai deleted the dev/rphilizaire/trace-presampling-latency branch June 19, 2026 17:13
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants