Skip to content

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

Merged
maria-rcks merged 1 commit into
pingdotgg:mainfrom
arhxam:fix/relay-client-fatal-log-severity
Aug 1, 2026
Merged

fix(server): surface cloudflared FTL/PNC relay logs as warnings, not debug#5076
maria-rcks merged 1 commit into
pingdotgg:mainfrom
arhxam:fix/relay-client-fatal-log-severity

Conversation

@arhxam

@arhxam arhxam commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

What Changed

classifyRelayClientOutput (apps/server/src/cloud/ManagedEndpointRuntime.ts) now treats the cloudflared FTL and PNC zerolog level tokens as warnings, alongside the existing ERR/WRN. Extended the existing classifier test.

Why

The function classifies relay-connector (cloudflared) output into connected / warning / debug severities. It only matched ERR and WRN, so FTL (fatal) and PNC (panic) — both strictly more severe than ERR — fell through to debug, 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/PNC to 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

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

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) and PNC (panic) like ERR/WRN, so those lines are logged via logWarning instead of logDebug.

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 classifyRelayClientOutput in ManagedEndpointRuntime.ts from /\b(?:ERR|WRN)\b/u to /\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.

…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>
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9568c31d-a857-4aea-9016-899ebc690b0d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Jul 31, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@maria-rcks
maria-rcks merged commit 5192f77 into pingdotgg:main Aug 1, 2026
17 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 1, 2026
## 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
aorwall pushed a commit to aorwall/t3code that referenced this pull request Aug 2, 2026
…debug (pingdotgg#5076)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants