Skip to content

feat: add additive provider-model insert migration family, port 337 to it - #6107

Merged
atomantic merged 1 commit into
atomantic:mainfrom
Bryandero98:fix/migrations-additive-insert-factory
Sep 3, 2026
Merged

feat: add additive provider-model insert migration family, port 337 to it#6107
atomantic merged 1 commit into
atomantic:mainfrom
Bryandero98:fix/migrations-additive-insert-factory

Conversation

@Bryandero98

Copy link
Copy Markdown
Contributor

Summary

  • Adds makeAdditiveProviderInsertMigration({ targets, label }) to scripts/migrations/_lib.js as a new "family 7b": it splices a replacement model id after a retired one on a provider's models list, without rewriting or dropping anything else on a possibly-curated (user-edited) list — unlike family 7's exact-match pristine-list rewrite, which is the wrong tool when the list may have been hand-customized.
  • Adds runAdditiveProviderInsertMigrationTests({ migration, targets, prefix }) to scripts/migrations/_testHelpers.js, following the same convention as the existing shared test helpers: fixtures are derived from the migration's own targets table so behavior and coverage can't drift apart.
  • Rewrites migration 337 (claude-sonnet-5 additive repair) as a thin config wrapping the new factory, exporting TARGETS so its test file can build on the shared helper instead of hand-rolling its own fixtures.

Test plan

  • scripts/migrations/337-claude-sonnet-5-additive.test.js — 96/96 (via the new shared helper)
  • Full scripts/migrations/ directory run — no new failures introduced

🤖 Generated with Claude Code

…o it (atomantic#6072)

New "family 7b" factory, makeAdditiveProviderInsertMigration, splices a
replacement model id after a retired one on a possibly-curated models list
without rewriting or dropping anything else — unlike family 7's exact-match
pristine-list rewrite. runAdditiveProviderInsertMigrationTests in the shared
test helper derives its fixtures from the migration's own targets table, the
same convention the other migration families already use. Migration 337
(claude-sonnet-5 additive repair) is rewritten as a thin config on top of the
new factory.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@atomantic atomantic left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — change is correct, focused, and covered by tests. Approving.

@atomantic
atomantic merged commit 509a439 into atomantic:main Sep 3, 2026
7 checks passed
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.

2 participants