Skip to content

Data-loss risk: orphan cleanup deletes bind-mounted repos #128

@GammelSami

Description

@GammelSami

When mounting a host directory into /workspace/repos/..., OpenCode Manager startup cleanup removed that directory as "orphaned", causing data loss.

Suspected code

  • backend/src/services/repo.ts (cleanupOrphanedDirectories)
  • called from backend/src/index.ts

Expected

  • never rm -rf unknown dirs by default or without asking
  • protect bind mounts/external dirs
  • make cleanup opt-in (env flag) or dry-run first?
  • aks user if they wanna add the new detected folder as a repo

I don't understand why a Docker named volume is the default for project directories, since it's impractical for common development workflows where you need to test locally on the host before committing; I had to add my project folder first via UI and then bind-mount ~/workspaces:/workspace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions