Repository navigation
fix: redact account displays to two trailing characters - #487
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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.uv pip check,uv lock --check, installed shared-package revision/import checks, and sdist/wheel build — passed.git diff --checkand 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.