6e33e8e4e9
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
31 lines
1.7 KiB
Markdown
31 lines
1.7 KiB
Markdown
# apps/api/alembic
|
|
dir: apps/api/alembic
|
|
|
|
index: apps/api/alembic/.pi-map.index.md
|
|
|
|
## role
|
|
Database migration infrastructure for the API application, providing version-controlled schema changes with async SQLAlchemy support.
|
|
## files
|
|
- env.py | Configures Alembic database migration environment with async SQLAlchemy support for a project. | exp: func:run_migrations_offline() → None, call:context.configure, call:context.begin_transaction, call:context.run_migrations, func:do_run_migrations(connection: Connection) → None, call:context.configure, call:context.begin_transaction, call:context.run_migrations, func:run_async_migrations() → None, call:async_engine_from_config, call:config.get_section, call:connectable.connect, call:connection.run_sync, call:connectable.dispose, func:run_migrations_online() → None, call:asyncio.run, call:run_async_migrations | dep: logging.config, alembic, sqlalchemy, sqlalchemy.engine, sqlalchemy.ext.asyncio, src.config, src.models, asyncio
|
|
- script.py.mako | Alembic database migration script template that generates upgrade/downgrade functions for SQLAlchemy schema migrations | dep: alembic, sqlalchemy
|
|
## arch
|
|
Alembic migration framework with Mako templating for generating migration scripts, configured for async SQLAlchemy operations.
|
|
## tags
|
|
migrations, run, sqlalchemy, async, alembic, call:context.configure, call:context.begin, transaction
|
|
## symbols
|
|
- run_migrations_offline
|
|
- do_run_migrations
|
|
- run_async_migrations
|
|
- run_migrations_online
|
|
- call:context.configure
|
|
- call:context.begin_transaction
|
|
- call:context.run_migrations
|
|
- call:async_engine_from_config
|
|
## workflows
|
|
- change alembic behavior
|
|
read: env.py, script.py.mako
|
|
- explore alembic subdirectories
|
|
index: apps/api/alembic/versions/.pi-map.index.md
|
|
## dirty
|
|
-
|