Skip to content

feat(migrations): record the v0.2.1 autopairs swap, require migrations for default changes#9

Merged
binbandit merged 1 commit into
mainfrom
feat/autopairs-migration-and-default-policy
Jun 10, 2026
Merged

feat(migrations): record the v0.2.1 autopairs swap, require migrations for default changes#9
binbandit merged 1 commit into
mainfrom
feat/autopairs-migration-and-default-policy

Conversation

@binbandit

@binbandit binbandit commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

The migrations machinery exists precisely so shipped defaults change through an explicit upgrade path — but the table in lua/blak/core/migrations.lua was empty, even though NEWS.md v0.2.1 documents swapping core pair handling from mini.pairs to nvim-autopairs. That change reached users without the machinery ever being used.

Two parts:

  • Retroactive migration v0.2.1.autopairs: deliberately non-breaking (it doesn't block :BlakUpdate — the swap shipped two releases ago, so blocking everyone now would punish current users). It's notify-only: on the next :BlakUpgrade it explains the swap once and points at the opt-out. Note the opt-out is { "windwp/nvim-autopairs", enabled = false } in plugins.specsnot mini.modules = { "pairs" }, because the editor.mini extra deliberately skips the pairs module (lua/blak/extras/editor/mini.lua:14). Besides serving stragglers upgrading from 0.2.0, this exercises the migration pipeline for the first time, so it's proven before it's needed for something scary.
  • Process rule: CONTRIBUTING.md design rule 4 and the AGENTS.md design rules now state that any change to a shipped default requires a migration entry plus a NEWS.md entry in the same change. The missing rule, not the missing entry, is what actually went wrong in v0.2.1.

Validation

make validate passes. Neovim isn't available here for make smoke (which exercises the migration pipeline via scripts/update-contract.lua); manual check: run :BlakUpgrade on a machine with no migration state and confirm the one-time notification appears and :BlakUpdate is never blocked.

…s for default changes

v0.2.1 swapped core pair handling from mini.pairs to nvim-autopairs but
the migrations table stayed empty, so the change reached users without
the explicit upgrade path the manifesto promises. Add a non-breaking
notify-only migration so the next :BlakUpgrade explains the swap and
the plugins.specs opt-out (the editor.mini extra deliberately skips the
pairs module, so that is the supported path back).

Make the process explicit in CONTRIBUTING.md and AGENTS.md: any change
to a shipped default needs a migration entry plus a NEWS.md entry in
the same change.
@binbandit binbandit force-pushed the feat/autopairs-migration-and-default-policy branch from 9f31abd to 641f0d6 Compare June 10, 2026 01:25
@binbandit binbandit merged commit 3f9be96 into main Jun 10, 2026
2 checks passed
@binbandit binbandit deleted the feat/autopairs-migration-and-default-policy branch June 10, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant