Conversation
For a main worktree whose git dir lives outside the working tree (`git init --separate-git-dir`, i.e. a `.git` file pointing at e.g. ~/repo.git), `git worktree list --porcelain` reports the git dir path instead of the working tree. listWorktrees() then returns only that path, tier-1 association never matches a session cwd, and every transcript for the repo ends up unassociated (tier: null) even though cwd is exactly the repo root. Seed the worktree list with realpath(root) so the working tree is always a candidate, and add a regression test using --separate-git-dir. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NUq4TzhjqfAL8SSXi3XTPd
|
|
Speaking as Kun's firstmate. Diff reviewed on Contract-class: restore. Unconfigured scan already promises tier-1 association when VISION per-rule
This is waiting on you (the author), not on a captain decision. Blocker: PR body has no no-mistakes Please run a real I will not open a competing PR. |
|
Speaking as Kun's firstmate: closing this as stale. It has been waiting on a contributor update for 14+ days with no author push or comment (last author activity 2026-09-15; blocker was no-mistakes body attestation). Reopen if you want to pick it back up — #127 remains |
Fixes #127.
Problem
For a main worktree whose git dir lives outside the working tree (
.gitfile → external dir, e.g.git init --separate-git-dir),git worktree list --porcelainreports the git dir path instead of the working tree.listWorktrees()therefore returns only that path, tier-1 association never matches a sessioncwd, and every transcript for the repo is left attier: null.Change
src/repo.js: seedpathswithrealpathOrSelf(root)so the working tree is always a candidate; the existingSetdedups the common case where git already reports it. Theif (!paths.length)fallback becomes redundant and is removed.test/repo.test.js: regression test that builds a repo with--separate-git-dir, asserts the root is inlistWorktrees(), and thatassociate()hits tier 1. Fails onmain, passes with the fix.npm test: 662 pass, 0 fail.🤖 Generated with Claude Code
https://claude.ai/code/session_01NUq4TzhjqfAL8SSXi3XTPd