fix(vst): channel-derive the shared ext-state namespace (V4↔S4 reconcile)

ext_keys.h's kProjExtNamespace now delegates to app_version::extStateNamespace() so the beta instrument reads "reasampler_beta" — the namespace the beta extension writes — instead of stale stable. Link app_version into reasampler_vst.
This commit is contained in:
2026-07-26 18:46:17 -04:00
parent e9498c4290
commit dc5d36ff43
3 changed files with 26 additions and 11 deletions
+15 -5
View File
@@ -5,18 +5,28 @@
// wire contract cannot drift between the two artifacts (the S4 reviewer flagged the
// spike's duplicated constants as a drift risk).
//
// PURE HEADER: NO REAPER types, NO VST3 types, NO SWELL, NO vendor/ includes. Just
// string constants, so both the REAPER-facing persist shell and the SDK-facing VST
// bridge can include it without pulling either SDK.
// PURE HEADER: NO REAPER types, NO VST3 types, NO SWELL, NO vendor/ includes. The key
// spellings are string constants; the NAMESPACE is channel-derived (Phase V, V4) so it
// delegates to the pure app_version module (also REAPER-free / VST3-free). Both the
// REAPER-facing persist shell and the SDK-facing VST bridge include this without pulling
// either SDK.
//
// FOREVER-STABLE once shipped: these strings key every already-saved project's
// stored state. Changing any of them orphans that state. See persist.h for the
// per-key retirement / migration semantics — this header only owns the spellings.
#include "app_version.h"
namespace reasampler {
// The ext-state namespace all ReaSampler project state is stored under.
inline constexpr const char* kProjExtNamespace = "reasampler";
// The ext-state namespace all ReaSampler project state is stored under. CHANNEL-DERIVED
// (Phase V, V4): delegates to the ONE app_version symbol so the extension (writer) and the
// VST3 instrument (reader) resolve the SAME namespace per channel — "reasampler" on stable,
// "reasampler_beta" on the isolated beta build. An accessor (not a constexpr literal)
// because the value is fixed by the channel bit at build time. This is the wire-contract
// reconciliation between S4 (shared ext_keys) and V4 (channel-isolated namespace): without
// it a beta instrument would read the stable namespace and see empty state.
inline const char* kProjExtNamespace() { return extStateNamespace().c_str(); }
// The multi-bank key: the whole serialized BankBook (pool + named banks). This is
// the key the VST3 instrument reads to see the live bank (read-only, S4). persist.h