This repository was archived by the owner on Aug 11, 2026. It is now read-only.
fix(db): merge the two divergent Alembic heads on main - #555
Merged
Conversation
main has two heads, so every migration run fails with "Multiple head revisions are present for given argument 'head'". That takes the entire database test tier and the deploy down with it: CI is red on main itself at deead2d and Deploy failed at d3ffc73. f4b7d2c91ae5 add_never_disclose_release_policy (#505), from b2e9d4a17c60 c7a4f1e2b903 reinstate_an_evicted_submission, from a7c14f8bd260 Both were written against different tips and merged without either being rebased onto the other. Alembic linears by down_revision, not by merge date, so nothing about the git merge forced them into one chain. Empty merge point, deliberately: no upgrade/downgrade body, so neither branch's schema changes are altered, re-run, or reordered. It only rejoins the chain so `head` is singular again. The two branches touch unrelated tables, so their relative order carries no schema meaning. Verified: `alembic heads` reports one head; full suite 2473 passed after a `make test-db-reset` (the cached template was built against the broken chain). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Author
Peyton-Spencer
marked this pull request as ready for review
July 28, 2026 17:25
This was referenced Jul 28, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
mainis currently red and undeployable. It has two Alembic heads, so every migration run fails with:That takes down the entire database test tier (1183 errors + 4 failures on the last
mainCI run) and the deploy. CI is failing onmainitself atdeead2d, and the Deploy job failed atd3ffc730.The two heads
down_revisionf4b7d2c91ae52026_07_27_add_never_disclose_release_policy(#505)b2e9d4a17c60c7a4f1e2b9032026_07_27_reinstate_an_evicted_submissiona7c14f8bd260Both were written against different tips and merged without either being rebased onto the other. This is the ordinary way it happens: Alembic linears by
down_revision, not by merge date, so nothing about the git merge forced them into a single chain. The repo's own guidance (CLAUDE.md, "rebase onto currentorigin/mainbefore renumbering") is aimed at exactly this.The fix
An empty merge point. No
upgrade/downgradebody, on purpose — neither branch's schema changes are altered, re-run, or reordered by this revision. It only rejoins the chain soheadis singular again. The two branches touch unrelated tables (release policy vs. submission-queue reinstate), so the order in which they land carries no schema meaning.Verification
alembic heads→45ef71514f21 (head), singular.make lintandmake typecheckclean.make test→ 2473 passed.One note worth recording for whoever hits this next: the first full run on a fresh worktree came back with 513 failures. That was a stale cached test-DB template (built against the broken chain), not the fix —
make test-db-resetand the run is green. If you review this and see mass DB failures locally, reset the template before believing them.Scope
Found while rebasing #554 onto current
main; that PR touches zero files underalembic/and inherited this failure rather than causing it. Split out as its own PR because it is amain-wide breakage that should merge on its own schedule rather than riding behind an unrelated review — #554 goes green once this lands.Ownership really sits with #505, so if its author would rather fix it their own way, close this. It is here because
mainis red right now.🤖 Generated with Claude Code