Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
320bf04
refactor(gui G-MV36): pure exact FX HWND dispatch and correlated ACK …
masarray Nov 20, 2026
c6d81a3
refactor(gui G-MV36): one fenced FX editor IPC and one-shot native AC…
masarray Nov 20, 2026
b0b1d10
fix(native gui G-MV36): echo FX editor requestId with real JUCE HWND ACK
masarray Nov 20, 2026
9013aad
test(gui G-MV36): assert ChannelId editor reuses correlated pure leas…
masarray Nov 20, 2026
de20deb
test(gui G-MV36): physical FX editor and native ACK regressions acros…
masarray Nov 20, 2026
498a60a
test(gui G-MV36): align M4 vendor editor contract with one typed disp…
masarray Nov 20, 2026
e419d7e
test(gui G-MV36): preserve accepted global FX readback while retiring…
masarray Nov 20, 2026
7bf0719
test(imersip G-MV36): verify real routed JUCE editor through correlat…
masarray Nov 20, 2026
e364e62
fix(gui G-MV36): reject physical editor lease when offline .smix take…
masarray Nov 20, 2026
4ee4486
fix(gui G-MV36): fence queued native editor after offline workspace s…
masarray Nov 20, 2026
f650659
test(gui G-MV36): offline switch retires queued editor and stale HWND…
masarray Nov 20, 2026
0d2268a
merge(gui G-MV36): reconcile FX editor lifecycle with accepted G-MV37…
masarray Nov 20, 2026
409382b
refactor(gui G-MV38): one allowlisted FX editor surface policy with e…
masarray Nov 20, 2026
83cecbb
test(gui G-MV38): keep ImmerSIB native HWND assertions at new surface…
masarray Nov 20, 2026
ce673e9
merge(int-1): reconcile G-MV36 with current main coordination without…
masarray Nov 20, 2026
fc5450b
merge(gui G-MV38): reconcile INT-1 main/AGENTS and latest G-MV36 parent
masarray Nov 20, 2026
3bc60ce
integrate(INT-1): G-MV36 FX HWND ACK and G-MV38 editor surface on qua…
masarray Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6284,6 +6284,9 @@ class ConsoleWindow final : public juce::DocumentWindow, private juce::Timer, pr
ack->setProperty("ok",opened);
ack->setProperty("error",error);
ack->setProperty("instanceId",token);
// G-MV36: correlate the HWND result to its exact GUI click.
// The requestId is feedback only; it is not installed PCM proof.
ack->setProperty("requestId",args.getProperty("requestId",juce::var()));
if(browser_.loaded)browser_.emitEventIfBrowserIsVisible(
"arMixRoutingFxEditorAck",juce::var(ack.release()));
if(opened)diagnostics_.record("ROUTED_FX_EDITOR_OPENED",
Expand Down
222 changes: 217 additions & 5 deletions tests/approved_native_m2_contract.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2193,7 +2193,8 @@ test("P0 real slot VST3 power and native editor use verified instance tokens",()
assert.match(bridge,/requestAdmittedFxPower\(t,action,btn\)/);
assert.match(bridge,/FX rack unchanged/);
assert.match(bridge,/pendingM4RackPowers/);
assert.match(bridge,/action:"routingFxEditor"/);
assert.match(read("web/approved-fx-rack-view-model.js"),/action:"routingFxEditor"/);
assert.match(bridge,/dispatchPhysicalFxEditor\(plan,lease,"M4"\)/);
assert.match(bridge,/action:plan\.action,requestId,\.\.\.plan\.payload/);
assert.match(read("web/approved-fx-rack-view-model.js"),
/action:"routingFxBypass"/);
Expand Down Expand Up @@ -3617,9 +3618,14 @@ test("ImmerSIB opens the exact native ChannelId HWND, survives VST3 editor, no s
const editorVM=read("web/approved-fx-rack-view-model.js");
assert.match(bridge,/fxRackVM\.editorNavigationPlan\(current,/);
assert.match(editorVM,/view\.raw\?\.mixerSession\?\.authority==="CHANNEL_ID"/);
assert.match(bridge,/else \{\s*\/\/ Both vendor VST3 and ImmerSIB retain their exact real/);
assert.match(bridge,/backend\.emitEvent\("arMixAction",\{action:"routingFxEditor",\s*channelId:editor\.channelId,slot:editor\.slot,/);
assert.match(bridge,/else if\(editor\.authority==="LOGICAL"\)/);
assert.match(bridge,/fxRackVM\.editorSurfacePlan\(current,editor,/);
assert.match(bridge,/surface\.kind==="NATIVE_HOST"/);
assert.match(editorVM,/if\(lease\.authority==="CHANNEL_ID"\)return \{kind:"NATIVE_HOST"\};/);
assert.match(bridge,/openChannelIdFxEditor\(editor\)/);
assert.match(bridge,/fxRackVM\.nativeEditorDispatchPlan\(current,lease,/);
assert.match(bridge,/dispatchPhysicalFxEditor\(plan,lease,"CHANNEL_ID"\)/);
assert.match(bridge,/surface\.kind==="LOGICAL_VENDOR"/);
assert.match(editorVM,/if\(lease\.authority==="LOGICAL"\)return \{kind:"LOGICAL_VENDOR"\};/);
assert.match(bridge,/action:"logicalVendorFxEditor"/);
assert.doesNotMatch(bridge,/else status\("Native VST3 editor opened"\)/);
assert.match(host,/shownWindow=dedicatedImmerSIB\?immersibEditorWindow_:editorWindow_/);
Expand Down Expand Up @@ -4980,7 +4986,9 @@ test("MV-9B bridge uses only accepted native snapshots for global FX, fences M4
"globalPowerSettlement","m4SlotPowerAckResult","m4SlotPowerSettlement"])
assert.match(bridge,new RegExp("fxRackVM\\."+name+"\\("));
assert.match(bridge,/const current=controller\?\.state\(\)\?\.current;\s*const button=document\.getElementById\?\.\("globalFxToggle"\)/);
assert.match(bridge,/onAccepted:\(next,confirmed\)=>\{\s*onNativeReadback\(next,confirmed\);\s*syncGlobalFxReadback\(\);/);
assert.match(bridge,/onAccepted:\(next,confirmed\)=>\{\s*onNativeReadback\(next,confirmed\);/);
assert.match(bridge,/fxRackVM\.nativeEditorAckResult\(pendingFxEditorAck,null,accepted,/);
assert.match(bridge,/pendingFxEditorAck=null;\s*syncGlobalFxReadback\(\);/);
assert.match(bridge,/const apply=\(\)=>controller\.onSnapshot\(snapshot\);/);
assert.doesNotMatch(bridge,/controller\.onSnapshot\(snapshot\);syncGlobalFxReadback/);
assert.doesNotMatch(bridge,/const actual=snapshot\?\.globalFxBypassed;/);
Expand Down Expand Up @@ -6399,6 +6407,144 @@ test("G-MV35 native MOVE/REMOVE FX demands installed ChannelId hardware owner",(
assert.doesNotMatch(pure,/backend\.emitEvent|document\.|window\.|setTimeout/);
});

test("G-MV36 ChannelId vendor FX editor dispatch retains exactly one physical instance lease",()=>{
const channelId="9007199254740993",epoch="31",revision="45",rosterRevision="18";
const device={epoch,sampleRate:48000,bufferFrames:256,
enabledInputs:[0,1],enabledOutputs:[0,1]};
const hardwareConfiguration=protocol.nativeHardwareConfiguration(device);
const snap={admitted:true,retained:false,device,raw:{
mixerSession:{authority:"CHANNEL_ID",deviceEpoch:epoch}},graph:{
revision,rosterRevision,capabilities:{callbackOwnsChannelIds:true},
channels:[{id:channelId,role:"INPUT",inserts:[
{id:"vst3-instance",catalogId:"vendor.alpha",bypassed:false}]}]
}};
const original=JSON.stringify(snap);
const navigation=fxRackVM.editorNavigationPlan(snap,{
channelId,slot:0,hardwareConfiguration});
assert.equal(navigation.kind,"OPEN");
assert.equal(navigation.lease.authority,"CHANNEL_ID");
const plan=(snapshot=snap,lease=navigation.lease,hw=hardwareConfiguration)=>
fxRackVM.nativeEditorDispatchPlan(snapshot,lease,{hardwareConfiguration:hw});
assert.deepEqual(plan(),{kind:"READY",action:"routingFxEditor",payload:{
channelId,slot:0,instanceId:"vst3-instance",deviceEpoch:epoch,revision}});
assert.equal(Object.isFrozen(navigation.lease),true);
for(const bad of [null,{}, {...navigation.lease,authority:"LOGICAL"},
{...navigation.lease,workspaceToken:"other"}, {...navigation.lease,slot:1}])
assert.equal(plan(snap,bad).kind,"UNAVAILABLE");
for(const mutate of [
s=>{s.device.epoch="32";},s=>{s.device.enabledInputs=[2,3];},
s=>{s.raw.mixerSession.authority="M4";},
s=>{s.raw.mixerSession.deviceEpoch="32";},
s=>{s.admitted=false;},s=>{s.retained=true;},
s=>{s.graph.revision="46";},s=>{s.graph.rosterRevision="19";},
s=>{s.graph.capabilities.callbackOwnsChannelIds=false;},
s=>{s.graph.channels[0].inserts[0].id="replacement";},
s=>{s.graph.channels[0].inserts[0].catalogId="vendor.beta";},
s=>{s.graph.channels[0].inserts=[];}
]){
const next=clone(snap);mutate(next);
assert.equal(plan(next,navigation.lease,
protocol.nativeHardwareConfiguration(next.device)).kind,"UNAVAILABLE");
}
assert.equal(plan(snap,navigation.lease,"wrong-device").kind,"UNAVAILABLE");
assert.equal(fxRackVM.nativeEditorDispatchPlan(snap,navigation.lease,{
hardwareConfiguration,offline:true}).kind,"UNAVAILABLE");
assert.equal(JSON.stringify(snap),original,"pure editor plan never writes PCM");
});
test("G-MV36 correlated FX HWND ACK guards request, device, roster, and plugin instance",()=>{
const channelId="9007199254740993",epoch="51",revision="46";
const device={epoch,sampleRate:48000,bufferFrames:256,
enabledInputs:[0,1],enabledOutputs:[0,1]};
const hardwareConfiguration=protocol.nativeHardwareConfiguration(device);
const native={admitted:true,retained:false,device,raw:{
mixerSession:{authority:"CHANNEL_ID",deviceEpoch:epoch}},graph:{
revision,rosterRevision:"19",capabilities:{callbackOwnsChannelIds:true},
channels:[{id:channelId,role:"INPUT",inserts:[
{id:"native-fx-8",catalogId:"vendor.vst3"}]}]
}};
const nav=fxRackVM.editorNavigationPlan(native,{
channelId,slot:0,hardwareConfiguration});
assert.equal(nav.kind,"OPEN");
const pending={authority:"CHANNEL_ID",requestId:"fx-editor-7",lease:nav.lease};
const verdict=(p=pending,ack=null,snapshot=native,hw=hardwareConfiguration)=>
fxRackVM.nativeEditorAckResult(p,ack,snapshot,{
hardwareConfiguration:hw,verifiedM4:true});
assert.equal(verdict(null,{requestId:pending.requestId,
instanceId:"native-fx-8",ok:true}),"IGNORE");
assert.equal(verdict(),"IGNORE");
assert.equal(verdict(pending,{requestId:"old",instanceId:"native-fx-8",
ok:false}),"IGNORE");
assert.equal(verdict(pending,{requestId:pending.requestId,
instanceId:"wrong",ok:true}),"REJECTED");
assert.equal(verdict(pending,{requestId:pending.requestId,
instanceId:"native-fx-8",ok:false}),"REJECTED");
assert.equal(verdict(pending,{requestId:pending.requestId,
instanceId:"native-fx-8",ok:true}),"ACKED");
assert.equal(verdict(pending,{instanceId:"native-fx-8",ok:true}),"IGNORE");
assert.equal(fxRackVM.nativeEditorAckResult(pending,null,native,{
hardwareConfiguration,offline:true}),"STALE");
for(const mutate of [
s=>{s.graph.rosterRevision="20";},
s=>{s.graph.revision="47";},
s=>{s.graph.channels[0].inserts[0].id="retired";},
s=>{s.raw.mixerSession.authority="M4";},
s=>{s.device.enabledOutputs=[2,3];}
]){
const updated=clone(native);mutate(updated);
const hw=protocol.nativeHardwareConfiguration(updated.device);
assert.equal(verdict(pending,null,updated,hw),"STALE");
assert.equal(verdict(pending,{requestId:pending.requestId,
instanceId:"native-fx-8",ok:true},updated,hw),"STALE");
}
const m4Device={epoch:"55",sampleRate:48000,bufferFrames:256,
enabledInputs:[0,1],enabledOutputs:[0,1]};
const m4Hw=protocol.nativeHardwareConfiguration(m4Device);
const m4={admitted:false,retained:false,device:m4Device,raw:{
mixerSession:{authority:"M4",deviceEpoch:"55",routeRevision:"12",
channels:Array.from({length:10},()=>({role:"INPUT"}))},
legacyM4:{active:true,routeAccepted:true,nativeBusStructural:false,
routingRevision:"12",fxInstances:Array.from({length:10},()=>[])}
}};
m4.raw.legacyM4.fxInstances[4][0]={
instanceId:"m4-fx",catalogId:"vendor.m4",bypassed:false};
const accepted=fxRackVM.m4EditorDispatchPlan(m4,{
channel:4,slot:0,instanceId:"m4-fx",deviceEpoch:55,revision:12,
verifiedM4:true,hardwareConfiguration:m4Hw});
assert.equal(accepted.kind,"READY");
const m4Pending={requestId:"fx-editor-9",authority:"M4",lease:accepted.lease};
const m4Result=(p=m4Pending,ack=null,snapshot=m4,hw=m4Hw)=>
fxRackVM.nativeEditorAckResult(p,ack,snapshot,{
verifiedM4:true,hardwareConfiguration:hw});
assert.equal(m4Result(),"IGNORE");
assert.equal(m4Result(m4Pending,{requestId:"fx-editor-7",
instanceId:"m4-fx",ok:true}),"IGNORE");
assert.equal(m4Result(m4Pending,{requestId:"fx-editor-9",
instanceId:"m4-fx",ok:true}),"ACKED");
const replacement=clone(m4);
replacement.raw.legacyM4.fxInstances[4][0].catalogId="other";
assert.equal(m4Result(m4Pending,null,replacement),"STALE");
assert.equal(m4Result(m4Pending,null,m4,"old-hardware"),"STALE");
assert.equal(m4Result({...m4Pending,authority:"LOGICAL"}),"STALE");
});
test("G-MV36 one correlated native editor transport and JUCE echo, no duplicate toast",()=>{
const bridge=read("web/approved-native-bridge.js"),
main=read("src/Main.cpp"),viewmodel=read("web/approved-fx-rack-view-model.js");
assert.match(main,/if \(action == "routingFxEditor"\) \{/);
assert.match(main,/ack->setProperty\("requestId",args\.getProperty\("requestId",juce::var\(\)\)\);/);
assert.match(main,/ack->setProperty\("instanceId",token\);/);
assert.match(bridge,/function dispatchPhysicalFxEditor\(plan,lease,authority\)/);
assert.match(bridge,/backend\.emitEvent\("arMixAction",\{action:plan\.action,requestId,\.\.\.plan\.payload\}\);/);
assert.match(bridge,/dispatchPhysicalFxEditor\(plan,lease,"M4"\)/);
assert.match(bridge,/dispatchPhysicalFxEditor\(plan,lease,"CHANNEL_ID"\)/);
assert.match(bridge,/if\(logicalView\|\|fxRackVM\.nativeEditorDispatchPlan\(current,lease,/);
assert.match(bridge,/pendingFxEditorAck=null; \/\/ expire old native HWND/);
assert.match(bridge,/fxRackVM\.nativeEditorAckResult\(pendingFxEditorAck,ack,accepted,/);
assert.match(bridge,/if\(verdict==="IGNORE"\)return; \/\/ obsolete, duplicate or unrelated ACK/);
assert.match(bridge,/fxRackVM\.nativeEditorAckResult\(pendingFxEditorAck,null,accepted,/);
assert.doesNotMatch(bridge,/if\(ack\?\.ok!==true\)\s*nativeToast\(ack\?\.error\|\|/);
assert.doesNotMatch(viewmodel,/backend\.emitEvent|document\.|window\.|setTimeout/);
});

test("G-MV37 one physical ChannelId M/ST policy validates exact accepted input",()=>{
const id="9007199254740993",hw="asio|48000|256|0,1|0,1";
const graph={revision:"45",rosterRevision:"8",
Expand Down Expand Up @@ -6489,3 +6635,69 @@ test("G-MV37 M4 M/ST reuses exact existing routed channel patch",()=>{
assert.match(section,/dispatchM4ChannelPatch\(t,plan\.operation,plan\.target,plan\.channel\)/);
assert.doesNotMatch(section,/const target=.*processingFormat|channelFormat===/);
});

test("G-MV38 editor surface routing has one allowlisted browser owner; future FX remain native",()=>{
const channelId="9007199254740993",epoch="53";
const device={epoch,sampleRate:48000,bufferFrames:256,
enabledInputs:[0,1],enabledOutputs:[0,1]};
const hardwareConfiguration=protocol.nativeHardwareConfiguration(device);
const view={admitted:true,retained:false,device,raw:{
mixerSession:{authority:"CHANNEL_ID",deviceEpoch:epoch}},graph:{
revision:"72",rosterRevision:"11",
capabilities:{callbackOwnsChannelIds:true},
channels:[{id:channelId,role:"INPUT",inserts:[
{id:"native-fx-instance",catalogId:"vendor.vst3"}]}]}};
const project=(catalogId,snapshot=view,hw=hardwareConfiguration)=>{
const fx=snapshot.graph.channels[0].inserts[0];
fx.catalogId=catalogId;
const nav=fxRackVM.editorNavigationPlan(snapshot,{channelId,slot:0,
hardwareConfiguration:hw});
assert.equal(nav.kind,"OPEN");
return {lease:nav.lease,result:fxRackVM.editorSurfacePlan(snapshot,nav.lease,
{hardwareConfiguration:hw})};
};
const allowlisted=[
["armix.builtin.channel-eq.v1","ArSonMixNativeEq"],
["armix.builtin.channel-compressor.v1","ArSonMixNativeCompressor"],
["armix.builtin.arson-harmony.v1","ArSonMixNativeHarmony"],
["armix.builtin.vocal-throw.v1","ArSonMixNativeVocalThrow"],
["armix.builtin.8d-sonku.v1","ArSonMixNativeSonKu"]
];
for(const [id,windowKey] of allowlisted){
const {result}=project(id);
assert.deepEqual(result,{kind:"BROWSER",windowKey});
}
for(const id of ["vendor.vst3","armix.builtin.graphic-eq31.v1",
"armix.builtin.immersib.v1","__proto__"]){
assert.deepEqual(project(id).result,{kind:"NATIVE_HOST"},
"non-allowlisted catalogs cannot choose an arbitrary browser host");
}
const {lease}=project("vendor.vst3");
assert.deepEqual(fxRackVM.editorSurfacePlan(view,lease,{
hardwareConfiguration:"wrong-hardware"}),{kind:"UNAVAILABLE"});
const stale=JSON.parse(JSON.stringify(view));
stale.graph.revision="73";
assert.deepEqual(fxRackVM.editorSurfacePlan(stale,lease,{
hardwareConfiguration}),{kind:"UNAVAILABLE"});
const offline=JSON.parse(JSON.stringify(view));
offline.logical=true;offline.admitted=false;offline.workspaceToken="saved-workspace";
offline.raw.mixerSession.authority="LOGICAL";
const logicalLease=fxRackVM.editorNavigationPlan(offline,{
channelId,slot:0}).lease;
assert.deepEqual(fxRackVM.editorSurfacePlan(offline,logicalLease),
{kind:"LOGICAL_VENDOR"});
offline.graph.channels[0].inserts[0].catalogId="armix.builtin.arson-harmony.v1";
const builtInLogical=fxRackVM.editorNavigationPlan(offline,{
channelId,slot:0}).lease;
assert.deepEqual(fxRackVM.editorSurfacePlan(offline,builtInLogical),
{kind:"BROWSER",windowKey:"ArSonMixNativeHarmony"},
"existing offline built-in editor remains available");
assert.deepEqual(fxRackVM.editorSurfacePlan(null,lease),
{kind:"UNAVAILABLE"});
const bridge=read("web/approved-native-bridge.js");
assert.match(bridge,/fxRackVM\.editorSurfacePlan\(current,editor,/);
assert.match(bridge,/const host=window\[surface\.windowKey\]/);
assert.match(bridge,/openChannelIdFxEditor\(editor\)/);
assert.match(bridge,/action:"logicalVendorFxEditor"/);
assert.doesNotMatch(bridge,/if\(editor\.catalogId==='armix\.builtin/);
});
10 changes: 5 additions & 5 deletions tests/imersip_p92_catalog_contract_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ def test_immersib_rack_opens_real_native_editor_without_fake_toast(self):
host=source("src/Main.cpp")
self.assertIn("fxRackVM.editorNavigationPlan(current,",bridge)
self.assertIn('view.raw?.mixerSession?.authority==="CHANNEL_ID"',editor_vm)
self.assertRegex(bridge,
r'backend\.emitEvent\("arMixAction",\{action:"routingFxEditor",\s*'
r'channelId:editor\.channelId,slot:editor\.slot,\s*'
r'instanceId:editor\.instanceId,deviceEpoch:editor\.deviceEpoch,\s*'
r'revision:editor\.graphRevision\}\)')
self.assertIn("openChannelIdFxEditor(editor)",bridge)
self.assertIn("fxRackVM.nativeEditorDispatchPlan(current,lease,",bridge)
self.assertIn('dispatchPhysicalFxEditor(plan,lease,"CHANNEL_ID")',bridge)
self.assertIn('action:"routingFxEditor"',editor_vm)
self.assertIn('ack->setProperty("requestId",args.getProperty("requestId",juce::var()))',host)
self.assertNotIn('else status("Native VST3 editor opened")',bridge)
self.assertIn("ImerSipP92Editor*>(editor)",host)
self.assertIn("std::make_unique<PluginEditorWindow>",host)
Expand Down
5 changes: 4 additions & 1 deletion tests/native_harmony_assembly_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def test_native_catalog_bridge_and_editor(self):
# User-facing FX picker and graph/snapshot names change together,
# while persisted catalog identity and browser editor hook are stable.
self.assertIn("armix.builtin.arson-harmony.v1",self.bridge)
self.assertIn("window.ArSonMixNativeHarmony?.open(t,slot)",self.bridge)
vm=(ROOT/"web/approved-fx-rack-view-model.js").read_text("utf-8")
self.assertIn('"armix.builtin.arson-harmony.v1":"ArSonMixNativeHarmony"',vm)
self.assertIn("const host=window[surface.windowKey]",self.bridge)
self.assertIn("fxRackVM.editorSurfacePlan(current,editor,",self.bridge)
self.assertIn('data-fast-native-harmony="1"><span class="fast-effect-title">Harmonice</span>',self.html)
self.assertNotIn('data-fast-native-harmony="1"><span class="fast-effect-title">ArSon Harmony</span>',self.html)
self.assertIn("['harmonice','arson harmony','harmony','vocal harmony','built-in fx']",self.html)
Expand Down
Loading
Loading