Source
Audit report — Section 9: Phase 1 (deferred item) + Section 4: Ecosystem Patterns (opencode-worktree)
Description
MC identifies projects by their filesystem path, which breaks when the repository is moved or cloned to a different location. The ecosystem plugin opencode-worktree uses the git root commit SHA as a stable, location-independent project identifier.
Current State
- Project ID is derived from the filesystem path
- State stored under
~/.local/share/opencode-mission-control/{path-based-id}/
- Moving a repo = losing all MC state (jobs, plans, config)
Proposed Solution
- Compute project ID from git root commit SHA:
git rev-list --max-parents=0 HEAD
- Use SHA-based ID for state directory naming
- Migration strategy required: Existing state directories need to be migrated from path-based to SHA-based naming
- Fallback: If not a git repo, fall back to path-based ID
Why This Was Deferred
Changing the project ID computation breaks all existing state directories. A migration strategy is needed:
- Option A: Automatic migration on first run (detect old path-based dir, rename to SHA-based)
- Option B: Symlink from old path to new SHA-based dir
- Option C: Dual-lookup (check both, prefer SHA-based)
Ecosystem Precedent
opencode-worktree uses this pattern successfully for stable project identification across clone locations.
Source
Audit report — Section 9: Phase 1 (deferred item) + Section 4: Ecosystem Patterns (opencode-worktree)
Description
MC identifies projects by their filesystem path, which breaks when the repository is moved or cloned to a different location. The ecosystem plugin
opencode-worktreeuses the git root commit SHA as a stable, location-independent project identifier.Current State
~/.local/share/opencode-mission-control/{path-based-id}/Proposed Solution
git rev-list --max-parents=0 HEADWhy This Was Deferred
Changing the project ID computation breaks all existing state directories. A migration strategy is needed:
Ecosystem Precedent
opencode-worktreeuses this pattern successfully for stable project identification across clone locations.