Skip to content

Retry hosted verification soon after a failed fetch; warn once per outage - #114

Merged
valzargaming merged 1 commit into
mainfrom
claude/project-thread-pb46bi
Nov 17, 2026
Merged

valzargaming merged 1 commit into
mainfrom
claude/project-thread-pb46bi

Conversation

@valzargaming

Copy link
Copy Markdown
Member

Requested by Val · project thread

Problem

After the 17:34 UTC restart on 2026-11-17 the desktop bot logged Chat relay identity lookup unavailable; sending unverified display text once per relayed chat line. The bot log shows why: the first hosted verification fetch after boot failed (available:false, has_valid_list:false at 17:34:44, after two 10 s timeouts), and nothing retried for 30 minutes. While the list is unavailable, Verifier::get() throws and the relay sends plain text with no Discord author embed. Chat is never dropped, but identities are missing and the log floods: the same thing happened on 2026-11-16 01:02 to 02:02 (1,136 warnings from one failed refresh) and on 2026-11-17 04:28 to 05:28.

The periodic refresh also ran exactly at the 1800 s freshness limit, so lookups went stale for about a second each cycle (e.g. Skipped new-account checks ... Hosted verification unavailable at 12:58:15, one second before the refresh landed).

Change

  • Verifier: a failed hosted refresh schedules a single retry after 30, 60, 120, then 300 s; success resets the backoff and cancels any pending retry. Scheduling errors are caught so they never reject a finished refresh or reach the event loop.
  • Verifier: hosted read-only refresh period is 900 s (inside FRESH_SECONDS); non-hosted mode keeps 1800 s. The freshness window and authority rules are unchanged.
  • GameServer::__gameChatRelay: the warning is logged once per outage and re-armed after a successful lookup.

Tests

  • php tests/local/admin-verification-refresh.php vendor/autoload.php: PASS (32 assertions; new retry/backoff/reset checks fail without the fix).
  • php tests/local/chat-moderation.php vendor/autoload.php: PASS (new once-per-outage check fails without the fix).
  • All 37 run: php steps of local-profile.yml, plus tests/verifier-integration.php, tests/windows/hosted-verifier.php, tests/local/ooc-auto-relay.php, tests/local/lobby-webhook.php: PASS.

Not verified: a live boot against the hosted endpoint.


Generated by Claude Code

…tage

The desktop bot reads verification from the hosted list. When the first
fetch at boot failed, nothing retried for 30 minutes, so every relayed
chat line went out as plain text and logged "Chat relay identity lookup
unavailable". The periodic refresh also ran exactly at the 30-minute
freshness limit, leaving a brief stale window every cycle.

- Failed hosted refresh retries after 30, 60, 120, then 300 seconds;
  success resets the backoff and cancels the pending retry.
- Hosted read-only refresh runs every 15 minutes, inside the freshness window.
- The chat relay warning is logged once per outage, not per line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WTP2UbZ584w2CXPdx7Vin
Copilot AI balanced review requested due to automatic review settings November 17, 2026 17:41
@valzargaming valzargaming self-assigned this Nov 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@valzargaming
valzargaming merged commit 25c37ea into main Nov 17, 2026
49 checks passed
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

Copy link
Copy Markdown
Member Author

2026-11-17: Head 6668777 admin-merged as 25c37ea after local checks passed. The failed hosted fetch now retries after 30/60/120/300 s, hosted refresh runs every 15 minutes, and the relay warning logs once per outage. Ran admin-verification-refresh.php (32 assertions) and chat-moderation.php, both new checks fail without the fix, plus all 37 local-profile.yml steps, verifier-integration.php and windows/hosted-verifier.php: all PASS. CI was not waited on per the project merge rule; I'll check main. Unverified: a live boot against the hosted endpoint.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants