Repository navigation
Description
What happened
The 2026-09-15 merge train walked 9 open PRs. Two of them (#2728, #2805) carried a live #2068 two-heads Alembic fork, and both had fully green checks — including pg-migrations and schema-parity, the required job whose unconditional single-head step (scripts/ci/check_alembic_heads.py) exists precisely to catch this.
Neither was caught by CI. Both were caught by running the guard by hand against the merged tree.
# origin/dev + #2805
alembic-heads: FAIL — resolves to 2 heads across 64 revision(s); exactly 1 is required.
• 0062_agent_sync_state_git_dir_bytes_bigint
• 0062_execution_fan_out_task_id
They fork at: 0061_execution_open_canvas
# origin/dev + #2728
alembic-heads: FAIL — resolves to 2 heads across 64 revision(s); exactly 1 is required.
• 0059_telegram_group_context
• 0062_execution_fan_out_task_id
They fork at: 0058_portal_file_dismissals
Because alembic upgrade head is singular and resolves its target before applying anything, either merge makes PostgreSQL apply zero revisions — every revision since the fork stops arriving, not only the forked one — while git reports no conflict, because each file is individually valid and the defect exists only in the relationship.
Why the required gate didn't fire
This is the #2533 class, already documented in architecture.md Invariant #3: the gate runs on the pull_request event, and GitHub does not re-trigger workflows when the base advances. #2805 branched before #2532 landed at 14:58; on the PR branch alone the graph genuinely is a single head (63 revision(s), 1 head), which is what the author ran and reported. The green tick is accurate about a base that no longer exists.
Why the backstop didn't cover it either — the new part
alembic-head-watch.yml exists for exactly this window. It did fire at 14:58 and posted on #2805:
PR #2805 conflicts with dev — head check not evaluated.
It could not evaluate because the PR had a conflict in docs/memory/learnings.md — an append collision in a prose file, entirely unrelated to migrations. So the guard for the silent-schema-fork class is disabled by the single most common merge conflict in this repo. On 2026-09-15, 4 of 9 open PRs conflicted on that one file.
That is the part worth fixing: a watcher that skips on any conflict is a watcher that is reliably absent on exactly the busy days when the fork is most likely.
Suggested direction
- Make the watch conflict-tolerant for its own concern. It doesn't need a mergeable tree — it needs the union of
migrations/versions/from dev and the PR. Read the PR's revision files directly (git show <pr-head>:<path>) and graft them onto dev's set, rather than requiring a cleangit merge-treeof the whole repo. - Report unevaluated as a distinct, visible state. "Not evaluated" currently reads like silence. If the watch cannot run, that should be legible on the PR as unknown, not absent.
- Consider whether a fork is cheap enough to detect at merge time as well (a pre-receive-equivalent check in the merge path), since that is the only moment the real merged graph exists.
Separately, the learnings.md collision itself has a durable fix that would reduce the blast radius here and elsewhere: per-PR fragment files under docs/memory/learnings/, assembled at release, the way changelog tooling does it.
Evidence
- fix(db): agent_sync_state ints are bounded at their own column's ceiling — git_dir_bytes BIGINT (#2800), int4 coercion (#2827) #2805 (
0062_agent_sync_state_git_dir_bytes_bigint→ parent0061_execution_open_canvas); dev head0062_execution_fan_out_task_idlanded 14:58 via feat(pull): async fan-out join + sync edge adapter — no autonomous trigger is stranded (#2524) #2532 (7b3cf20a8) - feat(telegram): a tagged group turn knows the group's recent conversation (abilityai/trinity-enterprise#600) #2728 (
0059_telegram_group_context→ parent0058_portal_file_dismissals); dev already had0059_agent_canvases_pinnedoff the same parent - Both verified by
scripts/ci/check_alembic_heads.pyagainstgit merge-tree-produced merged trees
Found by /merge-train, 2026-09-15. Both PRs were ejected and their authors told to re-parent.
🤖 Generated with Claude Code
Activity
dolho commentedon Sep 16, 2026
/claim
github-actions commentedon Sep 16, 2026
Claimed by @dolho. Label
status-in-progressadded.Next steps:
feature/2828-<short-slug>Fixes #2828merge-train: C-quoted paths hit the version-line anchor; the unknown-…
fix(ci): the Alembic head watch evaluates through an unrelated confli…