From c2a8627d61c8ad3d4ce36746509f030cc85e4bf3 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:39:44 +0700 Subject: [PATCH 1/8] feat(audio): expose source-only verified capture and MAIN PCM evidence for First Sound --- integration/FirstSoundSignalEvidence.h | 93 ++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 integration/FirstSoundSignalEvidence.h diff --git a/integration/FirstSoundSignalEvidence.h b/integration/FirstSoundSignalEvidence.h new file mode 100644 index 000000000..acfc646be --- /dev/null +++ b/integration/FirstSoundSignalEvidence.h @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: AGPL-3.0-only +#pragma once +#include +#include +#include + +// JUCE MESSAGE-thread evidence projection. Raw values come ONLY from the +// installed LiveAudioEngine callback atomics; this does not produce PCM, +// read the audio device, invent a signal, or claim audible speaker output. +namespace armix::console { +inline bool evidenceFlag(const juce::var& o, const char* name, bool expected) { + const auto v=o.getProperty(name,{}); + return v.isBool() && static_cast(v)==expected; +} +inline bool evidenceInteger(const juce::var& v, double& n) { + if(!(v.isInt()||v.isInt64()||v.isDouble()))return false; + n=static_cast(v); + return std::isfinite(n) && n>=0.0 && n<=9007199254740991.0 + && std::floor(n)==n; +} +inline bool evidencePeak(const juce::var& v, double& peak) { + if(!(v.isInt()||v.isInt64()||v.isDouble()))return false; + peak=static_cast(v); + return std::isfinite(peak) && peak>=0.0 && peak<=1.0; +} +inline juce::var projectFirstSoundSignalEvidence( + const juce::var& live, bool verifiedDirectOpen, + bool primaryOutputArmed, int activeInputCount, int activeOutputCount) +{ + auto t=std::make_unique(); + // Empty/never-called capture must be UNKNOWN, not a synthetic zero + // that misleadingly suggests a working microphone or driver. + t->setProperty("captureObserved",false); + t->setProperty("rawCapturePresent",false); + t->setProperty("rawCapturePeak",juce::var()); + t->setProperty("captureCallbackPeaks",juce::var(juce::Array{})); + t->setProperty("mainPcmObserved",false); + t->setProperty("mainPcmPresent",false); + t->setProperty("mainPcmPeak",juce::var()); + t->setProperty("monitorPcmPresent",false); + if(!live.isObject() || !verifiedDirectOpen || + activeInputCount<=0 || activeInputCount>64 || + activeOutputCount<2 || activeOutputCount>64) + return juce::var(t.release()); + const auto route=live.getProperty("dryRoutingLab",{}); + if(!route.isObject() || + !evidenceFlag(live,"connected",true) || + !evidenceFlag(live,"directRouteAuthorized",true) || + !evidenceFlag(live,"adaptiveClockActive",false) || + !evidenceFlag(route,"active",true) || + !evidenceFlag(route,"ready",true) || + !evidenceFlag(route,"topologyFault",false)) + return juce::var(t.release()); + double observations=0.,inCount=0.,outCount=0.,inputPeak=0.; + if(!evidenceInteger(live.getProperty("captureObservationBlocks",{}),observations) || + observations<1. || + !evidenceInteger(live.getProperty("callbackInputChannels",{}),inCount) || + !evidenceInteger(live.getProperty("callbackOutputChannels",{}),outCount) || + inCount!=activeInputCount || outCount!=activeOutputCount || + !evidencePeak(live.getProperty("inputPeak",{}),inputPeak)) + return juce::var(t.release()); + const auto peaks=live.getProperty("captureCallbackPeaks",{}); + const auto* list=peaks.getArray(); + if(!list || list->size()!=activeInputCount) + return juce::var(t.release()); + juce::Array verifiedPeaks; + for(const auto& value:*list) { + double peak=0.; + if(!evidencePeak(value,peak)) + return juce::var(t.release()); + verifiedPeaks.add(peak); + } + t->setProperty("captureObserved",true); + t->setProperty("rawCapturePeak",inputPeak); + t->setProperty("rawCapturePresent",inputPeak>0.0005); + t->setProperty("captureCallbackPeaks",juce::var(verifiedPeaks)); + // MAIN telemetry is measured *post* fader/FX/output gate, but remains + // PCM evidence only: it can never certify actual DAC/earphone playback. + if(primaryOutputArmed && + evidenceFlag(route,"hasAcceptedRoute",true) && + evidenceFlag(live,"monitor",true)) { + double left=0.,right=0.; + if(evidencePeak(live.getProperty("peakLeft",{}),left) && + evidencePeak(live.getProperty("peakRight",{}),right)) { + const auto peak=juce::jmax(left,right); + t->setProperty("mainPcmObserved",true); + t->setProperty("mainPcmPeak",peak); + t->setProperty("mainPcmPresent",peak>0.0005); + } + } + return juce::var(t.release()); +} +} // namespace armix::console From a98eb8d7827557814f1b3ad57e2f7afb71f43761 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:40:04 +0700 Subject: [PATCH 2/8] fix(first-sound): replace fake G0 zero meters with guarded callback PCM evidence --- src/ApprovedConsoleNativeTransportV6.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/ApprovedConsoleNativeTransportV6.h b/src/ApprovedConsoleNativeTransportV6.h index 240e21fb8..843d263bd 100644 --- a/src/ApprovedConsoleNativeTransportV6.h +++ b/src/ApprovedConsoleNativeTransportV6.h @@ -1,6 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-only #pragma once #include +#include "../integration/FirstSoundSignalEvidence.h" #include #include #include @@ -107,12 +108,15 @@ inline juce::var snapshot (const juce::var& live, graph->setProperty ("capabilities", juce::var (caps.release())); root->setProperty ("graph", juce::var (graph.release())); - auto telemetry = std::make_unique(); - telemetry->setProperty ("rawCapturePresent", false); - telemetry->setProperty ("rawCapturePeak", 0.0); - telemetry->setProperty ("mainPcmPresent", false); - telemetry->setProperty ("monitorPcmPresent", false); - root->setProperty ("telemetry", juce::var (telemetry.release())); + // The original G0 snapshot published fixed FALSE/0 for raw capture, + // hiding actual driver PCM even while a verified unpatched callback ran. + // Read the existing engine atomics via the same JUCE message-thread + // snapshot. Keep UNKNOWN when callbacks/ports are stale or unavailable. + root->setProperty ("telemetry",armix::console::projectFirstSoundSignalEvidence ( + live, active != nullptr && active->isOpen() && direct, + primaryOutputArmed, + active != nullptr ? active->getActiveInputChannels().countNumberOfSetBits() : 0, + active != nullptr ? active->getActiveOutputChannels().countNumberOfSetBits() : 0)); return juce::var (root.release()); } From 81c3cbcf18ce8cedf7ebde1cdc11a5e76b8423a6 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:40:31 +0700 Subject: [PATCH 3/8] fix(meter): preserve genuine over-zero-dBFS clipped input peaks rather than hiding signal --- integration/FirstSoundSignalEvidence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/FirstSoundSignalEvidence.h b/integration/FirstSoundSignalEvidence.h index acfc646be..47656e3d6 100644 --- a/integration/FirstSoundSignalEvidence.h +++ b/integration/FirstSoundSignalEvidence.h @@ -21,7 +21,7 @@ inline bool evidenceInteger(const juce::var& v, double& n) { inline bool evidencePeak(const juce::var& v, double& peak) { if(!(v.isInt()||v.isInt64()||v.isDouble()))return false; peak=static_cast(v); - return std::isfinite(peak) && peak>=0.0 && peak<=1.0; + return std::isfinite(peak) && peak>=0.0 && peak<=16.0; } inline juce::var projectFirstSoundSignalEvidence( const juce::var& live, bool verifiedDirectOpen, From 10b0ae4020f4691e9f2edb7d130ce80b20989fd4 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:41:34 +0700 Subject: [PATCH 4/8] feat(first-sound): pure tested RAW input/MAIN PCM diagnosis from real callback readback --- web/approved-native-contract.js | 39 ++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/web/approved-native-contract.js b/web/approved-native-contract.js index b3d323c5b..264fb72b1 100644 --- a/web/approved-native-contract.js +++ b/web/approved-native-contract.js @@ -182,6 +182,43 @@ return false; }); } + // Read-only operator diagnosis from verified Windows callback evidence. + // UI-only: this routine cannot patch, ARM, create PCM or certify speakers. + function diagnoseFirstSound(snapshot, selectedPhysicalPort=null) { + const d=snapshot?.device, t=snapshot?.telemetry, m4=snapshot?.raw?.legacyM4; + const opened=Boolean(d && d.sampleRate>0 && Array.isArray(d.enabledOutputs) && + d.enabledOutputs.length>=2 && Array.isArray(d.enabledInputs) && d.enabledInputs.length>0); + const measured=x=>typeof x==="number"&&Number.isFinite(x)&&x>=0&&x<=16?x:null; + const dbfs=x=>x===null?"N/A":x===0?"−∞ dBFS": + (20*Math.log10(x)).toFixed(1)+" dBFS"; + const endpoints=Array.isArray(d?.inputEndpoints)?d.inputEndpoints:[]; + const physical=selectedPhysicalPort===null||selectedPhysicalPort===""? + null:Number(selectedPhysicalPort); + const pin=Number.isInteger(physical)?endpoints.find(p=> + p.port===physical && p.active===true && d.enabledInputs.includes(p.port)):null; + const observed=t?.captureObserved===true; + const portPeak=pin && Array.isArray(t?.captureCallbackPeaks)? + measured(t.captureCallbackPeaks[pin.callback]):null; + const raw=observed?(pin?portPeak:measured(t?.rawCapturePeak)):null; + const mainObserved=t?.mainPcmObserved===true; + const main=mainObserved?measured(t?.mainPcmPeak):null; + let nextAction; + if(!opened)nextAction="Choose verified input and output devices in Audio Setup."; + else if(m4?.active!==true)nextAction="Native mixer not ready; check verified DIRECT device."; + else if(!observed)nextAction="No current-epoch capture callback evidence; verify driver and inputs."; + else if(pin && raw===0)nextAction="Selected input is silent; check physical source and input gain."; + else if(raw===null)nextAction="Capture peak unavailable; do not assume an active source."; + else if(m4.routeAccepted!==true)nextAction="PATCH CH1 to the selected hardware input."; + else if(d.outputArmed!==true)nextAction="Patch accepted; lower volume then ARM output."; + else if(!mainObserved)nextAction="No MAIN PCM measurement; check routing and output state."; + else if(main===0)nextAction="MAIN PCM silent; check CH1 fader/MUTE and MASTER MUTE."; + else nextAction="MAIN PCM measured; verify headphone/speaker sound physically."; + const label=pin?"IN "+(pin.port+1):"ALL INPUTS"; + return Object.freeze({captureObserved:observed,mainPcmObserved:mainObserved, + rawPeak:raw,mainPeak:main,rawDbfs:dbfs(raw),mainDbfs:dbfs(main), + selectedPin:pin?.port??null,nextAction, + readout:label+" "+dbfs(raw)+" · MAIN PCM "+dbfs(main)}); + } function createController({emit, onStatus=()=>{}, onAccepted=()=>{}}) { if (typeof emit !== "function") throw Error("Native emitter required"); let current = null, pending = null, lastRequest = 0, lastError = "NATIVE_NOT_SUBSCRIBED"; @@ -298,5 +335,5 @@ } return Object.freeze({subscribe,onSnapshot,onAck,intent,state,expire}); } - return Object.freeze({decimal,cmp,normalizeSnapshot,readbackProvesIntent,createController}); + return Object.freeze({decimal,cmp,normalizeSnapshot,readbackProvesIntent,diagnoseFirstSound,createController}); }); From 87baf5800a4295ba468a6addc988c24209ac3288 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:41:53 +0700 Subject: [PATCH 5/8] feat(gui): show genuine RAW input/MAIN PCM levels and actionable First Sound fault stage in existing More menu --- web/approved-native-bridge.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/web/approved-native-bridge.js b/web/approved-native-bridge.js index 4de3e37aa..7e548a6e3 100644 --- a/web/approved-native-bridge.js +++ b/web/approved-native-bridge.js @@ -170,7 +170,9 @@ d.outputArmed?"Output armed":"Output muted"; const warning=document.querySelector?.(".status-bar .warning"); if(warning)warning.textContent=!deviceOpen?"NO VERIFIED AUDIO DEVICE": - next.admitted&&d.outputArmed?"REAL NATIVE PCM · FAT PENDING": + d.outputArmed?(next.admitted?"NATIVE PCM · HARDWARE FAT PENDING": + "MAIN ARMED · PCM NOT YET ADMITTED"): + legacy()?.routeAccepted?"INPUT PATCHED · OUTPUT MUTED": "NO AUDIBLE OUTPUT · PATCH INPUT + ARM"; if(!inputSelect)return; const pins=deviceOpen?d.inputEndpoints.filter(p=> @@ -197,12 +199,14 @@ if(armBtn)armBtn.disabled=!deviceReady() || legacy()?.routeAccepted!==true || d.outputArmed; if(muteBtn)muteBtn.disabled=!deviceOpen || !d.outputArmed; - if(hardwareNote)hardwareNote.textContent=!deviceOpen? - "Open Audio Setup: select a real input and output.": - !deviceReady()?"Verify ASIO/WASAPI input/output masks.": - !legacy()?.routeAccepted?"Select input, PATCH CH1, then ARM output.": - !d.outputArmed?"Input patch accepted. Reduce speaker volume before ARM.": - "User-armed output · check physical sound and native meter."; + if(hardwareNote) { + const evidence=protocol.diagnoseFirstSound?.(next,inputSelect.value); + // Human-readable PCM stages from the ORIGINAL native callback only. + // These values are NOT evidence that the DAC or speaker is audible. + hardwareNote.textContent=evidence? + evidence.readout+" · "+evidence.nextAction: + "No verified hardware PCM readback available."; + } } function installFirstSoundMenu() { const menu=document.querySelector?.("#moreTools .more-tools-panel"); @@ -271,7 +275,7 @@ flags.productionCallbackLive=false;flags.acceptedGraphConnected=false; lastPaintedSignature=""; stopDemo(); - status("NATIVE G0 · perangkat aktual terbaca; ChannelId PCM/WIRE belum diterima. Edit audio diblokir."); + status("NATIVE G0 · PATCH CH1/ARM tersedia pada device terverifikasi; kontrol ChannelId/WIRE menunggu PCM native."); return; } // Control readback may change at the SAME structural graph revision. From e84c0c245f09bd3b6ed230d03d2b9a3f0780b794 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:42:26 +0700 Subject: [PATCH 6/8] test(native): prove First Sound RAW pin and MAIN PCM evidence; reject stale/no-callback/fault paths --- tests/approved_native_v8_projection_test.cpp | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/tests/approved_native_v8_projection_test.cpp b/tests/approved_native_v8_projection_test.cpp index 2248338c4..335593c5a 100644 --- a/tests/approved_native_v8_projection_test.cpp +++ b/tests/approved_native_v8_projection_test.cpp @@ -3,6 +3,7 @@ #include "../integration/ApprovedNativeV8Projection.h" #include "../integration/ApprovedNativeControlIntent.h" #include "../integration/ApprovedNativeRuntimeSnapshot.h" +#include "../integration/FirstSoundSignalEvidence.h" #if defined(NDEBUG) #undef NDEBUG #endif @@ -397,6 +398,65 @@ static void firstSoundRouteAdmissionRegression() { assert(!publishVerifiedFirstSoundState(withoutInput,live)); } +static void firstSoundMeasuredSignalEvidenceRegression() { + auto live=parse(R"JSON({ + "connected":true,"directRouteAuthorized":true, + "adaptiveClockActive":false,"monitor":true, + "captureObservationBlocks":19, + "callbackInputChannels":2,"callbackOutputChannels":2, + "inputPeak":0.35,"captureCallbackPeaks":[0.0,0.35], + "peakLeft":0.08,"peakRight":0.12, + "dryRoutingLab":{"active":true,"ready":true,"topologyFault":false, + "hasAcceptedRoute":true} + })JSON"); + const auto signal=[&](const juce::var& l,bool direct,bool arm,int ins=2,int outs=2) { + return projectFirstSoundSignalEvidence(l,direct,arm,ins,outs); + }; + const auto accepted=signal(live,true,true); + assert(static_cast(accepted.getProperty("captureObserved",false))); + assert(static_cast(accepted.getProperty("rawCapturePresent",false))); + assert(static_cast(accepted.getProperty("mainPcmObserved",false))); + assert(static_cast(accepted.getProperty("mainPcmPresent",false))); + assert(std::abs(static_cast(accepted.getProperty("rawCapturePeak",0.))-0.35)<1e-7); + assert(std::abs(static_cast(accepted.getProperty("mainPcmPeak",0.))-0.12)<1e-7); + assert(accepted.getProperty("captureCallbackPeaks",{}).getArray()->size()==2); + // An active unpatched graph still observes real input while correctly + // hiding routed MAIN PCM. No physical output is ever auto-authorized. + live.getProperty("dryRoutingLab",{}).getDynamicObject() + ->setProperty("hasAcceptedRoute",false); + auto unpatched=signal(live,true,true); + assert(static_cast(unpatched.getProperty("captureObserved",false))); + assert(!static_cast(unpatched.getProperty("mainPcmObserved",true))); + live.getProperty("dryRoutingLab",{}).getDynamicObject() + ->setProperty("hasAcceptedRoute",true); + auto disarmed=signal(live,true,false); + assert(static_cast(disarmed.getProperty("captureObserved",false))); + assert(!static_cast(disarmed.getProperty("mainPcmObserved",true))); + live.getDynamicObject()->setProperty("inputPeak",0.); + live.getDynamicObject()->setProperty("captureCallbackPeaks",parse( + R"JSON({"peaks":[0,0]})JSON").getProperty("peaks",{})); + auto silence=signal(live,true,true); + assert(static_cast(silence.getProperty("captureObserved",false))); + assert(!static_cast(silence.getProperty("rawCapturePresent",true))); + assert(!silence.getProperty("rawCapturePeak",{}).isVoid()); + live.getDynamicObject()->setProperty("inputPeak",0.35); + // Driver callback never occurred (or is stale): evidence UNKNOWN rather + // than a fabricated 0 dBFS or reported hardware source. + live.getDynamicObject()->setProperty("captureObservationBlocks",0); + auto none=signal(live,true,true); + assert(!static_cast(none.getProperty("captureObserved",true))); + assert(none.getProperty("rawCapturePeak",{}).isVoid()); + live.getDynamicObject()->setProperty("captureObservationBlocks",19); + assert(!static_cast(signal(live,false,true).getProperty("captureObserved",true))); + assert(!static_cast(signal(live,true,true,1,2) + .getProperty("captureObserved",true))); + live.getDynamicObject()->setProperty("directRouteAuthorized",false); + assert(!static_cast(signal(live,true,true).getProperty("captureObserved",true))); + live.getDynamicObject()->setProperty("directRouteAuthorized",true); + live.getDynamicObject()->setProperty("captureCallbackPeaks",juce::var()); + assert(!static_cast(signal(live,true,true).getProperty("captureObserved",true))); +} + int main() { auto snap=canonicalSnapshot(); auto bus=realBusReadbackFixture(); @@ -430,6 +490,7 @@ int main() { controlIntentTranslationCases(snap,bus); installedCallbackAdmissionRegression(bus); firstSoundRouteAdmissionRegression(); + firstSoundMeasuredSignalEvidenceRegression(); auto missingMain=realBusReadbackFixture(); missingMain.getProperty("channels",{})[1].getDynamicObject() From 3f56b977345348129fb6f772bdaffbf831ea54e1 Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:43:07 +0700 Subject: [PATCH 7/8] test(first-sound): sparse physical input PCM diagnosis, output ARM and silent MAIN readback --- tests/approved_native_m2_contract.test.cjs | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/approved_native_m2_contract.test.cjs b/tests/approved_native_m2_contract.test.cjs index 00be8090a..203cd071c 100644 --- a/tests/approved_native_m2_contract.test.cjs +++ b/tests/approved_native_m2_contract.test.cjs @@ -59,6 +59,61 @@ test("native G0 preserves verified first-sound M4 route without claiming Channel assert.match(read("src/ApprovedConsoleNativeTransportV6.h"), /"outputArmed", primaryOutputArmed/); }); +test("First Sound evidence maps sparse physical pins to actual callback ordinals and diagnoses silence",()=>{ + const g0=clone(fixtures.g0); + g0.legacyM4={active:true,routeAccepted:true,routingRevision:"9"}; + g0.device.enabledInputs=[0,2]; + g0.device.inputEndpoints.push({ + id:"in:2",port:2,callback:1,label:"Mic 3",active:true + }); + g0.device.outputArmed=true; + g0.telemetry={ + captureObserved:true,rawCapturePresent:true,rawCapturePeak:0.38, + captureCallbackPeaks:[0,0.38],mainPcmObserved:true, + mainPcmPresent:true,mainPcmPeak:0.17,monitorPcmPresent:false + }; + const snapshot=protocol.normalizeSnapshot(g0); + assert.ok(snapshot);assert.equal(snapshot.admitted,false); + const first=protocol.diagnoseFirstSound(snapshot,0); + assert.equal(first.selectedPin,0); + assert.equal(first.rawPeak,0); + assert.match(first.nextAction,/Selected input is silent/); + const second=protocol.diagnoseFirstSound(snapshot,2); + assert.equal(second.selectedPin,2); + assert.equal(second.rawPeak,0.38); + assert.equal(second.mainPeak,0.17); + assert.match(second.nextAction,/physically/); + assert.match(second.readout,/IN 3/); + const all=protocol.diagnoseFirstSound(snapshot,""); + assert.equal(all.rawPeak,0.38); + // A mistaken output claim never becomes a loudspeaker certification. + g0.device.outputArmed=false; + const muted=protocol.diagnoseFirstSound(protocol.normalizeSnapshot(g0),2); + assert.match(muted.nextAction,/ARM output/); + g0.device.outputArmed=true; + g0.legacyM4.routeAccepted=false; + const unpatched=protocol.diagnoseFirstSound(protocol.normalizeSnapshot(g0),2); + assert.match(unpatched.nextAction,/PATCH CH1/); + g0.legacyM4.routeAccepted=true; + g0.telemetry.mainPcmPeak=0;g0.telemetry.mainPcmPresent=false; + assert.match(protocol.diagnoseFirstSound(protocol.normalizeSnapshot(g0),2).nextAction,/MAIN PCM silent/); + g0.telemetry.captureObserved=false; + const unknown=protocol.diagnoseFirstSound(protocol.normalizeSnapshot(g0),2); + assert.equal(unknown.rawPeak,null); + assert.match(unknown.nextAction,/No current-epoch capture callback/); +}); +test("native signal evidence is produced from measured engine fields, never JS simulated PCM",()=>{ + const header=read("integration/FirstSoundSignalEvidence.h"); + const transport=read("src/ApprovedConsoleNativeTransportV6.h"); + const bridge=read("web/approved-native-bridge.js"); + assert.match(header,/captureObservationBlocks/); + assert.match(header,/callbackInputChannels/); + assert.match(header,/captureCallbackPeaks/); + assert.match(header,/directRouteAuthorized/); + assert.match(transport,/projectFirstSoundSignalEvidence/); + assert.doesNotMatch(transport,/setProperty \("rawCapturePeak", 0\.0\)/); + assert.match(bridge,/protocol\.diagnoseFirstSound/); +}); test("strict producer rejects JS Number identities, invalid hardware pins and fake LIVE",()=>{ const cases=[ s=>{s.device.epoch=69;}, From 18fc3e782e10d35e91212bdb38871aff6e29592e Mon Sep 17 00:00:00 2001 From: Ari Sulistiono Date: Thu, 5 Nov 2026 10:45:29 +0700 Subject: [PATCH 8/8] test(ui): match accurate PCM versus hardware-audibility status labels --- tests/approved_native_m2_contract.test.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/approved_native_m2_contract.test.cjs b/tests/approved_native_m2_contract.test.cjs index 203cd071c..2b584dd09 100644 --- a/tests/approved_native_m2_contract.test.cjs +++ b/tests/approved_native_m2_contract.test.cjs @@ -446,7 +446,8 @@ test("native Windows operator can explicitly patch first physical input, arm and assert.match(js,/if\(ack\.ok===true\)/); assert.match(js,/NATIVE PATCH REJECTED:/); assert.match(js,/NO VERIFIED AUDIO DEVICE/); - assert.match(js,/REAL NATIVE PCM · FAT PENDING/); + assert.match(js,/NATIVE PCM · HARDWARE FAT PENDING/); + assert.match(js,/MAIN ARMED · PCM NOT YET ADMITTED/); assert.match(main,/action=="routingSourceSwitch"/); assert.match(main,/engine_\.liveOutputArmFault\(\)/); assert.match(main,/safe->emitApprovedNativeSnapshot\(\)/);