Files
headquarter/apps/api/tests/unit/.pi-map.index.md
T
Developer 6e33e8e4e9 fix: remove explicit repo mount from pi-agent manifest and derive workspace name from remote URL
The pi-agent manifest still declared an explicit repo mount with
{{WORKSPACE_NAME}}, making the mount target dependent on tool config. The
instance service now synthesizes the repo mount, so the manifest no longer
needs the explicit mount.

- Add Alembic migration 2026_06_15_090500 to remove the source_type: repo
  mount from the built-in pi-agent manifest
- Add _get_repository_mount_name() helper to derive the workspace directory
  name from the repository remote URL (matching git clone behavior) and
  fall back to the user-provided repository name
- Use the helper for WORKSPACE_NAME/REPO_NAME in manifest, legacy dockerfile,
  and legacy compose template paths
- Update unit tests for the new migration and helper

Quality gates:
- pytest tests/unit: 218 passed
- ruff: clean on changed files
- mypy: clean on changed files
- alembic heads: single head
2026-06-15 09:10:05 +00:00

49 lines
1.4 KiB
Markdown

# apps/api/tests/unit (index)
dir: apps/api/tests/unit
## role
Comprehensive unit test suite for the API application covering database migrations, configuration, Docker operations, Git services, file management, health monitoring, manifest compilation, and notification systems.
## parent
index: apps/api/tests/.pi-map.index.md
map: apps/api/tests/.pi-map.md
## children
- apps/api/tests/unit/.ruff_cache
index: apps/api/tests/unit/.ruff_cache/.pi-map.index.md
map: apps/api/tests/unit/.ruff_cache/.pi-map.md
## files
- __init__.py
- test_alembic_migrations.py
- test_config.py
- test_config_profile_resolver.py
- test_docker_build.py
- test_docker_service.py
- test_event_bus.py
- test_file_service.py
- test_git_operations.py
- test_git_service.py
- 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
- test_monitoring_models.py
- test_notification_service.py
- test_notifications_api_routes.py
- test_permission_fixer.py
- test_readiness_probe.py
- test_ssh_keys.py
## links
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_alembic_migrations.py, test_config.py
- change unit config
read: test_config.py, test_config_profile_resolver.py
- explore unit subdirectories
index: apps/api/tests/unit/.ruff_cache/.pi-map.index.md
## dirty
-