Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): checkpoints skip a project folder its parent repo ignores #14892

MergedJonasFocus(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/14892/headmerged by juliusmarminge View on GitHub

Projects 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. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      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_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 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.ts
      • apps/server/src/orchestration-v2/CheckpointService.ts
      • apps/server/src/vcs/GitVcsDriver.test.ts
      • apps/server/src/vcs/GitVcsDriver.ts

      Included 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

      Layer / File(s)Summary
      Capture ignored workspaces
      apps/server/src/vcs/GitVcsDriver.ts, apps/server/src/vcs/GitVcsDriver.test.ts
      Git capture checks whether the workspace is ignored and seeds a scratch index with cached additions. It fails with VcsUnsupportedOperationError if no tracked paths exist. For ignored workspaces, it stages tracked updates only. Tests check capture results, captured file contents, and shared index preservation.
      Map checkpoint capture outcomes
      apps/server/src/orchestration-v2/CheckpointService.ts, apps/server/src/orchestration-v2/CheckpointService.test.ts
      Baseline capture suppresses unsupported-operation errors. Turn capture returns a missing checkpoint for unsupported operations and an error checkpoint for other failures. Tests cover these outcomes and timeout errors.

      Priority: ⬇️ Low

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Bug fix · Severity of issue fixed: Low

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to 52b94

      Ignored 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 52b94

      The 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

      • observed — The changed capture path writes checkpoint objects and refs into the workspace's existing Git repository, which may be a parent repository. New staging is scoped to the workspace; the checkpoint tree still starts from repository HEAD, so the stored object scope is not necessarily limited to workspace files.

      Trust Boundaries and Controls

      • observed — Repository ignore rules and index state determine capture eligibility. Ignore-query failures other than Git's ordinary match/no-match outcomes remain operational errors. The staged-addition query disables external diff and text conversion, and index seeding targets the private checkpoint index.

      Resilience and Maintainability Implications

      • observed — Temporary index and lock cleanup remains attached to capture completion, including failure and interruption. Unsupported capture exits before ref publication, and non-ready checkpoint states remain unavailable to restore, preserving failure containment.
      Pre-merge checks: Passed 4
      Check nameStatusExplanation
      Title checkPassedThe title is concise, specific, and accurately describes the main checkpoint behavior change for ignored project folders.
      Description checkPassedThe 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 p…
      Linked Issues checkPassedFor directly linked issue #13712, GitVcsDriver checks whether the workspace is ignored. A wholly ignored workspace returns VcsUnsupportedOperationError without force-adding files. A workspace with…
      Out of Scope Changes checkPassedThe diff is limited to checkpoint capture behavior and its tests in GitVcsDriver and CheckpointService. 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, GitVcsDriver checks whether the workspace is ignored. A wholly ignored workspace returns VcsUnsupportedOperationError without force-adding files. A workspace with tracked paths uses scoped staging and preserves tracked working contents while excluding ignored new files. CheckpointService maps 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 GitVcsDriver and CheckpointService. 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)
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      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).
    4. juliusmarminge added labelsmacroscope-review

    5. Note

      Written by claude-opus-5-5 on behalf of Maria

      Hi! 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.

    6. maria-rcks closed this

    7. Note

      Written by claude-opus-5-5 on behalf of Maria

      Reopening, this was closed by mistake. Sorry for the noise!

    8. maria-rcks reopened this

    9. juliusmarminge assignedjuliusmarminge

    10. 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.

    11. juliusmarminge merged this6d266ea

    12. juliusmarminge closed this

Sign in to join this conversation.