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
+1 -1
View File
@@ -2,7 +2,7 @@
dir: apps/api/src
## role
Core backend API package for the "Headquarter" service, providing application bootstrap, configuration, database connectivity, and structured logging infrastructure.
Core backend API package for the "Headquarter" service, handling configuration, database connectivity, structured logging, and FastAPI application initialization.
## parent
index: apps/api/.pi-map.index.md
map: apps/api/.pi-map.md