fix: clone workspace into repo-named subdirectory directly

Git clone with an explicit destination puts the working copy directly into
that directory; it does not create a repo-named subdirectory. The previous
change assumed the opposite, so workspaces ended up at
/data/working-copies/{workspace_id}/ with the repo contents mixed in,
causing a 500 when the expected repo-named subdirectory was missing.

- Build the target path as /data/working-copies/{workspace_id}/{repo_name}/
  and pass it directly to GitService.clone
- Remove stale directory detection and fallback logic that is no longer
  needed
- Keep diagnostic logging around git clone failures

Quality gates:
- pytest tests/unit: 219 passed
- mypy: clean on changed files
This commit is contained in:
Developer
2026-06-15 10:09:30 +00:00
parent 83928d0f02
commit 1658767cf4
13 changed files with 28 additions and 50 deletions
@@ -2,7 +2,7 @@
dir: apps/api/src/services/shared
## role
Provides common infrastructure services used across the API backend, including security, I/O, container operations, and workspace lifecycle management.
Provides common, cross-cutting backend services used by multiple API components for security, infrastructure, and user-facing operations.
## parent
index: apps/api/src/services/.pi-map.index.md
map: apps/api/src/services/.pi-map.md