Skip to content

[codex] Preserve checkpoint repository detection failures#3360

Merged
juliusmarminge merged 1 commit into
mainfrom
codex/preserve-checkpoint-detection-failures
Jun 20, 2026
Merged

[codex] Preserve checkpoint repository detection failures#3360
juliusmarminge merged 1 commit into
mainfrom
codex/preserve-checkpoint-detection-failures

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Jun 20, 2026

Copy link
Copy Markdown
Member

Summary

  • use nullable VCS detection for the checkpoint repository predicate
  • return false only when no Git repository is detected
  • preserve typed VCS/process/filesystem failures in the service error channel
  • cover Git and non-Git repository detection with the live implementation

Verification

  • vp test apps/server/src/checkpointing/CheckpointStore.test.ts
  • vp check (passes with 20 pre-existing warnings)
  • vp run typecheck

Note

Low Risk
Small behavioral fix in checkpoint Git detection with focused tests; no auth or data-path changes.

Overview
CheckpointStore.isGitRepository no longer treats Git detection failures as “not a repo.” It now calls vcsRegistry.detect with requestedKind: 'git' and returns false only when detection yields no repository (null), instead of using resolve with orElseSucceed(() => false), which collapsed errors into false.

Tests assert false in a plain temp directory and true after initRepoWithCommit, against the live stack.

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

Note

Fix isGitRepository to preserve detection failures in CheckpointStore

Reimplements isGitRepository in CheckpointStore.ts to use vcsRegistry.detect with requestedKind: 'git', mapping the result to a boolean based on whether a non-null repository is returned. The previous approach used orElseSucceed to swallow errors, meaning resolution failures were indistinguishable from "no repo found". Adds tests covering both the no-repo and valid-repo cases.

Macroscope summarized 87fb433.

@juliusmarminge juliusmarminge added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Jun 20, 2026
@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: 74a7e3ce-b645-48d3-91c6-71a3e7e37aaa

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/preserve-checkpoint-detection-failures

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

@github-actions github-actions Bot added the size:XS 0-9 changed lines (additions + deletions). label Jun 20, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Small bug fix that changes isGitRepository to preserve actual detection errors instead of swallowing all failures. The change is well-scoped with tests added covering both success and failure cases.

No code changes detected at 87fb433. Prior analysis still applies.

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

@juliusmarminge juliusmarminge force-pushed the codex/preserve-checkpoint-detection-failures branch 3 times, most recently from 9329ff9 to 59afb11 Compare June 20, 2026 22:41
Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge force-pushed the codex/preserve-checkpoint-detection-failures branch from 59afb11 to 87fb433 Compare June 20, 2026 22:50
@juliusmarminge juliusmarminge merged commit 60c9ca0 into main Jun 20, 2026
16 checks passed
@juliusmarminge juliusmarminge deleted the codex/preserve-checkpoint-detection-failures branch June 20, 2026 22:55
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: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