Skip to content

Define lock storage, ownership, and retention for workspace cleanup #241

@chubes4

Description

@chubes4

Problem

Workspace cleanup uses lock concepts but DMC does not make the lock storage/ownership/retention model obvious to operators. During cleanup work, the presence/question of lock directories made it unclear whether DMC is introducing more filesystem bloat while trying to remove workspace bloat.

Observed locally:

  • /Users/chubes/Developer/.locks existed but was 0B.
  • The operator had no clear CLI/status explanation for what lock directories are, when they are safe to remove, or whether stale locks are pruned.

Expected behavior

DMC should define and expose a clear lock lifecycle:

  • Prefer database/action-scheduler locks where possible.
  • If filesystem locks are required, keep them under a single documented DMC-owned path.
  • Each lock records owner, run/job id, purpose, created_at, heartbeat/expiry, and stale-after.
  • Stale locks are automatically pruned or surfaced through workspace hygiene.
  • workspace cleanup status/evidence reports active locks for a run.
  • No unbounded lock accumulation.

Acceptance criteria

  • workspace hygiene reports lock directory path, count, and stale lock count.
  • A safe workspace cleanup locks prune --dry-run or equivalent exists if filesystem locks remain.
  • Docs/help explain the lock storage model.
  • Locks do not become another hidden bloat source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions