[codex] sanitize VCS refresh diagnostics#3416
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 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. |
3c998fc
into
codex/enrich-server-vcs-errors
Summary
Cause.toString()refresh logs with bounded structural reason, failure, defect, and operation diagnosticsStack
cwd/causefields exercised by these diagnostics testsValidation
vp test apps/server/src/vcs/VcsStatusBroadcaster.test.ts(12 tests)vp check(passes with existing unrelated warnings)vp run typecheckNote
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
cwdLengthplus counts and capped tag/operation lists from newremoteRefreshFailureDiagnostics, while in-memoryGitManagerErrorobjects and theircausechains 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
VcsStatusBroadcasterremoteRefreshFailureDiagnosticsto VcsStatusBroadcaster.ts, which summarizes a compositeCauseinto redacted counts and bounded tags/operations without exposing raw error details or cwd paths.cwdLength, failure/defect/interruption counts, bounded tags, and operations.Macroscope summarized 00c1dce.