feat(server): bundle migrations in wheel and add agent-control-migrate#209
Merged
abhinav-galileo merged 4 commits intomainfrom May 5, 2026
Merged
Conversation
Ships server/alembic/ and alembic.ini inside the installed package via hatch force-include, and exposes a small console script that runs 'alembic upgrade head' against the bundled config. Lets non-Docker consumers run migrations from a wheel install without vendoring.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Adds success-path coverage for upgrade/downgrade/current/history/heads via monkeypatch-and-assert against alembic.command, plus a build-time guard that the source paths hatch force-include reads from still exist in-tree (catches accidental wheel regressions).
Drops the implicit '-1' default for 'agent-control-migrate downgrade'. Downgrade is destructive; an operational CLI should not roll back the schema on a typo or incomplete command. Users must now pass an explicit revision (e.g. 'downgrade -1' or 'downgrade <rev>').
namrataghadi-galileo
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ship Alembic migration scripts and
alembic.iniinside the installed wheel via hatchforce-include, and expose a smallagent-control-migrateconsole script that runsalembic upgrade headagainst the bundled config.Lets non-Docker consumers (e.g. wheel-based deployments) run migrations from a vanilla install without vendoring migration files.
Scope
agent-control-migrateconsole script (subcommands:upgrade,downgrade,current,history,heads).agent_control_server/_alembic/andagent_control_server/_alembic.ini(private, underscore-prefixed).alembic upgrade headfromserver/still works.Risk and Rollout
Testing
server/unit_tests/test_migrate.py).agent_control_server/_alembic/versions/*.pyandagent_control_server/_alembic.ini.ruff check(server and root configs).agent-control-migrateagainst a real database.Checklist