feat: implement configurable tool container home directory
- Add ToolType.home_directory column with default /home/user
- Add Alembic migration to add column, set existing rows, and rewrite
/workspace to /home/user/{{WORKSPACE_NAME}} in legacy templates
- Add merge migration fc8f1a20cbf6 to resolve Alembic multiple heads
- Update manifest compiler to honor manifest.home_directory for HOME,
WORKDIR, /workspace symlink, and default repo mount target
- Update legacy dockerfile/compose instance generation to use
tool_type.home_directory
- Thread resolved home_dir through config profile and git mount expansion
- Generate entrypoint permission fixer to chown home/mounts at startup
- Update base.dockerfile with sudo/passwordless sudo for permission fixer
- Add unit tests for manifest compiler, instance service, and migrations
- Add placeholder integration test for container lifecycle
- Update openspec/tasks/home-path-expansion.md task checkboxes
- Update project maps for modified files
Quality gates: py_compile, ruff, mypy, pytest tests/unit (205 passed),
pytest tests/integration (110 passed, 35 skipped). Alembic round-trip
and container lifecycle integration tests require Docker/PostgreSQL.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
dir: apps/api/tests/unit
|
||||
|
||||
## role
|
||||
Contains comprehensive unit tests for the API backend services covering configuration, Docker operations, Git integration, file management, health monitoring, notifications, and SSH key handling.
|
||||
Unit test suite for the API application covering core services, utilities, and infrastructure components.
|
||||
## parent
|
||||
index: apps/api/tests/.pi-map.index.md
|
||||
map: apps/api/tests/.pi-map.md
|
||||
@@ -10,6 +10,7 @@ map: apps/api/tests/.pi-map.md
|
||||
-
|
||||
## files
|
||||
- __init__.py
|
||||
- test_alembic_migrations.py
|
||||
- test_config.py
|
||||
- test_config_profile_resolver.py
|
||||
- test_docker_build.py
|
||||
@@ -21,6 +22,7 @@ map: apps/api/tests/.pi-map.md
|
||||
- test_git_url_parser.py
|
||||
- test_health_monitor.py
|
||||
- test_home_path_expansion.py
|
||||
- test_instance_service.py
|
||||
- test_lifecycle_hooks.py
|
||||
- test_manifest_compiler.py
|
||||
- test_migration_metadata.py
|
||||
@@ -35,7 +37,7 @@ index: apps/api/tests/unit/.pi-map.index.md
|
||||
map: apps/api/tests/unit/.pi-map.md
|
||||
## workflows
|
||||
- change unit behavior
|
||||
read: __init__.py, test_config.py, test_config_profile_resolver.py
|
||||
read: __init__.py, test_alembic_migrations.py, test_config.py
|
||||
- change unit config
|
||||
read: test_config.py, test_config_profile_resolver.py
|
||||
## dirty
|
||||
|
||||
Reference in New Issue
Block a user