Skip to content

[codex] Preserve cloud disconnect diagnostics#3437

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/cli-connect-safe-diagnostics
Jun 20, 2026
Merged

[codex] Preserve cloud disconnect diagnostics#3437
juliusmarminge merged 1 commit into
mainfrom
codex/cli-connect-safe-diagnostics

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • keep cloud disconnect warnings stable and free of internal cause text
  • preserve full Effect causes in structured warning logs with operation and authorization context
  • add behavioral coverage for diagnostic correlation and user-facing redaction

Validation

  • vp test apps/server/src/cli/connect.test.ts
  • vp check
  • vp run typecheck

Note

Low Risk
CLI-only messaging and logging changes during unlink/logout; no auth or relay protocol changes.

Overview
T3 Connect disconnect no longer prints internal failure text in Console.warn messages. Live-server unlink and relay revoke failures still show the same stable guidance, while full Effect causes are recorded via Effect.logWarning with operation, clearAuthorization, and Cause.pretty(cause).

disconnectCloud delegates user messaging to a new exported reportCloudDisconnectResults, and live unlink failures now carry Cause.Cause<unknown> instead of opaque unknown. A test asserts private diagnostic strings appear only in structured logs, not in console warnings.

Reviewed by Cursor Bugbot for commit 870f4d7. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Preserve cloud disconnect failure causes in structured logs instead of console warnings

  • Adds reportCloudDisconnectResults in connect.ts to separate user-facing console output from detailed failure diagnostics.
  • Failure causes are now recorded as structured log annotations (operation, clearAuthorization, pretty-printed cause) via a new logCloudDisconnectFailure helper, rather than interpolated directly into console warnings.
  • The disconnect function is updated to call reportCloudDisconnectResults instead of inlining console logging logic.
  • Behavioral Change: Console warnings no longer include raw cause strings; detailed causes are only visible in structured logs.

Macroscope summarized 870f4d7.

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 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

Run ID: 1d78f541-6c2a-4c1d-bed8-9f296fe94d61

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
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/cli-connect-safe-diagnostics

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

This is a self-contained refactor that moves error diagnostics from user-facing console warnings into structured logs. The actual disconnect logic is unchanged, and the new behavior is thoroughly tested.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge juliusmarminge merged commit b51aef1 into main Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/cli-connect-safe-diagnostics branch June 20, 2026 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant