pub fn list(volume_root: &Path) -> Result<WorktreeList, Error>Expand description
Enumerate per-run worktrees under .omne/wt/, partitioned into
healthy pairs plus filesystem-only and git-only orphans.
Three sources of truth are reconciled:
- child directories physically present under
.omne/wt/, - paths reported by
git worktree list --porcelainresolving under.omne/wt/, - their intersection.
Unit 13 omne status uses the orphan buckets to flag unpaired
runs; a future cleanup path uses them to drive git worktree prune
or stray-directory removal. Returning only the intersection (as an
earlier draft did) silently leaked orphan state past consumers —
hence this struct-return shape.
If .omne/wt/ exists but cannot be canonicalized (permission,
reparse-point anomaly), the error is surfaced as Error::Io
rather than being silently downgraded to empty buckets.