Skip to content

fix(claude-swap-alias-redaction): With Hide Personal Info enabled, the CodexBar menu shows every claude-swap account's non-email la... - #3495

Open
eggyrooch-blip wants to merge 6 commits into
steipete:mainfrom
eggyrooch-blip:feat/claude-swap-alias-redaction
Open

fix(claude-swap-alias-redaction): With Hide Personal Info enabled, the CodexBar menu shows every claude-swap account's non-email la...#3495
eggyrooch-blip wants to merge 6 commits into
steipete:mainfrom
eggyrooch-blip:feat/claude-swap-alias-redaction

Conversation

@eggyrooch-blip

Copy link
Copy Markdown
Contributor

解决什么问题

多账号(claude-swap 4 账号)菜单在"隐藏个人信息"开启时只剩匿名数字,无法分辨哪张卡是哪个账号;要求卡片标题和紧凑行恢复显示账号标识(alias),邮箱仍然遮蔽。

怎么改的

  • ftask: pre-ship audit snapshot (claude-swap-alias-redaction)
  • ftask: pre-ship audit snapshot (claude-swap-alias-redaction)
  • ftask: pre-ship audit snapshot (claude-swap-alias-redaction)
  • fix(menu): keep claude-swap account aliases visible under Hide Personal Info
  • ftask: scaffold claude-swap-alias-redaction

怎么验证

  • 开启 Hide Personal Info + claude-swap ≥2 账号(含 alias)→ 菜单每张卡/每个紧凑行显示 alias;纯邮箱账号标题仍为空。
  • "shared@email.com · Org" 无 alias 标签 → 显示 "Org"。

