refactor(migrations): split the registry into per-topic files#2779
Merged
Conversation
Replace the single tools/migrations.R registry with per-topic files under tools/migrations/, so parallel migration PRs do not conflict on one file. - tools/generate-migrations.R loads every tools/migrations/*.R file (a legacy tools/migrations.R is still honoured if present), merges the entries, and rejects duplicate declarations across files. - The existing entries move as-is: as_adjacency_matrix and as_biadjacency_matrix to tools/migrations/conversion.R, the test fixture to tools/migrations/fixture.R. The spliced ARG_HANDLE blocks are byte-identical. - The entry schema documentation moves from the deleted tools/migrations.R header to tools/migrations/README.md. - Two generator fixes with regression tests: a single over-long item rendered as `list(, item)` because paste0() turns character(0) into ",", and deparse() emitting `x/y` where air formats `x / y`, which failed CI's idempotency check (spaces are reinserted token-aware, so slashes inside string literals stay untouched). - New unit tests for the registry loader in tests/testthat/test-generate-migrations.R. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
enabled auto-merge (squash)
July 26, 2026 16:16
This was referenced Jul 26, 2026
Closed
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
…ular_tree()`, `make_symmetric_tree()` Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Flattened onto the current main (post-#2779 rebase); content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
krlmlr
pushed a commit
that referenced
this pull request
Jul 26, 2026
Resolve the modify/delete conflict on tools/migrations.R (deleted on main by #2779): the three attr-comb entries move to tools/migrations/attr-comb.R, and the ARG_HANDLE blocks are regenerated with the current generator. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016M32izVHZPfxAqemAe4BrX
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.
Preparatory PR for the repo-wide ellipsis migration (#2757):
a single commit with the registry-split logic plus the split of the
existing migrations, so every follow-up PR can carry it as its first commit
and rebase to a pure diff once this lands.
What this does
tools/generate-migrations.Rnow loads everytools/migrations/<topic>.Rfile (one per topic, mirroring the R sources),merges the entries, and rejects duplicate declarations across files.
A legacy
tools/migrations.Ris still honoured if present, easing olderbranches (e.g. refactor: snake_case attr-comb options & arguments, soft-deprecate dotted names #2742) over the transition.
as_adjacency_matrixandas_biadjacency_matrixtotools/migrations/conversion.R, the test fixtureto
tools/migrations/fixture.R. The spliced ARG_HANDLE blocks arebyte-identical (the generator run is a no-op on
R/).tools/migrations.Ris deleted; its schema documentation moves totools/migrations/README.md.each with a regression test):
list(, item)— syntactically validbut an error the moment the block runs — because
paste0()turnscharacter(0)into",";deparse()emitsx/ywhere air formatsx / y, failing CI'sidempotency check for any block whose defaults contain a division;
spaces are reinserted token-aware via
getParseData(), so slashes insidestring literals (URLs) stay untouched.
(
tests/testthat/test-generate-migrations.R): multi-file merging, duplicaterejection, empty registries, plus the two regression tests.
tests/testthat/helper-migrations.R, the in-sync test intest-migration-fixture.R, and the CI drift check(
.github/workflows/custom/after-install) now resolve the registry viamigration_registry_files()instead of the hard-coded single file.Follow-ups (held until this merges)
CONTRIBUTING.md).
[this commit, topic commit]and force-pushed.
Note
#2742 appends entries to the deleted
tools/migrations.Rand will conflicttrivially: its three entries just move into a topic file (the legacy file also
still loads if resurrected, so an interim merge is harmless either way).
Generated by Claude Code