Skip to content

[codex] add account id to feedback uploads#21498

Open
pakrym-oai wants to merge 1 commit intomainfrom
pakrym/add-account-id-to-feedback
Open

[codex] add account id to feedback uploads#21498
pakrym-oai wants to merge 1 commit intomainfrom
pakrym/add-account-id-to-feedback

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

Why

Feedback uploads already carry auth-derived context like chatgpt_user_id, but they do not include the authenticated workspace/account id. Adding account_id makes feedback triage easier when a user can operate across multiple ChatGPT workspaces.

What changed

  • emit auth-derived account_id into feedback tags in app-server before the feedback snapshot is uploaded
  • preserve that tag through codex-feedback upload tag assembly alongside the existing merge behavior for other tags
  • extend codex-feedback coverage to assert that snapshot-derived account_id is present in uploaded tags

Verification

  • cargo test -p codex-feedback upload_tags_include_client_tags_and_preserve_reserved_fields
  • cargo test -p codex-app-server --lib feedback_processor

@pakrym-oai pakrym-oai marked this pull request as ready for review May 7, 2026 06:12
@pakrym-oai pakrym-oai marked this pull request as draft May 7, 2026 06:12
@pakrym-oai pakrym-oai marked this pull request as ready for review May 7, 2026 06:14
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

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a6dda289d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +75 to +80
if let Some(account_id) = self
.auth_manager
.auth_cached()
.and_then(|auth| auth.get_account_id())
{
tracing::info!(target: "feedback_tags", account_id);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Reserve auth-derived account IDs

When a feedback/upload request includes tags.account_id, the auth-derived value emitted here is not what gets uploaded: FeedbackSnapshot::upload_tags copies client tags before snapshot tags and only skips the existing reserved keys, so a client-supplied account_id creates the entry first and the snapshot tag is ignored. In that scenario feedback triage can be attributed to the wrong workspace even though this code just read the authenticated account; account_id should be reserved or snapshot tags should win for this key.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants