diff --git a/.github/workflows/p1-windows.yml b/.github/workflows/p1-windows.yml
index 93e3c2c89..871c4955a 100644
--- a/.github/workflows/p1-windows.yml
+++ b/.github/workflows/p1-windows.yml
@@ -9,6 +9,8 @@ on:
- 'integration/console-v6/**'
- 'src/**'
- 'web/approved-native-bridge.js'
+ - 'web/approved-native-contract.js'
+ - 'tests/approved_native_m2_contract.test.cjs'
- 'scripts/build_approved_native_gui.py'
- 'tests/approved_native_gui_bundle_test.py'
- 'engine/**'
@@ -32,6 +34,8 @@ on:
- 'integration/console-v6/**'
- 'src/**'
- 'web/approved-native-bridge.js'
+ - 'web/approved-native-contract.js'
+ - 'tests/approved_native_m2_contract.test.cjs'
- 'scripts/build_approved_native_gui.py'
- 'tests/approved_native_gui_bundle_test.py'
- 'web/bridge.js'
@@ -91,12 +95,13 @@ jobs:
run: |
# Do not hide earlier Node failures with the exit code of the LAST
# command. One Node invocation also avoids repeated startup costs.
- foreach ($file in @('web/bridge.js', 'web/plugin-ui.js', 'web/monitor.js', 'web/app.js', 'web/mixer-io.js', 'web/mixer-layout.js')) {
+ foreach ($file in @('web/bridge.js', 'web/plugin-ui.js', 'web/monitor.js', 'web/app.js', 'web/mixer-io.js', 'web/mixer-layout.js', 'web/approved-native-contract.js', 'web/approved-native-bridge.js')) {
node --check $file
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
$contracts = @(
'tests/gui_workflow_contract_test.mjs'
+ 'tests/approved_native_m2_contract.test.cjs'
'tests/native_ui_contract_test.mjs'
'tests/native_preset_contract_test.mjs'
'tests/fx_add_contract_test.mjs'
@@ -127,6 +132,8 @@ jobs:
-DJUCE_ROOT="${{ github.workspace }}/third_party/JUCE"
-DBUILD_TESTING=ON
-DJUCE_WEBVIEW2_PACKAGE_LOCATION="${{ github.workspace }}/.deps"
+ - name: Verify exact ONE approved /preview/ GUI CMake bundle
+ run: node scripts/check_approved_native_gui_release.mjs --source-only --bundle build/approved_gui
- name: Build executable and native RT tests
run: cmake --build build --config Release --target ARMixConsole ARMixFactoryFxRegistryTests ARMixFxOrderTests ARMixFxStructuralHandoffTests ARMixMixerRoutingTests ARMixChannelRoutingContractTests ARMixChannelSendTests ARMixPreparedMixerBlockTests ARMixLiveRoutingEpochTests ARMixJucePortMaskTests ARMixNativeMixerSessionTests ARMixNativeDrySendTests ARMixLiveChannelFxTests ARMixDedicatedAuxBusTests ARMixTenChannelLiveControlTests ARMixWorkspaceTests ARMixVaultTests ARMixBackupTests ARMixOrbitPhaseTests ARMixOrbitControlTests ARMixOrbitMotionTests ARMixOrbitDistanceTests ARMixFxBypassEnvelopeTests ARMixDearVrPolarPolicyTests ARMixRTTests ARMixPresetTests ARMixShowSchemaTests ARMixShowStoreTests ARMixLiveShowCaptureTests ARMixNativeMasterLoudnessTests ARMixDiagnosticTests ARMixClockBridgeTests ARMixVirtualClockSoakTests ARMixCadenceTests ARMixCaptureBoundaryTests ARMixCrackleWindowTests ARMixHealthTests ARMixPolicyTests ARMixPeriodEvidenceTests ARMixLifecycleTests ARMixWasapiProbeTests ARMixDualJuceTests ARMixClockSizingTests ARMixIndependentFormatTests ARMixRecoveryTests ARMixStreamWatchdogTests ARMixBridgeContinuityTests ARMixEndpointPolicyTests ARMixEndpointGuardTests ARMixAsioPolicyTests ARMixAsioBackendTests ARMixAsioRegistryIdentityTests ARMixDirectFenceTests --parallel 2
- name: Test realtime control primitives
diff --git a/.github/workflows/ui-smoke.yml b/.github/workflows/ui-smoke.yml
index 3d2884c28..c04be840b 100644
--- a/.github/workflows/ui-smoke.yml
+++ b/.github/workflows/ui-smoke.yml
@@ -19,6 +19,7 @@ on:
- 'tests/wire_graph_canonical_model.test.cjs'
- 'tests/wire_main_native_handoff_contract.test.cjs'
- 'tests/ci_workflow_efficiency_test.mjs'
+ - 'tests/approved_native_m2_contract.test.cjs'
- 'scripts/build_ui_css.py'
- '.github/workflows/ui-smoke.yml'
- '.github/workflows/pages-publish.yml'
@@ -36,6 +37,7 @@ on:
- 'tests/native_ui_contract_test.mjs'
- 'tests/native_orbit_ui_smoke.py'
- 'tests/ci_workflow_efficiency_test.mjs'
+ - 'tests/approved_native_m2_contract.test.cjs'
- 'tests/wire_graph_canonical_model.test.cjs'
- 'tests/wire_main_native_handoff_contract.test.cjs'
- '.github/workflows/ui-smoke.yml'
@@ -77,7 +79,7 @@ jobs:
node --check web/plugin-ui.js
node --check web/mixer-io.js
node --check web/mixer-layout.js
- node --test tests/gui_workflow_contract_test.mjs tests/plugin_ui_contract_test.mjs tests/ci_workflow_efficiency_test.mjs tests/fx_drag_reorder_contract_test.mjs tests/mixer_io_operator_contract_test.mjs tests/mixer_shell_contract_test.mjs
+ node --test tests/gui_workflow_contract_test.mjs tests/plugin_ui_contract_test.mjs tests/ci_workflow_efficiency_test.mjs tests/fx_drag_reorder_contract_test.mjs tests/mixer_io_operator_contract_test.mjs tests/mixer_shell_contract_test.mjs tests/approved_native_m2_contract.test.cjs
- name: Validate approved GUI checkpoint and single publisher
run: python tests/gui_baseline_lock_test.py
- name: CSS V28 zero-regression source-order recovery (every GUI CI run)
diff --git a/scripts/build_approved_native_gui.py b/scripts/build_approved_native_gui.py
index a0a32b4e2..32493f2f2 100644
--- a/scripts/build_approved_native_gui.py
+++ b/scripts/build_approved_native_gui.py
@@ -21,7 +21,8 @@
ROOT = Path(__file__).resolve().parents[1]
CANONICAL = ROOT / "site" / "preview-v2"
NATIVE_ADAPTER = ROOT / "web" / "approved-native-bridge.js"
-ADAPTER_MARKER = ''
+ADAPTER_MARKER = ('\n'
+ '')
SCHEMA = "arsonmix.approved-native-pages-bundle.v2"
@@ -51,11 +52,57 @@ def accepted_pages_html() -> str:
return (build_public_pages(Path(tmp) / "public") / "index.html").read_text("utf-8")
+# Native-only event seam: the original PUBLIC Pages HTML is byte-for-byte
+# unchanged. Insert five small control hooks ONLY into the generated WebView2
+# HTML at native build time. Every anchor must occur exactly once: no silent
+# breakage if Pages GUI source evolves. No extra layout or simulated PCM.
+NATIVE_EVENT_HOOKS = (
+ ("function wireGraphCommit(ops,{record=true}={}){\n",
+ "function wireGraphCommit(ops,{record=true}={}){\n"
+ " if(window.__ARMIX_NATIVE_M2__?.consumeWire?.(ops))return false;\n"),
+ ("function wireWsUndo(){\n",
+ "function wireWsUndo(){\n"
+ " if(window.__ARMIX_NATIVE_M2__?.consumeUndo?.())return false;\n"),
+ ("function handleField(event){\n",
+ "function handleField(event){\n"
+ " if(window.__ARMIX_NATIVE_M2__?.consumeField?.(event))return;\n"),
+ (" if(a==='wireExpand'){document.querySelector('.section-rail",
+ " if(window.__ARMIX_NATIVE_M2__?.consumeAction?.(t,a,btn))return;\n"
+ " if(a==='wireExpand'){document.querySelector('.section-rail"),
+ ("document.querySelector('.console-body').addEventListener('dblclick',e=>{\n"
+ " const t=findTrack(e.target);if(!t)return;\n",
+ "document.querySelector('.console-body').addEventListener('dblclick',e=>{\n"
+ " const t=findTrack(e.target);if(!t)return;\n"
+ " if(window.__ARMIX_NATIVE_M2__?.consumeDoubleClick?.(e,t))return;\n"),
+)
+
+
def native_html(approved: str | None = None) -> str:
- html = accepted_pages_html() if approved is None else approved
+ original = accepted_pages_html() if approved is None else approved
+ newline = "\r\n" if "\r\n" in original else "\n"
+ html = original.replace("\r\n", "\n")
if html.count("