fix: mask cost-history project identity in privacy mode - #3271
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 2:09 PM ET / 18:09 UTC. ClawSweeper reviewWhat this changesExtends “Hide personal information” to mask cost-history project/source labels and paths and Usage & Spend project names, with localized copy, cache invalidation, and regression coverage. Merge readinessKeep open for normal maintainer approval: this owner-authored PR introduces the requested bounded privacy masking, and the reviewed head has no actionable correctness or security finding. Priority: P2 Review scores
Verification
How this fits togetherCodexBar reads local provider cost history and renders it in a hosted menu chart and the Usage & Spend preferences dashboard. The privacy setting now changes only those display projections while the underlying usage records, totals, grouping, and stored history remain intact. flowchart LR
A[Privacy setting] --> B[Menu refresh fingerprint]
B --> C[Cost-history menu]
A --> D[Usage and Spend dashboard]
C --> E[Numbered labels and hidden paths]
D --> F[Numbered project labels]
E --> G[Unchanged cost data]
F --> G
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Land the display-only projection after normal maintainer approval so privacy mode masks the documented project and source identity surfaces without migrating stored usage data. Do we have a high-confidence way to reproduce the issue? Yes—focused source tests construct cost-history snapshots with private names and paths, then verify that enabling the existing setting renders numbered labels while preserving totals and grouping. This review did not execute tests in the read-only checkout. Is this the best way to solve the issue? Yes. A display-only identity projection is the narrowest maintainable solution because it leaves row IDs, ordering, grouping, totals, and persisted history on the original values. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ae0ec9e24457. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
Summary
Honor the maintainer-approved scope of #3262: when “Hide personal information” is enabled, replace project and source names with numbered labels and omit their paths in the cost-history submenu. Usage & Spend also masks project names, including expanded rows.
Masking is an immutable presentation projection. Original project/source objects still own row IDs, source-collapse decisions, sorting, costs, tokens and stored history. The hosted-chart fingerprint includes the privacy setting so changing it invalidates cached content; the dashboard reads the observed setting without triggering another history scan. Turning privacy off restores the original labels.
The settings explanation, all translated catalogs, documentation and changelog describe the bounded display behavior. Session IDs, exports and unrelated diagnostics are unchanged; this is not a claim that arbitrary exports are sanitized.
Verification
make check: passed, zero lint violations across 2,042 files; all 22 translated catalogs pass.make test: passed all 960 selections across 80 groups in 2,483.3 seconds. One group reached the normal timeout; all 12 selections passed the runner's standard isolated retries. No deadlines or assertions were loosened.f21fa598cdb1cf514aa4509afb65a060f50b0de5.Before and after
Cost-history menu before (original renderer):
Cost-history menu after, privacy enabled:
Usage & Spend before:
Usage & Spend after, privacy enabled:
Fixes #3262.