Problem
wspace check currently reports each manifest-managed child repository twice: once as the managed repository and once as (unmanaged) <name>. The directory scan in collectStatus() adds every Git checkout under repos/ as unmanaged, even when that checkout is explicitly represented in repos.json.
This makes a healthy workspace look misconfigured and obscures genuine stray checkouts. The implementation already constructs a managed-name set, but the set is not used to exclude managed directories from the unmanaged scan.
Desired behavior
Report each managed repository exactly once. Report (unmanaged) only for a real Git checkout under the managed repositories directory that is not represented by a manifest entry.
Acceptance criteria
- A manifest-managed repository appears exactly once in human output.
wspace check --json contains one row per managed repository, with no duplicate unmanaged row.
- A genuine stray checkout remains visible as
(unmanaged) <name>.
- The workspace root entry (
path: ".") is never reported as unmanaged.
- Missing and invalid managed checkouts remain reported with their existing states.
- Custom repository paths continue to work without false unmanaged rows.
- Add regression coverage for an all-managed workspace, one genuine stray checkout, a missing checkout, and the root harness entry.
- Preserve the current exit-code contract and the conservative read-only behavior.
Related
This is the implementation-focused follow-up to the broader conventions issue: #9
Non-goals
- Do not hide genuine unmanaged checkouts.
- Do not automatically delete, adopt, or add stray repositories to the manifest.
Problem
wspace checkcurrently reports each manifest-managed child repository twice: once as the managed repository and once as(unmanaged) <name>. The directory scan incollectStatus()adds every Git checkout underrepos/as unmanaged, even when that checkout is explicitly represented inrepos.json.This makes a healthy workspace look misconfigured and obscures genuine stray checkouts. The implementation already constructs a managed-name set, but the set is not used to exclude managed directories from the unmanaged scan.
Desired behavior
Report each managed repository exactly once. Report
(unmanaged)only for a real Git checkout under the managed repositories directory that is not represented by a manifest entry.Acceptance criteria
wspace check --jsoncontains one row per managed repository, with no duplicate unmanaged row.(unmanaged) <name>.path: ".") is never reported as unmanaged.Related
This is the implementation-focused follow-up to the broader conventions issue: #9
Non-goals