Skip to content

fix: sparsely check out managed Context Tree subtrees - #25

Open
yuezengwu wants to merge 1 commit into
mainfrom
fix/sparse-managed-worktrees
Open

yuezengwu wants to merge 1 commit into
mainfrom
fix/sparse-managed-worktrees

Conversation

@yuezengwu

Copy link
Copy Markdown

Selecting a Git subtree still materializes the entire repository in both read snapshots and isolated writes, which can exceed host workspace archive limits. Check out only the selected subtree with cone-mode sparse checkout and a full index; key snapshots by repository, subtree and commit so separate selections remain isolated.

New managed worktrees use the existing repository lock and require Git >= 2.36 before creation. Repository-root and directory sources keep full checkouts. Existing caches, snapshots and session records are retained; incomplete setup fails without registering a session. Public schemas and authorization behavior are unchanged.

Validation:

  • pnpm check, pnpm typecheck, pnpm test (12 suites / 116 tests), pnpm check:package, and git diff --check pass.
  • Real Git regressions cover same-commit paths/refs, nested and special-character paths, offline creation from a legacy cache, full root/directory sources, preexisting pending and committed sessions, publication preserving outside blobs, outside edits, abort and interrupted setup.
  • Isolated comparison with one bare cache, one snapshot and one unpublished write: full checkout exceeds the unchanged 128 MiB compressed limit; sparse checkout archives successfully at 74,448,905 bytes (71.0 MiB). This is local capacity evidence; Cloud runtime acceptance remains pending the staged package and host dependency update.

@yuezengwu
yuezengwu requested a review from ggordonhall October 30, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant