@devries-cameron20 / t3code-1 / commits / 5192f777fe
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(server): surface cloudflared FTL/PNC relay logs as warnings, not debug (#5076)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Arham Amin committed Aug 2, 2026 at 01:40 UTC 5192f777fe54c2a2a359f6c25ecf5fbde46d49b0
2 files changed +13 -1
apps/server/src/cloud/ManagedEndpointRuntime.test.ts
+9
@@ -96,6 +96,15 @@ describe("CloudManagedEndpointRuntime", () => {
96 "2026-06-17T02:00:00Z INF Starting metrics server",
97 ),
98 ).toBe("debug");
99 + // FTL (fatal) and PNC (panic) are more severe than ERR and must surface.
100 + expect(
101 + ManagedEndpointRuntime.classifyRelayClientOutput(
102 + "2026-06-17T02:00:00Z FTL Cannot determine default origin certificate path",
103 + ),
104 + ).toBe("warning");
105 + expect(
106 + ManagedEndpointRuntime.classifyRelayClientOutput("2026-06-17T02:00:00Z PNC runtime panic"),
107 + ).toBe("warning");
108 });
109
110 it.effect("starts, deduplicates, rotates, and stops the Cloudflare connector", () =>
apps/server/src/cloud/ManagedEndpointRuntime.ts
+4 -1
@@ -72,7 +72,10 @@ export function classifyRelayClientOutput(line: string): "connected" | "warning"
72 if (/\bRegistered tunnel connection\b/iu.test(line)) {
73 return "connected";
74 }
75 - return /\b(?:ERR|WRN)\b/u.test(line) ? "warning" : "debug";
75 + // cloudflared uses zerolog level tokens. FTL (fatal) and PNC (panic) are more
76 + // severe than ERR, so they must surface at least as loudly — without them a
77 + // fatal connector failure would be logged at debug and hidden.
78 + return /\b(?:ERR|WRN|FTL|PNC)\b/u.test(line) ? "warning" : "debug";
79 }
80
81 function runtimeConfigKey(config: RelayManagedEndpointRuntimeConfig): string {