Repository navigation
Conversation
…minutes activateManagedTunnelWithRetry retried retryable connector failures (not-installed, spawn-failed) with an unbounded exponential schedule. server.ts drains recovery requests sequentially, so one persistently failing connector occupied the consumer forever and starved every later recovery request. Bound the inner schedule with Schedule.upTo using the existing 10-minute MANAGED_TUNNEL_REGISTRATION_RETRY_WINDOW, so a poisoned request fails after the window and the queue keeps draining. Also narrows activateManagedTunnel/activateManagedTunnelWithRetry to the secrets + endpointRuntime dependencies they actually use, and exports the window constant and the retry helper (the helper is exported for tests). Authored with AI assistance (Muse, Meta's Muse Spark) under the contributor's direction, as documented in the PR description.
This was referenced Oct 16, 2026
This branch has not been deployed
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.
Problem
activateManagedTunnelWithRetryretried retryable connector failures (not-installed,spawn-failed) with an unbounded exponential schedule.server.tsdrains recovery requests sequentially (Stream.runForEach), so one persistently failing connector occupied the consumer forever and starved every later recovery request.Fix
Bound the inner retry schedule with
Schedule.upTousing the existing 10-minuteMANAGED_TUNNEL_REGISTRATION_RETRY_WINDOW(same calibration as the boot-time registration retries inmanagedTunnelStartup.ts). After the window, the recovery item fails with the last activation error;server.tslogs it and keeps draining the queue.Also narrows
activateManagedTunnel/activateManagedTunnelWithRetryto thesecrets+endpointRuntimedependencies they actually use, and exports the window constant and the retry helper (the helper is exported for tests).Testing
apps/server/src/cloud/http.test.ts: a permanently spawn-failing connector forked under TestClock; after advancing 11 virtual minutes the fiber has failed withEnvironmentCloudEndpointUnavailableErrorinstead of still running.apps/server/src/cloud/http.test.ts: 46/46 green.vp fmt --checkclean on touched files;tsc --noEmitclean for the touched cloud files.Authored with AI assistance (Muse, Meta's Muse Spark) under the contributor's direction.
Built with Muse Spark / hatch sandbox harness.