b26ed7c3e4
Working copies were stored as /data/working-copies/{repo_id}/{workspace_name}/,
so git clone was forced into a user-named directory. That meant the container
mount basename was the workspace name (e.g. main) instead of the repo name.
- Generate the workspace UUID before cloning and clone into
/data/working-copies/{workspace_id}/ so git creates {repo_name}/ naturally
- Set workspace.path to /data/working-copies/{workspace_id}/{repo_name}/
- Update _migrate_clone_into_workspace() to use the same layout
- _get_repository_mount_name() now prefers workspace.path basename and only
falls back to remote URL / repo.name for legacy repo-only instances
- Update unit tests to assert workspace path basename is used for mounts
Quality gates:
- pytest tests/unit: 219 passed
- ruff: clean on changed files
- mypy: clean on changed files
806 B
806 B
apps/api/src/services/shared (index)
dir: apps/api/src/services/shared
role
Provides common infrastructure and utility services used across the API backend, including cross-cutting concerns like request tracing, file operations, notifications, Docker container management, and workspace lifecycle handling.
parent
index: apps/api/src/services/.pi-map.index.md map: apps/api/src/services/.pi-map.md
children
files
- __init__.py
- correlation.py
- file_service.py
- notification_service.py
- permission_fixer.py
- readiness_probe.py
- ssh_keys.py
- tunnel.py
- workspace_manager.py
links
index: apps/api/src/services/shared/.pi-map.index.md map: apps/api/src/services/shared/.pi-map.md
workflows
- change shared behavior read: __init__.py, correlation.py, file_service.py