镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(server): T3 Connect no longer waits a cooldown for a tunnel it already replaced - #29542

Draft
chrischriscris wants to merge 1 commit into
pingdotgg:mainfrom
chrischriscris:fix/connect-stale-tunnel-recovery
Draft

chrischriscris wants to merge 1 commit into
pingdotgg:mainfrom
chrischriscris:fix/connect-stale-tunnel-recovery

Conversation

@chrischriscris

Copy link
Copy Markdown
Contributor

Note

Written by Claude Opus 5.5 on behalf of Christopher

Problem

After a recovery that had to wait out its cooldown, T3 Connect can stay down for another full cooldown, up to 30 min. Logs and timeline in #29541.

While a recovery waits, the runtime keeps requesting recovery for the same tunnel, so the sliding queue still holds a request for the tunnel that recovery just replaced. The runner doubles the cooldown for it, sleeps it out, recoverManagedTunnel returns false because the config is stale, and the no-op still gets recorded as a recovery. The request for the new tunnel then waits again.

Change

makeManagedTunnelRecovery remembers the config the last successful recovery replaced and skips requests for it before the cooldown, without touching the cooldown or the last-recovery time. recover now has to return a boolean, which recoverManagedTunnel already does.

I kept the check in the runner instead of reading the stored config there: the runner has no access to it, and the stale request is always for the tunnel that was just replaced. A request that goes stale some other way (a relink during the wait) still hits the existing check in recoverManagedTunnel, unchanged.

Scope and approval

Fixes #29541, which isn't triaged yet. I think this fits the small focused fix exception: one module, and the backoff from #22108 is unchanged for real requests. Requests for an already-replaced tunnel just stop consuming it. Happy to wait for triage if you'd rather.

Verification

  • New case in managedTunnelStartup.test.ts: recover tunnel A, then request A again. On main the second request sleeps the doubled cooldown and calls recover again (fails: expected false, got true). With the fix it returns false straight away and recover runs once.
  • vp run check:changed passes (format, lint, knip, typecheck, tests beside the change).
  • Not checked against a live relay, since I can't make Cloudflare reap a tunnel on demand. The failure itself is from my desktop's logs in the issue.

Claude Opus 5.5 in Claude Code (running in T3 Code)

…dy replaced

The runtime keeps requesting recovery while one waits out its cooldown, so
the queue still holds a request for the tunnel that recovery replaced. That
request doubled the cooldown, slept it out, did nothing, and still counted
as a recovery, delaying the real one by up to 30 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 2, 2026

This branch has not been deployed

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

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: T3 Connect waits a full recovery cooldown on a request for a tunnel it already replaced

1 participant