| author | |
| committer | |
| log | 5192f777fe54c2a2a359f6c25ecf5fbde46d49b0 |
| tree | c2e9c4e078a6b4da5511cfeeac604533f96f7368 |
| parent | 283c7ac4baafd96711872d4fe49e3851a8ecaa65 |
| signature | Signed by PGP key B5690EEEBB952194 |
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>2 files changed, 13 insertions(+), 1 deletions(-)
apps/server/src/cloud/ManagedEndpointRuntime.test.ts+9| ... | ... | @@ -96,6 +96,15 @@ describe("CloudManagedEndpointRuntime", () => { |
| 96 | 96 | "2026-06-17T02:00:00Z INF Starting metrics server", |
| 97 | 97 | ), |
| 98 | 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"); | |
| 99 | 108 | }); |
| 100 | 109 | |
| 101 | 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 | 72 | if (/\bRegistered tunnel connection\b/iu.test(line)) { |
| 73 | 73 | return "connected"; |
| 74 | 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"; | |
| 76 | 79 | } |
| 77 | 80 | |
| 78 | 81 | function runtimeConfigKey(config: RelayManagedEndpointRuntimeConfig): string { |