Skip to content

[codex] sanitize VCS refresh diagnostics#3416

Merged
juliusmarminge merged 1 commit into
codex/enrich-server-vcs-errorsfrom
codex/vcs-status-safe-diagnostics
Jun 20, 2026
Merged

[codex] sanitize VCS refresh diagnostics#3416
juliusmarminge merged 1 commit into
codex/enrich-server-vcs-errorsfrom
codex/vcs-status-safe-diagnostics

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • replace Cause.toString() refresh logs with bounded structural reason, failure, defect, and operation diagnostics
  • omit raw workspace paths and nested error details while preserving the original typed errors and their exact causes
  • propagate poller interruptions instead of treating cancellation as a retryable refresh failure

Stack

Validation

  • vp test apps/server/src/vcs/VcsStatusBroadcaster.test.ts (12 tests)
  • vp check (passes with existing unrelated warnings)
  • vp run typecheck

Note

Low Risk
Changes are limited to failure logging shape and interrupt handling in the remote refresh loop; core status caching and refresh success paths are unchanged.

Overview
VCS remote refresh failures are logged with bounded structural diagnostics instead of raw Cause.toString() output, so logs no longer carry workspace paths or nested error text.

Warning payloads now include cwdLength plus counts and capped tag/operation lists from new remoteRefreshFailureDiagnostics, while in-memory GitManagerError objects and their cause chains stay unchanged. When a refresh exit is driven by interruption, the poller re-propagates that cause rather than counting it as a consecutive failure and backing off.

Tests assert the sanitized log shape on initial remote retry and cover the diagnostics helper against combined fail/die causes with private details.

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

Note

Sanitize VCS remote refresh failure diagnostics in VcsStatusBroadcaster

  • Adds remoteRefreshFailureDiagnostics to VcsStatusBroadcaster.ts, which summarizes a composite Cause into redacted counts and bounded tags/operations without exposing raw error details or cwd paths.
  • Replaces the previous log payload (raw cwd string and stringified cause) with a redacted summary: cwdLength, failure/defect/interruption counts, bounded tags, and operations.
  • Interruption reasons in the remote poller loop now short-circuit retries and propagate the cause instead of being treated as retryable failures.
  • Behavioral Change: warning logs for remote refresh failures no longer contain raw cause details or cwd strings; the poller now stops on interruption rather than retrying.

Macroscope summarized 00c1dce.

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: 10a22acb-94ec-48a3-8ddb-ac43afc77976

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/vcs-status-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 PR sanitizes VCS refresh diagnostic logging to avoid exposing sensitive information like full file paths and nested error details. The changes are security-conscious, well-tested, and don't affect core VCS behavior - only what metadata gets logged.

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

@juliusmarminge
juliusmarminge merged commit 3c998fc into codex/enrich-server-vcs-errors Jun 20, 2026
16 checks passed
@juliusmarminge
juliusmarminge deleted the codex/vcs-status-safe-diagnostics branch June 20, 2026 18:00
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