Skip to content

Drop the base checkout of commit boards - #1431

Merged
thesiti92 merged 3 commits into
mainfrom
chore/drop-base-checkout
Oct 27, 2026
Merged

thesiti92 merged 3 commits into
mainfrom
chore/drop-base-checkout

Conversation

@thesiti92

Copy link
Copy Markdown
Contributor

Why

Every commit or PR board created two detached worktrees of the repository under .git/dev-fast/reviews/<uuid>/: the head and the base. For a large monorepo each one is a full tree on disk. Since #1175 the base side of a diff has no language features, so the base checkout served only Source windows opened from the base side of a diff.

What

  • ReviewWorkspaces prepares one environment per board, the head. open() is gone; source(reviewId, pins) has no side. Rows and worktrees with the legacy role: "base" are collected on the next start, so existing users reclaim the disk without doing anything. The head/<sha> path segment stays so existing head checkouts survive the upgrade.
  • A base-side "open in Source window" opens the head checkout and the file's head counterpart; a file that no longer exists at head answers 404 as before. The base content stays in the Diff and in code peeks, read from git objects.
  • environmentIssues (review_open, review_environment) is {message}[]. The language-context and navigator routes drop the side query; the fork no longer sends it.
  • ensureReviewPinnedCheckout and reviewManagedCheckoutDir lose their role parameter.

Tests

  • New: a legacy base row plus worktree is removed on startup while the head checkout and row stay.
  • Updated the workspaces, local-data, review-api, headless-host, gateway and head-checkout suites for head-only environments.
  • pnpm lint, pnpm format:check, review package typecheck and the fork typecheck pass. src/cli-install.test.ts "runs a matched CLI and runtime with healthy discovery" fails identically on an unchanged origin/main worktree on this machine.

Follow-ups, not in this PR: create the head checkout on demand instead of on open, and point diffr at the git dir (verified: identical tree-mode output from a checkout, its .git dir and a bare clone).

Since #1175 the base side of a diff has no language features, so the base
checkout under .git/dev-fast/reviews/<uuid>/base had no reader left but
Source windows opened from the base side. Workspaces now prepare one
environment per board, the head; the checkout helpers lose their role.

Agent-Session: f949acce-5c96-46f0-92af-57fc57a137fd
Agent-Session: 8625c3c9-675e-4237-9d72-b6ea7df04976
Agent-Session: 778ba399-e5fb-4c16-a31b-3c8632db2fcd
Agent-Session: fea01a6a-bba5-4058-b6c6-dbaccc15cd9c
Agent-Session: 5625cb14-3381-4fef-8d68-2cdc27ef7155
Agent-Session: 283ceb25-3b3b-471c-b900-b0a825d8588b
Agent-Session: 4e9794ef-5a99-4635-ae45-1af0c43d14da
Rows written with role "base" and their worktrees are removed on the next
start; the head row and checkout of the same board stay.

Agent-Session: f949acce-5c96-46f0-92af-57fc57a137fd
Agent-Session: 8625c3c9-675e-4237-9d72-b6ea7df04976
Agent-Session: 778ba399-e5fb-4c16-a31b-3c8632db2fcd
Agent-Session: fea01a6a-bba5-4058-b6c6-dbaccc15cd9c
Agent-Session: 5625cb14-3381-4fef-8d68-2cdc27ef7155
Agent-Session: 283ceb25-3b3b-471c-b900-b0a825d8588b
Agent-Session: 4e9794ef-5a99-4635-ae45-1af0c43d14da
@thesiti92
thesiti92 force-pushed the chore/drop-base-checkout branch from 290dfe9 to 42075dc Compare October 27, 2026 18:21
@thesiti92
thesiti92 enabled auto-merge (squash) October 27, 2026 18:30
environmentIssues is {message}[]. The language-context and navigator routes
take no side; a base-side Source window opens the head checkout and the
file's head counterpart. The fork stops sending the side.

Agent-Session: f949acce-5c96-46f0-92af-57fc57a137fd
Agent-Session: 8625c3c9-675e-4237-9d72-b6ea7df04976
Agent-Session: 778ba399-e5fb-4c16-a31b-3c8632db2fcd
Agent-Session: fea01a6a-bba5-4058-b6c6-dbaccc15cd9c
Agent-Session: 5625cb14-3381-4fef-8d68-2cdc27ef7155
Agent-Session: 283ceb25-3b3b-471c-b900-b0a825d8588b
Agent-Session: 4e9794ef-5a99-4635-ae45-1af0c43d14da
Agent-Session: bbe68e6e-ff83-4042-93bf-6f0b489709f8
Agent-Session: bba1f35a-83e9-4d5d-be0e-76742d0c87f8
@thesiti92
thesiti92 force-pushed the chore/drop-base-checkout branch from 42075dc to bffa162 Compare October 27, 2026 18:43
@thesiti92
thesiti92 merged commit cbb91d0 into main Oct 27, 2026
3 checks passed
@thesiti92
thesiti92 deleted the chore/drop-base-checkout branch October 27, 2026 18:55
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.

2 participants