fix(server): checkpoints skip a project folder its parent repo ignores #14892
main fromrefs/pull/14892/head·merged by juliusmarminge View on GitHubProjects nested inside a Git repository that ignores their directory currently fail baseline and turn checkpoint capture on every turn. This fixes #13712.
Capture uses the existing Git ignore classifier to distinguish an ignored directory from a staging failure. A wholly ignored project reports checkpointing as unsupported; baseline capture succeeds quietly and turn checkpoints become missing. If the directory contains tracked files, including newly staged files that have never been committed, capture records their current working contents without adding ignored new files. Scoped staged additions are seeded into the private checkpoint index, so unrelated staged changes stay out. Genuine Git failures keep their existing error handling. Nothing is force-added, and capture leaves the user's index untouched.
Maintainer takeover of #14892, preserving @JonasFocus's commits and merging main before rebuilding the tests and implementation. Thanks also to @ignaciorasetti for the earlier #13811 approach credited by the original author.
Verification:
- Three contributed behavior cases across two existing test files were rebuilt as five cases across the same files. The tracked-project fixture is shared across committed-only, staged-only, and mixed cases. All preexisting tests remain. The core Git driver and checkpoint service suites pass 68/68; the expanded focused run with VCS process and checkpoint store suites passes 120/120. The initial rebuild reproduced three failures against unchanged main; the staged-file review regression reproduced two failures before its fix.
- Tests cover ignored versus allowed siblings, committed and staged tracked edits after a directory becomes ignored, exclusion of ignored new files, absent unsupported refs, unchanged index bytes, and unsupported baseline/turn handling. Genuine clean-filter and timeout failures remain errors.
- Targeted lint, formatting, diff checks, and the server typecheck pass. No new diagnostic or ESLint suppressions were added.
- A headless integration probe ran the real checkpoint service, checkpoint store, VCS registry, and Git driver against disposable real repositories. The same probe loaded unchanged main for the before run and the rebuilt implementation for the after run:
Project Before baseline / turn After baseline / turn
Ignored, no tracked files Failure / error Success, missing / missing
Allowed sibling Success, ready / ready Success, ready / ready
Tracked, then ignored Failure / error Success, ready / ready
Staged-only, then ignored Failure / error Success, ready / ready
Mixed tracked and staged Failure / error Success, ready / ready
The after run captured the expected edited file contents for all supported projects, excluded ignored secrets and unrelated staged changes, and preserved the original index bytes in all five cases. The ignored project emitted no capture warning. Additional actual-driver probes cover unusual filenames, intent-to-add, staged deletions, split and sparse indexes, manual index flags, unborn repositories, and failure propagation. This is a server behavior change, so proof is checkpoint status and Git tree output rather than screenshots. The probe used isolated fixture data and scoped subprocesses; no live userdata or provider agents were used.
Verification ran on headless Linux. Browser rendering, macOS, Windows, iOS, Android, Electron desktop, and relay/tunnel connections were not exercised.
Independent Opus and Sol whole-diff review ran for two rounds. Round one found that the private index could omit staged, uncommitted files in ignored directories. The shared regression fixture and scoped staged-addition import fix that issue; both reviewers found no blockers on the final revision.
Tests: Codex gpt-6-astra (high). Implementation: Codex gpt-6.1-sol (high). Reviews: Claude claude-opus-5-5 and Codex gpt-6-sol. Harnesses: Codex and Claude Code through T3 Code.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Needs Human Approval
Macroscope's review found this PR requires human approval — This fixes ignored-project checkpoint handling with focused tests, but it also introduces intricate private Git-index manipulation and changes checkpoint status behavior across production VCS and orchestration layers. The runtime scope and implementation complexity merit human review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).juliusmarminge added labelsmacroscope-review
Note
Written by
claude-opus-5-5on behalf of MariaHi! We are cleaning up open PRs, and this one does not say which model or harness was used to create it. If this change is really important, we recommend rebuilding the PR with a newer model and noting the model and harness in the PR description.
maria-rcks closed this
Note
Written by
claude-opus-5-5on behalf of MariaReopening, this was closed by mistake. Sorry for the noise!
maria-rcks reopened this
juliusmarminge assignedjuliusmarminge
Taking over this one as maintainer for batch server-misc-03. I will preserve your commits, merge current main, and rebuild the real-Git regressions and service implementation before independent reviews. Thanks @JonasFocus for separating ignored workspaces from checkpoint failures and preserving edits to tracked files.
juliusmarminge merged this6d266ea
juliusmarminge closed this
Sign in to join this conversation.
Important
Review skipped#
We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting
@coderabbitai full review.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
b107f6ca-8433-464d-9129-ab4c975e10de📥 Commits
Reviewing files that changed from the base of the PR and between 034b50616165fc25195e25bfddb188639bfefa34 and 52b94dd366bff0047cd6b94bc8028618c0556794.
📒 Files selected for processing: 4
apps/server/src/orchestration-v2/CheckpointService.test.tsapps/server/src/orchestration-v2/CheckpointService.tsapps/server/src/vcs/GitVcsDriver.test.tsapps/server/src/vcs/GitVcsDriver.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
📝 Walkthrough
Git checkpoint capture now handles workspaces ignored by a parent repository. The orchestration service distinguishes unsupported capture operations from other failures and returns the corresponding checkpoint status.
Changes: Checkpoint Capture
apps/server/src/vcs/GitVcsDriver.ts,apps/server/src/vcs/GitVcsDriver.test.tsVcsUnsupportedOperationErrorif no tracked paths exist. For ignored workspaces, it stages tracked updates only. Tests check capture results, captured file contents, and shared index preservation.apps/server/src/orchestration-v2/CheckpointService.ts,apps/server/src/orchestration-v2/CheckpointService.test.tsPriority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
52b94Ignored workspaces without tracked files are reported as missing checkpoints, while tracked edits can still be captured. No actionable merge-blocking risk remains after normal checks.
Security architecture risk: ⚪ Minimal · up to
52b94The change preserves protections for ignored, untracked files and keeps missing checkpoints non-restorable. No material security regression was identified in the reviewed capture and recovery paths.
Retained concerns No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Pre-merge checks:
4
#13712,GitVcsDriverchecks whether the workspace is ignored. A wholly ignored workspace returnsVcsUnsupportedOperationErrorwithout force-adding files. A workspace with…GitVcsDriverandCheckpointService. The test changes validate the linked issue behavior and preserve existing error handling. No…Full details: Description check
Explanation
The description explains the problem, implementation, scope, linked issue, extensive verification, test results, limitations, and agent details. It does not use the template headings exactly, but it provides the required information in a complete and relevant form.
Full details: Linked Issues check
Explanation
For directly linked issue
#13712,GitVcsDriverchecks whether the workspace is ignored. A wholly ignored workspace returnsVcsUnsupportedOperationErrorwithout force-adding files. A workspace with tracked paths uses scoped staging and preserves tracked working contents while excluding ignored new files.CheckpointServicemaps unsupported baseline and turn captures to missing status and keeps genuine failures as errors. Tests cover ignored, committed-only, staged-only, mixed, sibling, index-preservation, and failure cases.Full details: Out of Scope Changes check
Explanation
The diff is limited to checkpoint capture behavior and its tests in
GitVcsDriverandCheckpointService. The test changes validate the linked issue behavior and preserve existing error handling. No unrelated product behavior or unrelated files are demonstrated.✨ Finishing Touches
🧪 Generate unit tests (beta)
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.