ftask-slug: claude-swap-alias-redaction
ftask-type: fix
base: main
Opened by ftask (sunke's agent-OS). Platform CI is the source of truth.

…al Info

hidePersonalInfo redacted account labels with redactEmail, which wipes the
entire value. claude-swap labels are aliases or slot labels by design
(identity is the slot, display prefers the alias), so the compact account
menu showed anonymous usage numbers with no way to tell accounts apart.

Add redactAccountLabel, which redacts only email-shaped substrings and
keeps non-email labels, and use it for the account card title and the
compact row label. Emails are still fully masked; an 'email · org' label
keeps the organization name.
@clawsweeper

clawsweeper Bot commented Sep 8, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-08T06:36:24.784545Z a973c44 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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

Copy link
Copy Markdown

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: a973c440f3

ℹ️ 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".

Comment on lines +1258 to 1260
let email = PersonalInfoRedactor.redactAccountLabel(
Self.email(from: input),
isEnabled: input.hidePersonalInfo)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Limit alias-preserving redaction to Claude Swap

When Hide Personal Info is enabled for any non-Claude-Swap card, this shared path now preserves every account identifier that is not shaped like an email. For example, email(from:) explicitly returns Cursor subject IDs such as app-user, while authoritative token and fleet account labels may contain arbitrary user-assigned names; all of these were previously blanked by redactEmail. Gate the alias-preserving behavior on the Claude Swap provider/source (and likewise avoid applying it unconditionally in the shared compact renderer) so the privacy setting continues hiding identities for other account types.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed September 8, 2026, 2:51 AM ET / 06:51 UTC.

ClawSweeper review

What this changes

The PR preserves non-email account labels in menu cards and compact rows, adds redaction tests, and includes task metadata.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

Blocked before merge - 9 items remain

The menu improvement remains useful and is not implemented on current main. Both previously reported privacy defects remain unresolved, and the supplied validation still lacks after-fix app evidence.

Priority: P2
Reviewed head: 3c82118dde25b615e9cd48a4d6b9c9f80a835a7d

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch is focused and useful, but two unresolved privacy defects and test-only proof prevent readiness.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The supplied specification claims focused unit-test passes, but does not show the changed card and compact-row renderers in a freshly built app. After-fix menu evidence must show distinguishable Claude-swap labels and hidden identities, including an existing enabled privacy preference. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦪 silver shellfish (2/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The supplied specification claims focused unit-test passes, but does not show the changed card and compact-row renderers in a freshly built app. After-fix menu evidence must show distinguishable Claude-swap labels and hidden identities, including an existing enabled privacy preference. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 10 items Repository policy and scope: Read the complete root AGENTS.md. It requires provider isolation, focused model coverage, and freshly built app evidence for runtime UI validation. No nested AGENTS.md or maintainer-notes directory was found. The repository review profile also prohibits automatic closure.
Prior findings remain applicable: The production directory has no changes since the previously reviewed head. The latest commit changes only the redactor tests. The supplied prior review lists the same two privacy findings, and the separate review comment corroborates the provider-scoping defect.
Shared card path exposes other identities: The changed redactedText call applies to every provider. Its email helper explicitly returns Cursor subject IDs when email is absent, and accepts authoritative account fallbacks. CursorMenuCardModelTests supplies auth0|app-user as an existing supported input.
Findings 2 actionable findings [P1] Preserve redaction for non-Claude-swap account identities
[P1] Redact supported email forms before preserving account labels
Security Needs attention Existing privacy preference exposes other-provider identities: Both shared rendering paths replace whole-value suppression with email-only filtering, revealing subject IDs and named accounts that were previously hidden.
Supported address forms survive filtering: Internal-domain and quoted addresses can remain fully visible, while apostrophe local parts can be partially exposed.

How this fits together

CodexBar projects provider account information into menu cards and compact account rows. These shared renderers apply the saved Hide Personal Info preference before displaying account identities.

flowchart TD
  A[Claude swap accounts] --> C[Account labels]
  B[Other provider accounts] --> C
  C --> E[Shared privacy filtering]
  D[Hide Personal Info preference] --> E
  E --> F[Menu cards]
  E --> G[Compact account rows]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The supplied specification claims focused unit-test passes, but does not show the changed card and compact-row renderers in a freshly built app. After-fix menu evidence must show distinguishable Claude-swap labels and hidden identities, including an existing enabled privacy preference. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Preserve redaction for non-Claude-swap account identities (P1) - This shared call now preserves every non-email identifier when Hide Personal Info is enabled. For example, the existing Cursor fallback returns app-user from auth0|app-user, which was previously blanked. The compact renderer makes the same change for token and Codex account labels. Restrict alias preservation to the Claude-swap provider/source and retain whole-value redaction for other sources. This prior finding remains unresolved.
  • Redact supported email forms before preserving account labels (P1) - Delegating to the existing ASCII dotted-domain regex leaves owner@corp and "owner"@example.com visible, and leaves o' from o'connor@example.com. These inputs can reach account labels and already have dashboard regression coverage. Previously the menu blanked the entire value. Detect and remove complete address ranges, including the existing dashboard cases, before preserving surrounding text. This prior finding remains unresolved.
  • Resolve security concern: Existing privacy preference exposes other-provider identities - Both shared rendering paths replace whole-value suppression with email-only filtering, revealing subject IDs and named accounts that were previously hidden.
  • Resolve security concern: Supported address forms survive filtering - Internal-domain and quoted addresses can remain fully visible, while apostrophe local parts can be partially exposed.
  • Resolve merge risk (P1) - Users upgrading with Hide Personal Info already enabled would immediately expose formerly hidden identifiers; fresh-install and upgrade privacy behavior have no after-fix app proof.
  • Complete next step (P2) - Resolve both privacy findings and add after-fix evidence from a freshly built app showing cards and compact rows with privacy off/on, including an existing enabled preference after upgrade. Screenshots or a recording are preferred for this visible behavior; redacted logs or a validation transcript also count. Remove private addresses, keys, endpoints, and other personal details before posting. Update the PR body to trigger review; if it does not, ask a maintainer to comment @clawsweeper re-review.
  • Improve patch quality - Fix both privacy findings and add model-level regressions for other providers and supported email forms.
  • Improve patch quality - Provide after-fix app evidence covering cards, compact rows, and fresh versus existing privacy preferences.

Findings

  • [P1] Preserve redaction for non-Claude-swap account identities — Sources/CodexBar/MenuCardView.swift:1258-1260
  • [P1] Redact supported email forms before preserving account labels — Sources/CodexBar/PersonalInfoRedactor.swift:21-24
  • [high] Existing privacy preference exposes other-provider identities — Sources/CodexBar/MenuCardView.swift:1258
  • [high] Supported address forms survive filtering — Sources/CodexBar/PersonalInfoRedactor.swift:24
Agent review details

Security

Needs attention: The patch introduces two privacy-display regressions; no additional supply-chain or credential-execution change was found.

Review metrics

Metric Value Why it matters
Production and test growth production net +17 lines; tests +40 lines The focused helper addresses a stated menu problem, but its tests do not cover the shared-provider regression or broader supported email forms.

Merge-risk options

Maintainer options:

  1. Preserve privacy while restoring account labels (recommended)
    Scope label preservation to Claude swap, cover complete-address removal and other-provider redaction, and demonstrate the existing privacy preference after upgrade.

Technical review

Best possible solution:

Keep label preservation specific to Claude swap, remove complete email ranges using the established broader detection cases, and preserve other providers’ existing privacy behavior with upgrade coverage.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main sends Claude-swap aliases through a whole-value redactor, producing blank menu labels when privacy is enabled. The proposed regressions are also source-reproducible; no runtime execution was performed.

Is this the best way to solve the issue?

No. The shared unconditional replacement changes unrelated providers and relies on narrower email detection than the repository already supports; provider-scoped handling with complete-address removal is safer.

Full review comments:

  • [P1] Preserve redaction for non-Claude-swap account identities — Sources/CodexBar/MenuCardView.swift:1258-1260
    This shared call now preserves every non-email identifier when Hide Personal Info is enabled. For example, the existing Cursor fallback returns app-user from auth0|app-user, which was previously blanked. The compact renderer makes the same change for token and Codex account labels. Restrict alias preservation to the Claude-swap provider/source and retain whole-value redaction for other sources. This prior finding remains unresolved.
    Confidence: 0.99
  • [P1] Redact supported email forms before preserving account labels — Sources/CodexBar/PersonalInfoRedactor.swift:21-24
    Delegating to the existing ASCII dotted-domain regex leaves owner@corp and "owner"@example.com visible, and leaves o' from o'connor@example.com. These inputs can reach account labels and already have dashboard regression coverage. Previously the menu blanked the entire value. Detect and remove complete address ranges, including the existing dashboard cases, before preserving surrounding text. This prior finding remains unresolved.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against c3f3ea1faf70.

Labels

Label justifications:

  • P2: This is a bounded account-menu usability improvement; the proposed privacy regressions block merging without making the existing usability issue an emergency.
  • merge-risk: 🚨 security-boundary: The patch weakens an enabled privacy setting by exposing other-provider identifiers and incompletely removing email addresses.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The supplied specification claims focused unit-test passes, but does not show the changed card and compact-row renderers in a freshly built app. After-fix menu evidence must show distinguishable Claude-swap labels and hidden identities, including an existing enabled privacy preference. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [high] Existing privacy preference exposes other-provider identities — Sources/CodexBar/MenuCardView.swift:1258
    Both shared rendering paths replace whole-value suppression with email-only filtering, revealing subject IDs and named accounts that were previously hidden.
    Confidence: 0.99
  • [high] Supported address forms survive filtering — Sources/CodexBar/PersonalInfoRedactor.swift:24
    Internal-domain and quoted addresses can remain fully visible, while apostrophe local parts can be partially exposed.
    Confidence: 0.99

What I checked:

  • Repository policy and scope: Read the complete root AGENTS.md. It requires provider isolation, focused model coverage, and freshly built app evidence for runtime UI validation. No nested AGENTS.md or maintainer-notes directory was found. The repository review profile also prohibits automatic closure. (AGENTS.md:1, 3c82118dde25)
  • Prior findings remain applicable: The production directory has no changes since the previously reviewed head. The latest commit changes only the redactor tests. The supplied prior review lists the same two privacy findings, and the separate review comment corroborates the provider-scoping defect. (Sources/CodexBar, 3c82118dde25)
  • Shared card path exposes other identities: The changed redactedText call applies to every provider. Its email helper explicitly returns Cursor subject IDs when email is absent, and accepts authoritative account fallbacks. CursorMenuCardModelTests supplies auth0|app-user as an existing supported input. (Sources/CodexBar/MenuCardView.swift:1258, 3c82118dde25)
  • Compact renderer also serves other account sources: The unconditional replacement is shared by Claude swap, token accounts, and Codex accounts. Token projections supply account.displayName and Codex projections supply account.menuDisplayName, so non-email identity labels now survive an already-enabled privacy setting. (Sources/CodexBar/StatusItemController+CompactAccountMenu.swift:149, 3c82118dde25)
  • Incomplete address detection: The new helper delegates to an ASCII dotted-domain regex. It leaves owner@corp and quoted-local-part addresses intact and removes only connor@example.com from o'connor@example.com. The account-list parser accepts these display strings without restricting them to this regex. (Sources/CodexBar/PersonalInfoRedactor.swift:24, 3c82118dde25)
  • Existing broader redaction contract: Dashboard redaction already detects internal domains, domain literals, apostrophes, Unicode, and quoted local parts; DashboardClaudeSwapSnapshotTests covers those inputs. Its replacement retains domains, so only the address-detection approach should be shared with menus, where full addresses must disappear. (Sources/CodexBarCLI/DashboardSnapshotBuilder.swift:295, 3c82118dde25)

Likely related people:

  • sf-jin-ku: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Zihao Qi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-08T06:40:55.940Z sha a973c44 :: needs real behavior proof before merge. :: [P1] Preserve redaction for non-Claude-swap account identities | [P1] Redact supported email forms before preserving account labels

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

Labels

merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants