One function

line_text in leeguooooo/claude-code-usage-bar

The author described this change as fix(ip_risk): 警示文案点名登录动作+明确后果. It counts as a record because the check below fails on the code as it stood at cb73d5734 and passes on 9ec1602b5, with nothing else changed between the two runs.

Fix saved2026-07-02
Sharing licenceMIT · LICENSE
Change size+6 3

What the code was meant to do, written into the code itself as a docstring

Full warning line, or "" when the IP is clean enough (≤ SHOW_THRESHOLD). English by design (user request) and explicit about the consequence: a dirty egress IP is an account-ban risk.

The change

1313 kind = str(entry.get("type", "") or "").strip()
1414 kind_part = f" ({kind})" if kind else ""
1515 if risk >= CRIT_RISK:
16- return (f"✗ ip risk {risk}/100{kind_part} — "
17- f"high account-ban risk, consider switching network")
18- return f"⚠ ip risk {risk}/100{kind_part} — current ip may risk account ban"
16+ # Name the specific dangerous action: logging in / re-authenticating
17+ # Claude from a flagged datacenter/proxy IP is what triggers the ban.
18+ return (f"✗ ip risk {risk}/100{kind_part} — do NOT log in / re-auth "
19+ f"Claude on this IP: account WILL be banned. switch network first")
20+ return (f"⚠ ip risk {risk}/100{kind_part} — risky IP; avoid logging in / "
21+ f"re-authenticating Claude here (account-ban risk)")

The check that tells the two apart

failpass·tests/test_ip_risk.py::test_line_warn_and_crit_wording

Check file tests/test_ip_risk.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itcb73d57343a9a5801701c18bb2d418667cdfcc5e
Broken version dated2026-07-02
Moduleclaude_statusbar.ip_risk
Units changedline_text
Fingerprint6d057287b8efa2a0
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in leeguooooo/claude-code-usage-bar