Skip to content

fix: re-home bundled VST paths to a root that actually has the bundle - #1

Merged
mattromano merged 1 commit into
mainfrom
fix/rehome-vst-to-existing-root
Nov 6, 2026
Merged

mattromano merged 1 commit into
mainfrom
fix/rehome-vst-to-existing-root

Conversation

@mattromano

Copy link
Copy Markdown
Owner

Problem

Song tones lost every VST pedal, amp and rack after an app rebuild or update. Songs played through a bare amp, while the idle chain preset (e.g. "Main Lead") still sounded fine.

_migrate_rehome_bundled_vst_paths runs on every DB open. It rewrites every bundled vst_path to <plugin_dir>/vst/<rel>. But packaged builds ship without <plugin_dir>/vst: bundle-slopsmith.sh strips it, and the packs download on demand into <config>/nam_rig_builder/vst (got-feedBack#55). So the migration pointed all ~28k pieces at a folder that doesn't exist.

Fix

  • Each path is re-homed to the first root that actually has the bundle: the plugin dir first, then _downloaded_vst_root().
  • Only when neither root has it does it fall back to the old behaviour (the plugin dir).
  • Paths already under the download root are recognised as bundled, so a tone can move between roots.
  • Existence checks are cached per (root, bundle). That's about 300 stat calls for the 155 distinct bundles, not 28k.

Testing

  • tests/test_vst_path_rehome.py: the 7 existing tests are unchanged and pass. 4 new tests cover:
    • only the download root has the bundle
    • both roots have it (plugin dir wins)
    • a download-root path moves to a plugin-dir copy
    • neither root has it (fallback)
  • Full suite: the same 8 failures before and after this change (test_manifest.py, test_watcher_paths.py). None are related.
  • Ran it against a copy of a real nam_tone.db (27,996 VST pieces), with the plugin dir missing vst/:
    • before the fix: 27,996 missing
    • after: 27,948 resolve to the download root
    • the other 48 all use pedals/FM101.vst3, which is missing from the published vst-win-pack-v1 (FM101 got Win/Linux binaries in 6f44593, apparently after the pack). With that one bundle added, 0 missing.

Follow-up

Republish the Windows VST pack with FM101.vst3.

🤖 Generated with Claude Code

_migrate_rehome_bundled_vst_paths rewrote every bundled vst_path to
<plugin_dir>/vst on each open. Packaged builds ship WITHOUT that folder
(the packs download on demand into <config>/nam_rig_builder/vst), so after
any app update or rebuild every pedal/amp/rack VST in every song tone
pointed at a folder that doesn't exist, and songs played a bare amp.

Now each path goes to the first root that has the bundle (plugin dir, then
the download root), falling back to the plugin dir only when neither does.
Paths already under the download root are recognised as bundled too.
Existence checks are cached per (root, bundle), so ~28k rows cost ~300 stats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattromano
mattromano merged commit d90b581 into main Nov 6, 2026
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