Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8790289
feat(int1b): expose raw callback budget bucket counts for interval pr…
masarray Nov 20, 2026
a50682f
feat(int1b): write bounded 1Hz health evidence from existing native s…
masarray Nov 20, 2026
525869d
feat(int1b): offline deterministic interval profiler and matched dry-…
masarray Nov 20, 2026
27b4941
test(int1b): verify bounded native health log and real interval profi…
masarray Nov 20, 2026
1e30cfb
fix(int1b): split profiles on actual disconnection as well as device …
masarray Nov 20, 2026
edec4e3
docs(int1b): practical matched dry/FX evidence protocol and strict ha…
masarray Nov 20, 2026
5cdd515
fix(int1b): reject false dry-FX comparisons across changed input/outp…
masarray Nov 20, 2026
6cea826
fix(int1b): reject false dry-FX comparisons across changed input/outp…
masarray Nov 20, 2026
dbbc955
test(int1b): explicit physical input endpoint mismatch invalidates ti…
masarray Nov 20, 2026
ab4bcd9
fix(int1b): invalidate comparisons across unreadable telemetry and de…
masarray Nov 20, 2026
314514f
test(int1b): fail closed on unknown middle snapshot and same-driver r…
masarray Nov 20, 2026
8fac670
fix(int1b): derive physical DRY/FX from accepted insert leases and by…
masarray Nov 20, 2026
51d1bd8
fix(int1b): retain JUCE var array owners for control readback iteration
masarray Nov 20, 2026
7d65a86
feat(int1b): log authoritative native FX activity not unrelated dry-t…
masarray Nov 20, 2026
ad5a929
fix(int1b): classify true DRY and active FX only from accepted native…
masarray Nov 20, 2026
10540d8
test(int1b): prevent fake DRY label from unrelated UI dryTest intent
masarray Nov 20, 2026
d69eca7
docs(int1b): require verified native global FX bypass, not UI dryTest…
masarray Nov 20, 2026
9819fe7
feat(int1b): provenance graph revision and actual device pin masks fo…
masarray Nov 20, 2026
b0d9335
feat(int1b): include exact pin masks and FX graph revision in compact…
masarray Nov 20, 2026
91a0d0e
fix(int1b): compare only identical native graph revisions and physica…
masarray Nov 20, 2026
4ac864f
test(int1b): identical ASIO pin count cannot hide physical remap
masarray Nov 20, 2026
fc1a2c2
docs(int1b): fail-closed same graph and actual pin maps for hardware …
masarray Nov 20, 2026
cfec948
test(int1b): preserve three ASIO safety-fence checks plus one diagnos…
masarray Nov 20, 2026
b1a075e
fix(int1b): require same app session and consecutive dry-to-FX windows
masarray Nov 20, 2026
380ebac
test(int1b): reject cross-session and stale-baseline comparisons
masarray Nov 20, 2026
b6b3465
docs(int1b): only same-session contiguous native DRY-to-FX comparison…
masarray Nov 20, 2026
f78a50d
fix(int1b): include externally leased Channel1 vendor graph with real…
masarray Nov 20, 2026
46abf01
feat(int1b): expose external original CH1 vendor FX provenance in hea…
masarray Nov 20, 2026
ed1dc26
fix(int1b): require consistent external vendor lease counts for hones…
masarray Nov 20, 2026
c8753d9
test(int1b): external-only CH1 VST3 lease accurately transitions DRY …
masarray Nov 20, 2026
bdd6e62
feat(int1b): expose control-only accepted external FX owner identity
masarray Nov 20, 2026
af46217
feat(int1b): inspect only actually accepted original-CH1 external PCM…
masarray Nov 20, 2026
bd38d92
fix(int1b): count the exact accepted external Graph, reject unknown v…
masarray Nov 20, 2026
83133cd
fix(int1b): fail closed when external lease type is not an auditable …
masarray Nov 20, 2026
f75fc08
fix(int1b): fail closed when external lease type is not an auditable …
masarray Nov 20, 2026
8bf5f2b
fix(int1b): fail closed when external lease type is not an auditable …
masarray Nov 20, 2026
b13967f
test(int1b): bind external CH1 counts to exact accepted graph lease n…
masarray Nov 20, 2026
8f875f9
docs(int1b): accepted original CH1 VST3 external lease is part of rea…
masarray Nov 20, 2026
32eb97a
fix(int1b): forbid DRY-to-FX matches over rejected or discontinuous e…
masarray Nov 20, 2026
99909db
test(int1b): reject P2 invalid-health boundaries but admit verified F…
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
44 changes: 44 additions & 0 deletions docs/INT1B_AUDIO_RELIABILITY_PROFILING_20261120.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# INT-1B — real audio-reliability evidence, no speculative DSP refactor

