fix(server): surface cloudflared FTL/PNC relay logs as warnings, not debug - #5076
Conversation
…debug `classifyRelayClientOutput` routes relay-connector (cloudflared) output to "connected" / "warning" / "debug" log severities, treating only `ERR` and `WRN` zerolog level tokens as warnings. cloudflared also emits `FTL` (fatal) and `PNC` (panic) — both strictly more severe than `ERR` — and those fell through to "debug", so a fatal connector failure (e.g. a bad origin certificate path or a runtime panic that takes T3 Connect down) was logged at the quietest level and effectively hidden while diagnosing an outage. Add `FTL` and `PNC` to the warning set so the most severe relay failures surface at least as loudly as ordinary errors. Extended the existing classifier test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Approved f1add90 Simple bug fix that adds FTL (fatal) and PNC (panic) log tokens to the cloudflared output classifier regex, ensuring severe logs surface as warnings instead of being hidden at debug level. The change is minimal, well-tested, and only affects log visibility. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(web): stop settle controls overlapping the status label by @ipanasenko in pingdotgg/t3code#4574 * fix: normalize app icon glyph sizing by @t3-code[bot] in pingdotgg/t3code#5202 * fix(server): surface cloudflared FTL/PNC relay logs as warnings, not debug by @arhxam in pingdotgg/t3code#5076 ## New Contributors * @t3-code[bot] made their first contribution in pingdotgg/t3code#5202 **Full Changelog**: pingdotgg/t3code@v0.0.32-nightly.20260801.974...v0.0.32-nightly.20260801.976 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.32-nightly.20260801.976
…debug (pingdotgg#5076) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What Changed
classifyRelayClientOutput(apps/server/src/cloud/ManagedEndpointRuntime.ts) now treats the cloudflaredFTLandPNCzerolog level tokens as warnings, alongside the existingERR/WRN. Extended the existing classifier test.Why
The function classifies relay-connector (cloudflared) output into
connected/warning/debugseverities. It only matchedERRandWRN, soFTL(fatal) andPNC(panic) — both strictly more severe thanERR— fell through todebug, the quietest level. A fatal connector failure (e.g.FTL Cannot determine default origin certificate path, or a runtime panic that takes T3 Connect down) was therefore logged at debug and effectively hidden exactly when someone is diagnosing why the relay went offline.Adding
FTL/PNCto the warning set makes the most severe relay failures surface at least as loudly as ordinary errors. The added assertions fail before this change and pass after.Checklist
Note
Low Risk
Narrow logging-severity tweak in relay output classification with matching unit tests; no auth, data, or runtime behavior changes beyond log visibility.
Overview
Relay log classification for cloudflared output now treats zerolog
FTL(fatal) andPNC(panic) likeERR/WRN, so those lines are logged vialogWarninginstead oflogDebug.Before this change, the most severe connector failures (certificate path fatals, runtime panics) were effectively hidden at debug level when diagnosing relay outages. Tests assert FTL and PNC map to
warning.Reviewed by Cursor Bugbot for commit f1add90. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Surface cloudflared FTL and PNC relay logs as warnings instead of debug
Expands the regex in
classifyRelayClientOutputin ManagedEndpointRuntime.ts from/\b(?:ERR|WRN)\b/uto/\b(?:ERR|WRN|FTL|PNC)\b/u, so zerolog fatal and panic level tokens are treated as warnings rather than debug output.Macroscope summarized f1add90.