Skip to content

fix(workspace): bound linked worktree discovery - #2384

Merged
jonathanKingston merged 3 commits into
mainfrom
codex/fix-linked-worktree-startup
Sep 9, 2026
Merged

jonathanKingston merged 3 commits into
mainfrom
codex/fix-linked-worktree-startup

Conversation

@jonathanKingston

@jonathanKingston jonathanKingston commented Sep 5, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Opening a persisted project inside a linked worktree can leave Copse at No folder / Loading forever when the worktree Git metadata lives on a slow or blocked external volume. Workspace activation awaits best-effort sandbox metadata discovery, and a filesystem read that never settles therefore blocks workspace:set.

Fix

  • Bound automatic linked-worktree metadata discovery to two seconds.
  • Abort in-flight Git metadata reads when that deadline expires.
  • Keep the fallback fail-closed: the ordinary project remains allowlisted, but no linked-worktree sandbox authority is granted unless all metadata validates.
  • Keep explicit worktree-manager registration strict and unbounded; only the optional open-project discovery path degrades.
  • Add a regression test for a registration operation that never settles.

Validation

  • pnpm test -- src/main/services/workspace.test.ts (28/28)
  • pnpm run typecheck
  • pnpm run build
  • pnpm test:e2e --spec tests/e2e/acp-mcp-tool-name.e2e.ts (passes twice against the external-Git-dir reproduction; previously timed out at 30 seconds)
  • GitHub CI check (8,544/8,544 tests)
  • All eight GitHub E2E shards
  • A separate local full-suite run exposed an unrelated five-second test-runner timing guard; test(exec): allow loaded runners to observe background exit #2386 isolates and fixes that flake and is independently green.

@copse-release-bot

copse-release-bot Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Reference screenshots

CI run 34299698325 published no changed screenshot candidates for 86a5a53a4e2a.
Any review PR for an older source SHA has been closed.

@jonathanKingston
jonathanKingston force-pushed the codex/fix-linked-worktree-startup branch from 8aeeb40 to 1abfa91 Compare September 5, 2026 20:12
github-actions Bot added a commit that referenced this pull request Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🖥️ PR preview

@jonathanKingston

Copy link
Copy Markdown
Collaborator Author

Validation follow-up (2026-09-05): the external-Git-directory startup reproduction is fixed without widening sandbox authority. Timeout/abort remains limited to optional auto-discovery, incomplete discovery grants no linked-worktree metadata, and explicit worktree-manager registration stays strict. Local workspace tests passed 28/28, build passed, and the real Electron regression spec opened successfully in 8.4s. GitHub check and all eight E2E shards are now green. The unrelated local runner timing flake is isolated in #2386. No further changes needed.

@jonathanKingston
jonathanKingston force-pushed the codex/fix-linked-worktree-startup branch from 1abfa91 to 520c593 Compare September 6, 2026 09:19
github-actions Bot added a commit that referenced this pull request Sep 6, 2026
github-actions Bot added a commit that referenced this pull request Sep 9, 2026
@jonathanKingston
jonathanKingston merged commit 1fcb59d into main Sep 9, 2026
24 checks passed
@jonathanKingston
jonathanKingston deleted the codex/fix-linked-worktree-startup branch September 9, 2026 01:51
github-actions Bot added a commit that referenced this pull request Sep 9, 2026
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