fix(amp): preserve legacy rigs across the Sag/Bias rename + move

Addresses two blocking findings from the external review, both legacy
preset-compat (no RT/protocol issues were found):

- Rename compat: "Fullerton Princeton" → display "Fullerton Ivy League"
  would silently drop the pedal from any rig saved under the old name
  (displayName is the serialization key). Add PedalRegistry.legacyTypeAliases
  resolved in makePedal (self-healing: loads, then re-saves under the new
  name). Regression test asserts the old name still resolves.
- Knob-shift compat: moving Modern High-Gain's Sag off the face shrank its
  effectKnobs by one, so an old 11-value knobValues array would misassign
  Sag→Mix and Mix→Level on load. Add a targeted PedalState migration
  (Pedal.legacyMigrated) that lifts Sag into advancedValues and keeps
  Mix/Level in place. Regression test decodes a hand-built legacy preset
  and asserts correct placement.

Also: drop the not-yet-built "Bias X" from a doc comment; de-brand "Vox"
from the Chime variants test names (ToneStackModel .vox enum refs kept).

643 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 21:20:16 -07:00
parent 1de14fd879
commit 781577b062
6 changed files with 95 additions and 5 deletions
+1 -1
View File
@@ -490,7 +490,7 @@ public struct PedalView: View {
/// Presentation flag for the pedal info panel (description + control ranges).
@State private var showInfo: Bool = false
/// Presentation flag for the advanced-controls pop-over (amp Sag / Bias / Bias X).
/// Presentation flag for the advanced-controls pop-over (amp Sag / Bias).
@State private var showAdvanced: Bool = false
/// Presentation flag for the Neural Amp model-file importer.