Account verification diagnostics (client / installer 1.33)
========================================================
Account HTTP errors retain the backend's fixed error code, including HTTP 400
client_update_required. The popup includes a 16-character reference. Client
failures record the build, purpose, failed verification/transport stage, HTTP
status, Windows error code, time and optional server reference. No response body,
URL, token, private key, hardware identifier or free-form exception is logged.

Client events are signed by the existing IW4x identity with a separate DIAGNOSTIC
V1 signature domain. The backend derives the GUID from the verified public key;
it stores sanitized fields, not the submitted key/signature. A signature proves
who submitted the report, not that its contents are true. Reports never change
Ranked, moderation, identity, device evidence or account permissions.

Account challenge/prove rejections are also captured on the server, including
old clients which cannot send diagnostic events. These distinguish claimed
identities from verified proofs. Reporting failure never changes the original
account result. Client and server reports have separate per-identity budgets.

Local pending reports: %LOCALAPPDATA%\Zeal\diagnostics\account-failures.json
16 entries / 64 KiB maximum, seven-day lifetime, ten attempts per event with
30-second to 15-minute backoff, only while the game is open. One report is sent
at a time. Successful acknowledgments remove the local copy. If the game key is
unavailable the report stays local. Disk/network failures cannot block Ranked.
Malformed/edited local payloads cannot add arbitrary log fields to an upload.

MS-02: /var/lib/zeal/accounts.sqlite3, account_diagnostics table. Seven-day
retention, 10,000 total records, 100 per identity/source/day, 20 report requests
per IP/minute. Retries deduplicate by reference and payload. The service has no
public report-list endpoint. Backend cleanup runs at least hourly.

Read reports on MS-02, from /opt/zeal-registration:
  /opt/zeal-ranked/venv/bin/python -m zeal_accounts.admin \
    --database /var/lib/zeal/accounts.sqlite3 diagnostics --username Ynzie
  /opt/zeal-ranked/venv/bin/python -m zeal_accounts.admin \
    --database /var/lib/zeal/accounts.sqlite3 diagnostics --reference abcd-0123-abcd-0123

Device policy correction
------------------------
All Ranked entries still use a signed device-aware proof. Legacy clients receive
client_update_required. No identifiers / fewer than two families / a single
matching family are review flags, not Ranked restrictions. Clean players and
new accounts do not need an exception. Two matching independent families from
one permanently banned profile still block; explicit account restrictions still
apply. Promoting an account changes its staff role, not its GUID or device state.

QA covers real Windows HTTP success/denial, the reference popup, central lookup,
blocked HTTPS with local persistence and successful retry after reconnect, and
entry to the real Ranked lobby with a clean firmware-only report and no exception.
That owned QA account is removed after testing. This does not substitute for a
successful attempt on the affected player's own PC.