**Repository:** [ArSonMix](https://github.com/masarray/arsonmix) · parent [INT-1 #837](https://github.com/masarray/arsonmix/issues/837)
**Scope:** existing single-primary-ASIO native PCM/VST3 graph and approved `/preview/`. No multi-device ASIO, graphical overhaul, changed buffer or auto-tuned audio driver.

## What actually changed

1. The existing `LiveAudioEngine::status()` publishes the 13 already-accumulated `RealtimeHealthHistogram` bucket counts, with exact provenance. The audio callback keeps precisely its existing relaxed-atomic histogram update; **no allocations, locks, new timers, IO, COM, driver opens or new render graph**.
2. The existing 1 Hz `AUDIO_HEALTH` log now writes a compact, versioned **parseable JSON subset** of the status already fetched by the message thread. The earlier full status can include long FX/device arrays and exceed the 4096-byte async queue entry. The small health record avoids silent JSON truncation without reducing the original interactive SIGNAL CHECK / COPY FULL REPORT data. The log itself stays on the existing asynchronous worker, is local/private and rotates at 2 MB.
3. `scripts/audio_reliability_profile.mjs` compares **changes between consecutive 1 Hz histogram snapshots**. It outputs per-window p95/p99 **callback deadline bucket ceilings**, over-budget per 1,000 callbacks, late scheduling indicators and device-generation changes. It splits samples whenever a device/route/driver/rate/buffer/mode changes, counters reset, the callback disconnects or the recording has a gap over 5 s. It refuses a DRY/FX comparison when hardware parameters differ. Raw buckets permit real *interval* percentiles rather than a stale lifetime average.
4. Portable regression contracts cover malformed/truncated/legacy records, true 13-bucket delta percentiles, >100% deadline, **actual accepted insert/rack/global bypass classification**, matching dry vs FX, device epoch changes, counter resets and unknown hardware XRUN status. Expensive CI is only required once for the final native candidate, not for each test change.

## Operator procedure — collect once on an exact Windows build

Use the new INT-1B installer/portable **only when an exact-SHA Windows FAT artifact exists**. Save your existing `.smix` first. ASIO interface and physical output remain chosen explicitly by you. Start at low headphone volume, never auto-arm speakers.

1. In the approved native application, open **SIGNAL CHECK**, verify driver, exact input/output pins, rate and buffer. Keep the same ASIO device (for example, 48 kHz / 256 frames) and an accepted CH→MAIN routing.
2. Use the **native GLOBAL FX POWER/BYPASS control** (wait for exact accepted ACK/readback) to bypass all FX for at least **2 minutes**, without a route/device change. The old `dryTest` flag is only UI intent and is **not reliable evidence** that the accepted ChannelId DSP is bypassed. Keep the audio signal continuous. `AUDIO_HEALTH` snapshots are collected automatically at the existing 1 Hz rate without any extra GUI telemetry activity.
3. Enable GLOBAL FX POWER and verify at least one installed native FX insert is **actually processing** (accepted rack/slot/global bypass readback). Keep **identical** driver/device/rate/buffer and monitor level, and record at least **2 minutes**. Mark any audible crackle using **MARK CRACKLE**. Do not conflate manual silence with a dropout.
4. In SIGNAL CHECK choose **OPEN DIAGNOSTIC LOG**. The local `audio-diagnostics.log` contains records. It is **not uploaded** by ArSonMix. On a development machine with Node 20+ and the ArSonMix source, run:

```powershell
node scripts/audio_reliability_profile.mjs "C:\path\to\audio-diagnostics.log" --json int1b-profile.json --markdown int1b-profile.md
```

5. Review private device names or FX details before sharing the Markdown/JSON evidence. If the log rotated, analyze each part separately and compare equivalent driver/rate/buffer conditions. Only a single window with >=30 seconds and accepted physical routing is considered minimally comparable; **120 s per mode recommended** for reliability evidence. Never claim long-run stability from 30 seconds.

## How to interpret accurately

- **p95/p99** are *upper limits of coarse callback-processing deadline buckets* based on cumulative-count **deltas**, not exact processing-time percentiles or OS CPU percentage. The >100% bucket remains explicitly unknown/unbounded.
- **Over-budget** means measured callback processing time exceeded its actual block-period budget. **Late callback / gap** refers to START-to-START cadence relative to the *previous* variable JUCE quantum. Both are **indicators**, not proof of an actual render-underrun.
- `backendXrunMeaning=WASAPI_CAPTURE_DISCONTINUITIES_ONLY` is specifically **capture flags**, not DAC starvation. `DRIVER_DEFINED` has driver-dependent semantics. True render-hardware XRUN remains **UNAVAILABLE** through the currently pinned JUCE AudioIODevice API.
- `worstPluginUs` is a **cumulative maximum**, not necessarily measured inside the reported window. No automated causal plugin verdict based solely on that value.
- **Verified DRY vs FX:** DRY means effective accepted processing-insert count `0` across both ChannelId FX **and the original externally leased CH1 vendor/Orbit rack**, either by global/rack/slot bypass or no inserts. FX means effective processing-insert count >0, after native ACK/readback; the legacy `dryTest` flag cannot establish either. A non-auditable external lease is rejected rather than falsely labeled DRY. The DRY interval must immediately precede FX in the SAME app session with no more than 60 seconds of transition; never compare a prior launch or stale archive. Device generation, exact hexadecimal ASIO input/output pin masks, native graph revision, input/output names and channel counts must all match. A mere identical driver name is NOT sufficient. Compare p99 bucket ceiling, over-budget/1000, cadence and audible observations together. Only after an actual regression is observed should the responsible DSP/FX/device/GUI subsystem be optimized with a targeted patch and before/after proof.
- Profiling cannot measure acoustic round-trip latency, DPC/ISR or hard OS page faults; those require independent synchronized hardware/Windows tools. Existing [CrackleEvidenceWindow](../engine/diagnostics/CrackleEvidenceWindow.h) and [Windows GUI sampling](../scripts/collect_gui_perf_windows.ps1) remain separate instruments.

## Exit gates

- Windows MSVC Release + native CTest + quick source contracts at exact SHA, controlled release artifact installation/upgrade/uninstall **when a user-test binary is required**.
- Read `audio-diagnostics.log` from that exact user-installed binary; assert parseable profile counts, no log truncation and retained device/session/provenance.
- **Physical hardware FAT** (ASIO driver model, hardware, listening, glitch markers, loaded VST3 chain) must be reported PASS/FAIL/NOT RUN. Never infer physical FAT from CI.
- I/O #825/#830 and Graphic EQ #835 remain distinct experiments; no dual-ASIO UI claim.

**Measured source-workload win:** one existing native status read and 1 Hz asynchronous log write are reused, instead of adding a callback probe, UI polling timer or another audio thread. Without real hardware evidence this does not justify a numerical reduction in CPU, latency or XRUN.
5 changes: 5 additions & 0 deletions engine/core/DynamicChannelFxLeaseBank.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ class DynamicChannelFxLeaseBank final {
std::uint64_t revision() const noexcept{return revision_;}
std::size_t lanes() const noexcept{return rows_.size();}
ChannelId externalChannel() const noexcept{return external_.id;}
// Read-only CONTROL-plane visibility of the EXACT accepted external
// render lease. No refcount, mutation or render-side ownership change.
const ExternalLease* externalLeaseForControl() const noexcept {
return external_.valid() ? &external_ : nullptr;
}
std::size_t insertCount(ChannelId id) const noexcept {
const auto* p=find(id);return p?p->count:0;
}
Expand Down
Loading
Loading