Skip to content

fix: hashed storage paths to prevent basename collisions#106

Open
rajkumarsakthivel wants to merge 1 commit into
mainfrom
fix/storage-path-collision
Open

fix: hashed storage paths to prevent basename collisions#106
rajkumarsakthivel wants to merge 1 commit into
mainfrom
fix/storage-path-collision

Conversation

@rajkumarsakthivel

Copy link
Copy Markdown
Member

Summary

  • Storage paths now use <basename>-<6hex> slugs instead of bare directory names, preventing two projects with the same basename from silently sharing (and corrupting) the same index
  • All 19 call sites across cli.py, pipeline.py, mcp_server.py, dashboard, and serve_http migrated to use project_storage_dir() helper
  • Existing users get a transparent one-time migration (legacy dir renamed to slug dir)
  • Reuses the same slug pattern already proven in the Codex editor config (editors.py)

Closes #52

Two projects with the same directory name (e.g. ~/work/api and
~/scratch/api) previously shared the same storage directory, silently
corrupting each other's index and memory.db.

Storage paths now use `<basename>-<6hex>` slugs derived from the
resolved absolute path, matching the pattern already used for Codex
editor configs. All 19 call sites migrated.

Existing single-checkout users get a transparent one-time migration
(legacy dir renamed to slug dir on first access).

Closes #52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storage path uses directory basename, not absolute path (worktree collision risk)

1 participant