[codex] Preserve managed endpoint failure diagnostics#3366
[codex] Preserve managed endpoint failure diagnostics#3366juliusmarminge wants to merge 1 commit into
Conversation
Co-authored-by: codex <codex@users.noreply.github.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 Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved Changes are limited to error handling paths - replacing silent failures with warning logs that include diagnostic context. Success path behavior is unchanged, and the modifications are well-covered by new tests. You can customize Macroscope's approvability policy. Learn more. |
Summary
Verification
vp test apps/server/src/cloud/ManagedEndpointRuntime.test.ts(9 passed)vp check(passes with 20 pre-existing warnings)vp run typecheckOverlap audit
No active PR touches the three changed files (
gh pr list --state open --limit 1000).Note
Medium Risk
Touches cloud relay process lifecycle (probe, stop, restart, and config load); behavior is mostly logging and stable error text, but failed probes now trigger restarts.
Overview
Improves observability and recovery for the cloud managed relay (cloudflared) runtime without changing the outward reconciliation behavior.
Persisted endpoint config is decoded via
decodeUnknownEffectand failures are wrapped inCloudManagedEndpointRuntimeConfigDecodeError, keeping the secret resource id and underlying parser cause for logs instead of dropping decode errors silently.When reconciling an already-running connector,
isRunningprobe failures are logged with PID/tunnel context and treated as not running so the connector can restart; stop failures are logged as warnings rather than swallowed. User-visible spawn failures now use the stable message "Failed to start the relay client." instead of exposing internal cause strings.Tests cover failed process probes, malformed persisted config diagnostics, and the fixed spawn-failure reason.
Reviewed by Cursor Bugbot for commit cb4ff22. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Preserve managed endpoint failure diagnostics with structured errors and warning logs
CloudManagedEndpointRuntimeConfigDecodeErrorin ManagedEndpointRuntime.ts, a tagged error class emitted when persisted runtime config decoding fails, replacing silent null returns.'Failed to start the relay client.'instead ofString(cause), which varied by error type.decodeRuntimeConfigin config.ts fromSchema.decodeUnknownOptiontoSchema.decodeUnknownEffectso decode errors propagate as failures instead of being silently dropped.Macroscope summarized cb4ff22.