Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ impl FeedbackRequestProcessor {
{
tracing::info!(target: "feedback_tags", chatgpt_user_id);
}
if let Some(account_id) = self
.auth_manager
.auth_cached()
.and_then(|auth| auth.get_account_id())
{
tracing::info!(target: "feedback_tags", account_id);
Comment on lines +75 to +80
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 👍 / 👎.

}
let snapshot = self.feedback.snapshot(conversation_id);
let thread_id = snapshot.thread_id.clone();
let (feedback_thread_ids, sqlite_feedback_logs, state_db_ctx) = if include_logs {
Expand Down
5 changes: 5 additions & 0 deletions codex-rs/feedback/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ mod tests {
tags.insert("cli_version".to_string(), "wrong-version".to_string());
tags.insert("session_source".to_string(), "wrong-source".to_string());
tags.insert("reason".to_string(), "wrong-reason".to_string());
tags.insert("account_id".to_string(), "actual-account".to_string());
tags.insert("model".to_string(), "gpt-5".to_string());
let snapshot = FeedbackSnapshot {
bytes: Vec::new(),
Expand Down Expand Up @@ -809,6 +810,10 @@ mod tests {
upload_tags.get("reason").map(String::as_str),
Some("actual reason")
);
assert_eq!(
upload_tags.get("account_id").map(String::as_str),
Some("actual-account")
);
assert_eq!(
upload_tags.get("client_tag").map(String::as_str),
Some("from-client")
Expand Down
Loading