Skip to content

Report linked worktree health in wspace check #13

Description

@EthanThatOneKid

Problem

wspace check currently reports the canonical checkout for each manifest repository but does not report the health of linked feature worktrees. A clean repos/<repo> checkout can therefore hide uncommitted changes, a missing worktree directory, a detached worktree, or other actionable state in worktrees/<repo>/<feature>.

Desired behavior

Extend the read-only status model to include linked worktrees discovered through Git's porcelain worktree output.

Each linked-worktree row should identify at least:

  • repository name
  • worktree path
  • branch, when attached
  • detached/bare state
  • clean or dirty status
  • actionable error details when Git cannot inspect the worktree

The human output should be understandable to a beginner, and check --json should expose stable fields suitable for automation.

Acceptance criteria

  • The main worktree is not duplicated as a linked-worktree row.
  • A dirty linked worktree is visible even when the canonical checkout is clean.
  • Detached and missing/invalid linked worktrees are reported distinctly.
  • The command remains read-only and never removes, prunes, resets, or modifies worktrees.
  • Define and document whether dirty linked worktrees make check exit nonzero; the recommended behavior is yes because user work is not clean.
  • Add integration tests for clean, dirty, detached, and removed/stale linked worktrees.
  • Preserve existing FEATURE_CLEAN semantics for a clean feature branch in the canonical checkout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions