Skip to content

fix: redact account displays to two trailing characters - #487

Merged
Pigbibi merged 2 commits into
mainfrom
fix/account-redaction-last-two
Nov 1, 2026
Merged

Pigbibi merged 2 commits into
mainfrom
fix/account-redaction-last-two

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

AI assistance

OpenAI Codex; model selection is controlled by the host configuration.

What changed

Account identifiers in renewal logs and account-selection errors retained four trailing characters. The shared masker now exposes at most two, fully masking identifiers of two characters or fewer. The notification renderer also applies the masker so raw or previously masked account fields cannot bypass redaction in cycle logs and alerts.

The old display value was also used to locate durable submission claims and session-maintenance markers. Preserve those private object locators separately, while masking new state payload account fields to two characters. Changing the locators would bypass existing duplicate-submission protection. State-store errors now omit private locators and provider exception details, including chained tracebacks.

Regression coverage exercises the real HTTP error handler, notification routing, renderer and Telegram sender, replacing only broker/storage/HTTP boundaries with offline fakes. It covers English/Chinese, unified notifications enabled/disabled, raw/legacy account inputs, renewal stdout, and pre-existing claim/maintenance records. Historical golden comparisons still require identical broker calls and storage locators; only the intended account payload redaction differs.

How verified

  • Reproduced the original failures before changing the implementation: seven masker/renewal cases and four HTTP alert-path cases.
  • Full suite: uv run --no-sync python -m pytest -q -o pythonpath=. — 1,491 passed, 13 subtests passed, one third-party NumPy deprecation warning. The path override uses the frozen installed dependencies instead of unrelated sibling checkouts.
  • uv run --no-sync ruff check --exclude external . — passed.
  • uv run --no-sync python scripts/check_style.py — zero blocking findings; one existing README advisory.
  • Frozen dependency sync, uv pip check, uv lock --check, installed shared-package revision/import checks, and sdist/wheel build — passed.
  • git diff --check and staged public-content review — passed. All added test data is synthetic.

Draft for review only. No deployment, merge, broker invocation, live notification, IAM change, cloud write or candidate backfill was performed. The read-only operational investigation and bilingual reports are retained outside this public repository. Historical logs and stored objects are not rewritten by this change.

Co-Authored-By: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ea1971f4-bfac-495e-804f-1953f540b4c7
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Pigbibi Pigbibi added the owner-approved Owner approval for high-risk PRs. AI agents must never apply this label. label Nov 1, 2026
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi marked this pull request as ready for review November 1, 2026 07:26
@Pigbibi
Pigbibi merged commit 1e3715a into main Nov 1, 2026
9 checks passed
@Pigbibi
Pigbibi deleted the fix/account-redaction-last-two branch November 1, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved Owner approval for high-risk PRs. AI agents must never apply this label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant