Files
headquarter/apps/api/alembic/.pi-map.md
alex 10955dfe8e fix(tool): stop defaulting manifest working_dir to /workspace
The /workspace compatibility symlink was removed from the manifest
compiler/entrypoint in 3e59a25. Tool definitions that still set
runtime.working_dir to /workspace therefore start in an empty directory
instead of /home/user/{repo_name}.

- manifest-editor.tsx: default working_dir to empty instead of /workspace;
  update startup-script placeholder to reference /home/alex/.
- Add Alembic migration 2026_06_19_113000 that clears the stale
  runtime.working_dir = /workspace from the built-in pi-agent manifest.
- Add migration import test.

Quality gates: pytest tests/api tests/services/test_terminal_manager_multi.py tests/unit (248 passed), ruff check (clean), npx tsc --noEmit (clean), eslint (clean).
2026-06-19 12:10:42 +02:00

1.8 KiB

apps/api/alembic

dir: apps/api/alembic

index: apps/api/alembic/.pi-map.index.md

role

Database migration tooling for the API service, enabling version-controlled schema changes with async SQLAlchemy support.

files

  • env.py | Configures Alembic database migration environment with async SQLAlchemy support. | 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 Python migration files for SQLAlchemy database schema changes | dep: alembic, sqlalchemy, mako

arch

Template-based migration generation using Alembic's standard env.py configuration pattern with async SQLAlchemy engine integration and Mako templating for migration script scaffolding.

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