fix(audio-effects): accept pre-rebrand chain plan schema as alias - #816
Conversation
…r manual A/B window.feedBack.getLoop() is a read surface plugins legitimately poll (note_detect HUD ticked it at ~30 Hz), but every call recorded a playback.loop-api bridge hit: compat-shim bookkeeping, a playback:bridge-hit event, and a diagnostics snapshot rebuild + stringify per call — real main-thread cost and a saturated hitCount in the capability inspector, even with no song playing. - _recordPlaybackBridge now throttles per bridgeId|surface (5 s window). Bridge hits are a 'surface still in use' signal, not a call counter. - setLoopEnd() (manual A/B buttons) now emits the same loop-set transport event as setLoop(), so event-driven consumers no longer need to poll getLoop() to see button-armed loops. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The rebrand renamed PLAN_SCHEMA to 'feedBack.audio_effects.chain_plan.v1' but shipped plugin bundles (rig_builder <= 2.9.x) still send the slopsmith-era id, so _validatePlan rejected every plan and providers fell back to their heavyweight legacy load paths (full chain rebuild per poll cycle — audible as continuous distortion during songs). Accept the old id as an explicit alias. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR throttles playback bridge hit recording to once per 5 seconds per bridge/surface pair, dispatches a ChangesPlayback Loop and Schema Fixes
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant AppJS as app.js
participant Bridge as playback bridge
participant Transport as transportEvent
User->>AppJS: arm A/B loop end point
AppJS->>Transport: transportEvent('loop-set', loopA, loopB, active)
User->>AppJS: poll getLoop()
AppJS->>AppJS: check (bridgeId, legacySurface) last-call timestamp
alt within 5s interval
AppJS-->>Bridge: skip recordBridgeHit()
else interval elapsed
AppJS->>Bridge: recordBridgeHit()
end
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@static/capabilities/audio-effects.js`:
- Around line 12-13: The inline comment above LEGACY_PLAN_SCHEMA in
audio-effects.js has the wrong affected-version range and conflicts with the PR
intent. Update that comment to match the actual legacy plugin scope described
for the schema alias, keeping the code behavior unchanged, so future maintainers
can correctly identify which rig_builder versions still send the old schema id.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a46c5512-1970-4abe-8e52-703502626f95
📒 Files selected for processing (3)
CHANGELOG.mdstatic/app.jsstatic/capabilities/audio-effects.js
| // Pre-rebrand plugins (rig_builder <= 2.9.x) still send the old schema id — accept it as an alias. | ||
| const LEGACY_PLAN_SCHEMA = 'slopsmith.audio_effects.chain_plan.v1'; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Version number in comment conflicts with PR description.
Comment says rig_builder <= 2.9.x but the PR objectives state the affected legacy plugin version is rig_builder ≤ 3.0.6. Fix the comment to avoid confusing future maintainers about which plugin versions require this alias.
📝 Proposed fix
-// Pre-rebrand plugins (rig_builder <= 2.9.x) still send the old schema id — accept it as an alias.
+// Pre-rebrand plugins (rig_builder <= 3.0.6) still send the old schema id — accept it as an alias.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // Pre-rebrand plugins (rig_builder <= 2.9.x) still send the old schema id — accept it as an alias. | |
| const LEGACY_PLAN_SCHEMA = 'slopsmith.audio_effects.chain_plan.v1'; | |
| // Pre-rebrand plugins (rig_builder <= 3.0.6) still send the old schema id — accept it as an alias. | |
| const LEGACY_PLAN_SCHEMA = 'slopsmith.audio_effects.chain_plan.v1'; |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@static/capabilities/audio-effects.js` around lines 12 - 13, The inline
comment above LEGACY_PLAN_SCHEMA in audio-effects.js has the wrong
affected-version range and conflicts with the PR intent. Update that comment to
match the actual legacy plugin scope described for the schema alias, keeping the
code behavior unchanged, so future maintainers can correctly identify which
rig_builder versions still send the old schema id.
The Slopsmith→fee[dB]ack rebrand renamed
PLAN_SCHEMAtofeedBack.audio_effects.chain_plan.v1, but shipped plugin bundles (rig_builder ≤ 3.0.6) still send the slopsmith-era id._validatePlantherefore rejected every plan ("Provider returned an invalid audio-effects chain plan") and providers fell back to their heavyweight legacy load paths — a full multi-VST chain rebuild per poll cycle, heard as continuous distortion during songs (root cause of the tester distortion reports).Accept the old id as an explicit alias so existing plugin installs keep working. Companion fixes:
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation