ReviewOS

stacks/buddy

Recognize linked worktrees and nested repositories in doctor

#1460
Closed chris opened this 6 days ago ·
6 days ago

Running the complete suite from a real linked worktree exposes two false doctor failures: a healthy repository is reported as a non-repository because diagnosis checks only <cwd>/.git/HEAD. A linked worktree has a .git file, and a valid nested working directory need not contain .git at all.

A retained public diagnose() regression initializes and commits a real temporary repository, adds a real detached worktree, then diagnoses the checkout, worktree and a nested package directory. The current root checkout passes; the linked worktree fails. Git and the filesystem are not mocked.

Source owner: src/doctor.ts. This surfaced while verifying the dependency-discovery correction in #1459, but is a separate repository-detection defect.

Acceptance:

  • Retain the real repository/worktree/nested-directory regression.
  • Use Git's actual working-tree discovery rather than inferring a repository from a particular metadata pathname. Keep non-repository and unavailable-Git failures explicit and bounded.
  • Preserve warning-only treatment of missing optional credentials and analyzers.
  • Pass focused and complete tests, lint, types, documentation checks and build.
  • Publish through the normal patch release and verify the installed package from actual linked worktrees.
6 days ago

Verified release and consumer results: /stacks/buddy/issues/1459#issuecomment-6435298662

Sign in to comment on this issue.