Skip to content

Chore: Remove migration templates#386

Merged
Shackless merged 7 commits into
developfrom
chore/remove-migration-templates
Apr 8, 2026
Merged

Chore: Remove migration templates#386
Shackless merged 7 commits into
developfrom
chore/remove-migration-templates

Conversation

@Shackless

Copy link
Copy Markdown
Contributor

No description provided.

Shackless and others added 6 commits April 8, 2026 12:46
Drop the `new` dict parameter from migrate_settings, migrate_defaults,
and migrate_wingman in BaseMigration and all subclasses. All values
previously read from version-specific template YAML files are now
inlined directly in the migration code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…backs

Scaffold now copies settings/defaults from old version and uses
templates/configs/ for wingman templates and assets. Migration
callbacks no longer receive the `new` parameter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migration templates are no longer needed. Default values are inlined
in migration code, and wingman templates come from templates/configs/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded version from template YAML files. The version is now
stamped automatically whenever a wingman config is created from a
template (fresh install, new wingman, or reset).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 8, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR removes version-specific migration template snapshots and refactors the migration pipeline to rely on inline defaults inside migration code plus the current templates/configs directory.

Changes:

  • Deleted templates/migration/* config snapshots and stopped bundling them in build scripts.
  • Updated migration APIs (migrate_settings/defaults/wingman) to accept only the old config and inline any needed defaults.
  • Reworked config bootstrapping during multi-step migrations to build new-version directories from the user’s prior configs plus current templates, and added a helper to stamp created_with_version on copied Wingman YAMLs.

Reviewed changes

Copilot reviewed 75 out of 103 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
templates/migration/** Removes frozen migration template snapshots across many versions.
templates/configs/** Removes created_with_version from shipped Wingman templates; relies on runtime stamping instead.
services/migrations/base_migration.py Simplifies migration method signatures (no “new template” arg) and updates no-op helper.
services/migrations/migration_170_to_180.py Inlines new default structures instead of pulling from templates; signature update.
services/migrations/migration_181_to_182.py Inlines ElevenLabs prompt + new provider defaults; signature update.
services/migrations/migration_200_to_210.py Inlines new settings/defaults; signature update.
services/migrations/migration_210_to_211.py Removes template-derived “new model” lookup; uses fallback constants; signature update.
services/migrations/migration_211_to_300.py Inlines new llama/parakeet defaults; signature update.
services/migrations/migration_300_to_301.py Signature update (settings migration only needs old).
services/migrations/migration_310_to_311.py Signature update (settings/defaults only need old).
services/migrations/README.md Updates migration chain and docs to match the new approach (no migration templates; inline defaults).
services/config_migration_service.py Removes dependency on templates/migration/**; bootstraps new version dirs from old configs + current templates; adjusts callback signatures.
services/config_manager.py Adds _stamp_created_with_version() helper and stamps copied Wingman YAMLs created from templates.
build.py / build_macos.py Stops packaging templates/migration/** into builds.
Comments suppressed due to low confidence (1)

services/config_migration_service.py:900

  • migrate_settings(...) results are not written to new_file for intermediate migration steps (only save_settings_config() is called, which writes to the current versioned config dir). This breaks multi-step migrations because the next migration reads settings from the intermediate version directory. Mirror the defaults.yaml handling: when new_config_path != self.latest_config_path, write migrated_settings to new_file without Pydantic validation; keep the current validated save path for the final step.
                elif filename == "settings.yaml":
                    self.log_highlight("Migrating settings.yaml...")
                    migrated_settings = migrate_settings(
                        old=self.config_manager.read_config(old_file),
                    )
                    try:
                        if new_config_path == self.latest_config_path:
                            self.config_manager.settings_config = SettingsConfig(
                                **migrated_settings
                            )
                        self.config_manager.save_settings_config()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread services/config_migration_service.py
Prevents overwriting user configs copied from old version with
template defaults during multi-step migration scaffold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Shackless Shackless merged commit 9d2188a into develop Apr 8, 2026
1 check failed
@Shackless Shackless deleted the chore/remove-migration-templates branch April 8, 2026 11:53
Shackless added a commit that referenced this pull request Apr 8, 2026
The templates/migration directory was removed in #386 but the spec
still referenced it, breaking the build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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