Skip to content

Pass turn id with feedback uploads#17314

Merged
ningyi-oai merged 2 commits into
mainfrom
codex/feedback-turn-id
Apr 11, 2026
Merged

Pass turn id with feedback uploads#17314
ningyi-oai merged 2 commits into
mainfrom
codex/feedback-turn-id

Conversation

@ningyi-oai
Copy link
Copy Markdown
Contributor

@ningyi-oai ningyi-oai commented Apr 10, 2026

Summary

  • Add an optional tags dictionary to feedback upload params.
  • Capture the active app-server turn id in the TUI and submit it as tags.turn_id with /feedback uploads.
  • Merge client-provided feedback tags into Sentry feedback tags while preserving reserved system fields like thread_id, classification, cli_version, session_source, and reason.

Behavior / impact

Existing feedback upload callers remain compatible because tags is optional and nullable. The wire shape is still a normal JSON object / TypeScript dictionary, so adding future feedback metadata will not require a new top-level protocol field each time. This change only adds feedback metadata for Codex CLI/TUI uploads; it does not affect existing pipelines, DAGs, exports, or downstream consumers unless they choose to read the new turn_id feedback tag.

Tests

  • cargo fmt -- --config imports_granularity=Item passed; stable rustfmt warned that imports_granularity is nightly-only.
  • cargo run -p codex-app-server-protocol --bin write_schema_fixtures
  • cargo test -p codex-feedback upload_tags_include_client_tags_and_preserve_reserved_fields
  • cargo test -p codex-app-server-protocol schema_fixtures_match_generated
  • cargo test -p codex-tui build_feedback_upload_params
  • cargo test -p codex-tui live_app_server_turn_started_sets_feedback_turn_id
  • cargo check -p codex-app-server --tests
  • git diff --check
@ningyi-oai ningyi-oai force-pushed the codex/feedback-turn-id branch 4 times, most recently from bb7493f to a3a85ac Compare April 10, 2026 22:19
@ningyi-oai ningyi-oai marked this pull request as ready for review April 10, 2026 23:03
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

ServerNotification::TurnStarted(_) => {
self.last_non_retry_error = None;
if !matches!(replay_kind, Some(ReplayKind::ResumeInitialMessages)) {
self.on_task_started();
}

P1 Badge Capture turn_id from TurnStarted notifications

Update the production handle_server_notification path to store the current turn id. The ServerNotification::TurnStarted(_) arm ignores the payload, so last_turn_id is never set at runtime. open_feedback_note_editor then sends None, and feedback uploads miss the new turn_id tag despite this change’s intent. The only current assignment is in a #[cfg(test)] event path.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ningyi-oai ningyi-oai marked this pull request as draft April 10, 2026 23:14
@ningyi-oai ningyi-oai marked this pull request as ready for review April 11, 2026 00:09
@ningyi-oai ningyi-oai marked this pull request as draft April 11, 2026 00:16
@ningyi-oai ningyi-oai marked this pull request as ready for review April 11, 2026 02:31
@ningyi-oai ningyi-oai force-pushed the codex/feedback-turn-id branch from 841def8 to 9c8e71b Compare April 11, 2026 02:44
ningyi-oai and others added 2 commits April 10, 2026 22:17
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@ningyi-oai ningyi-oai force-pushed the codex/feedback-turn-id branch from 9c8e71b to 26461ec Compare April 11, 2026 05:18
@ningyi-oai
Copy link
Copy Markdown
Contributor Author

/merge

@ningyi-oai ningyi-oai merged commit be13f03 into main Apr 11, 2026
57 of 62 checks passed
@ningyi-oai ningyi-oai deleted the codex/feedback-turn-id branch April 11, 2026 07:23
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants