Skip to content

Add workspace disk attribution diagnostics #712

@chubes4

Description

@chubes4

Problem

After aggressive cleanup, operators still see hundreds of GiB used at the filesystem level, but DMC only reports its managed worktree footprint. The gap forces manual df / directory spelunking and makes cleanup feel incomplete even when DMC-safe cleanup is exhausted.

Desired behavior

Add a managed diagnostic report, e.g. workspace cleanup diagnose-disk or equivalent, that attributes disk usage across:

  • DMC primaries
  • DMC worktrees
  • known reconstructable artifacts
  • blocked cleanup candidates
  • non-DMC large directories under the workspace root
  • site/runtime plugin copies when relevant

Acceptance criteria

  • Report total filesystem usage context and DMC-managed usage side-by-side.
  • Sort largest buckets first.
  • Include actionable next commands for safe cleanup lanes.
  • Avoid raw destructive operations; diagnostic is read-only.

Context

This came from a cleanup run where DMC artifact cleanup reached zero candidates, but the volume still had ~500 GiB used and DMC-sized worktrees explained only ~135 GiB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions