[codex] add account id to feedback uploads#21498
Conversation
There was a problem hiding this comment.
💡 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".
| if let Some(account_id) = self | ||
| .auth_manager | ||
| .auth_cached() | ||
| .and_then(|auth| auth.get_account_id()) | ||
| { | ||
| tracing::info!(target: "feedback_tags", account_id); |
There was a problem hiding this comment.
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 👍 / 👎.
Why
Feedback uploads already carry auth-derived context like
chatgpt_user_id, but they do not include the authenticated workspace/account id. Addingaccount_idmakes feedback triage easier when a user can operate across multiple ChatGPT workspaces.What changed
account_idinto feedback tags inapp-serverbefore the feedback snapshot is uploadedcodex-feedbackupload tag assembly alongside the existing merge behavior for other tagscodex-feedbackcoverage to assert that snapshot-derivedaccount_idis present in uploaded tagsVerification
cargo test -p codex-feedback upload_tags_include_client_tags_and_preserve_reserved_fieldscargo test -p codex-app-server --lib feedback_processor