Conversation
added 2 commits
February 14, 2026 12:11
…e-check before restart, watchdog jitter (#62) - Fix 1: Parse cloudflared stderr for fatal errors (unauthorized, tunnel not found, invalid credentials, etc.) and halt watchdog immediately instead of wasting restart cycles on unrecoverable failures - Fix 2: Gate endpoints.json update on verifyReachable() — tunnel URL is only published after confirming the tunnel is actually reachable - Fix 4a: Re-check ha_connections immediately before doRestart() to avoid killing a tunnel that recovered during the threshold window - Fix 4b: Replace setInterval with self-scheduling setTimeout + random jitter (0-5s) to prevent thundering herd when multiple instances run
…opulated If verifyReachable() fails initially (slow tunnel startup), retry up to 5 times at 10s intervals. If all retries fail, write the endpoint anyway to satisfy the requirement that endpoints.json MUST contain a tunnel URL.
🔔 Push Browser E2E Test RecordingRun #22023558352 | Commit 2604f56 |
⚙️ Settings E2E Test RecordingRun #22023558352 | Commit 2604f56 |
🎥 Browser E2E Test RecordingRun #22023558352 | Commit 2604f56 |
🎥 Browser E2E Test RecordingRun #22023582069 | Commit edab165 |
⚙️ Settings E2E Test RecordingRun #22023582069 | Commit edab165 |
🔔 Push Browser E2E Test RecordingRun #22023582069 | Commit edab165 |
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.






Summary
setInterval(30s)withsetTimeout(30s + random 0-5s jitter)to prevent thundering herd with launchd ThrottleIntervalcheckConnected()call right before killing the tunnel process — if it reconnected during the failure window, skip the restartendpoints.jsonafterverifyReachable()confirms the URL is actually accessible, preventing stale/broken URLs from being publishedopencode-manager healthoutputTesting Done
pnpm buildpnpm test(including 17 tunnel-service tests)Issue
Closes #62