[codex] Preserve checkpoint repository detection failures#3360
Conversation
|
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 Small bug fix that changes No code changes detected at You can customize Macroscope's approvability policy. Learn more. |
9329ff9 to
59afb11
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
59afb11 to
87fb433
Compare
Summary
falseonly when no Git repository is detectedVerification
vp test apps/server/src/checkpointing/CheckpointStore.test.tsvp check(passes with 20 pre-existing warnings)vp run typecheckNote
Low Risk
Small behavioral fix in checkpoint Git detection with focused tests; no auth or data-path changes.
Overview
CheckpointStore.isGitRepositoryno longer treats Git detection failures as “not a repo.” It now callsvcsRegistry.detectwithrequestedKind: 'git'and returnsfalseonly when detection yields no repository (null), instead of usingresolvewithorElseSucceed(() => false), which collapsed errors intofalse.Tests assert
falsein a plain temp directory andtrueafterinitRepoWithCommit, 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
isGitRepositoryto preserve detection failures inCheckpointStoreReimplements
isGitRepositoryin CheckpointStore.ts to usevcsRegistry.detectwithrequestedKind: 'git', mapping the result to a boolean based on whether a non-null repository is returned. The previous approach usedorElseSucceedto 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.