aqua-trial / native-diff: DSP hash in exports, noise% fix, knob + limit tests #41

Merged
aqua merged 3 commits from aqua/trial-v5-review-gaps into main 2026-11-12 10:25:57 +00:00
Member

Closes items 1-3 and the uncommitted part of 4 of aqua-body:follow_up:trial-v5-review-gaps. Nothing here is heard or listened to; every check is a node check on synthetic or rendered samples.

What

  • aqua-trial exports carry dspSha256 (sha-256 of the exact thruster-trial.dsp text the page compiled; web/trial.js hashes the fetched text, logic.js sha256Hex, buildExport refuses to build without one). analyze.mjs rejects an export without it (a pre-hash page build would otherwise read as mix 0), warns when exports come from different DSP sources, and warns when an export's hash is not this checkout's thruster-trial.dsp.
  • analyze context noise% no longer pools v5noise100 with noise100 (current mix only; the report prints n ... (mix 0 only)).
  • aqua-trial tests: the noise knob scales the rasp (Goertzel band energy 2.5-5 kHz at rpm 4800, where only the rasp lives: ~0 at noise 0, amplitude ratio 0.5 at noise 50) and rasp+rattle together at rpm 600 (rms of x(noise)-x(0) is proportional to noise); noise=100 vs thruster.dsp and mix=1 vs the c6561da file are now checked at rpm 300/600/1200/4800 (mix 1 vs mix 0 must differ at each).
  • native-diff: LIMITS and the per-source comparison (compareRenders, violationsOf) moved from native-diff.mjs into native-compare.js (pure, no render/dotnet) so they can be tested; native-diff.mjs calls them. New native-diff.test.mjs (wired into aqua-feel npm test) trips each limit with known perturbations: +1 dB gain, a two-point low-pass, a one-sample shift, an in-tolerance control, a length mismatch.

Tests run

  • tools/aqua-trial: node build.mjs && node test.mjs: 21 passed (was 16).
  • tools/aqua-feel: npm test: 26 + 59 sync + 8 native-diff passed (native-diff.test.mjs is new, 8).
  • node native-diff.mjs still runs end to end up to the dotnet call; the native render itself was not run here (the sandbox cannot write the dotnet home).

Mutation results (break, see fail, restore)

pinned thing mutation result
rasp scaled by noise rasp unscaled (only rattle scaled) FAIL (rasp band test)
rattle scaled by noise rattle unscaled FAIL
noise knob knob stuck at 1 FAIL
identity beyond rpm 600 output drive changed only above ~3150 rpm FAIL at rpm 4800
export carries hash field dropped from doc / check disabled FAIL / FAIL
analyze rejects hashless check disabled FAIL
analyze flags foreign hash mismatch list emptied FAIL
noise% excludes v5 filter removed FAIL
lufsDb / truePeakDb / centroidPct each limit loosened (10 / 10 / 1000) each FAIL
lufsDb / truePeakDb tightened (0.01 / 0.3) each FAIL (in-tolerance control)
relRmsErrDbImp3 loosened (-10, 0) FAIL
lufs / truePeak / centroid / sample checks each removed each FAIL
sample bound only under imp3 applied in all modes FAIL
length mismatch check removed FAIL

Deviations

  • The scratch isolation probes in soul-nd-1 (smoother cause, ulp sims) are investigation notes, not limit checks; they were not committed. The +1 dB / one-sample mutations from MUT= in the scratch copy are the committed perturbations.
  • native-diff.mjs's wiring to native-compare.js is covered by running it, not by a test (no dotnet in the test).
  • The new native-diff.mjs row key order differs slightly (JSON content same).

Not done

  • Item 5 (dx7-algorithm-32-additive-organ -79.5 dB unexplained) and item 6 (no headless browser, trial-browser-verify open).

🤖 Generated with Claude Code

Closes items 1-3 and the uncommitted part of 4 of `aqua-body:follow_up:trial-v5-review-gaps`. Nothing here is heard or listened to; every check is a node check on synthetic or rendered samples. ## What - **aqua-trial exports carry `dspSha256`** (sha-256 of the exact `thruster-trial.dsp` text the page compiled; `web/trial.js` hashes the fetched text, `logic.js` `sha256Hex`, `buildExport` refuses to build without one). `analyze.mjs` rejects an export without it (a pre-hash page build would otherwise read as mix 0), warns when exports come from different DSP sources, and warns when an export's hash is not this checkout's `thruster-trial.dsp`. - **analyze context noise% no longer pools `v5noise100` with `noise100`** (current mix only; the report prints `n ... (mix 0 only)`). - **aqua-trial tests:** the noise knob scales the rasp (Goertzel band energy 2.5-5 kHz at rpm 4800, where only the rasp lives: ~0 at noise 0, amplitude ratio 0.5 at noise 50) and rasp+rattle together at rpm 600 (rms of x(noise)-x(0) is proportional to noise); noise=100 vs `thruster.dsp` and mix=1 vs the c6561da file are now checked at rpm 300/600/1200/4800 (mix 1 vs mix 0 must differ at each). - **native-diff:** LIMITS and the per-source comparison (`compareRenders`, `violationsOf`) moved from `native-diff.mjs` into `native-compare.js` (pure, no render/dotnet) so they can be tested; `native-diff.mjs` calls them. New `native-diff.test.mjs` (wired into `aqua-feel` `npm test`) trips each limit with known perturbations: +1 dB gain, a two-point low-pass, a one-sample shift, an in-tolerance control, a length mismatch. ## Tests run - `tools/aqua-trial`: `node build.mjs && node test.mjs`: 21 passed (was 16). - `tools/aqua-feel`: `npm test`: 26 + 59 sync + 8 native-diff passed (native-diff.test.mjs is new, 8). - `node native-diff.mjs` still runs end to end up to the dotnet call; the native render itself was not run here (the sandbox cannot write the dotnet home). ## Mutation results (break, see fail, restore) | pinned thing | mutation | result | |---|---|---| | rasp scaled by noise | rasp unscaled (only rattle scaled) | FAIL (rasp band test) | | rattle scaled by noise | rattle unscaled | FAIL | | noise knob | knob stuck at 1 | FAIL | | identity beyond rpm 600 | output drive changed only above ~3150 rpm | FAIL at rpm 4800 | | export carries hash | field dropped from doc / check disabled | FAIL / FAIL | | analyze rejects hashless | check disabled | FAIL | | analyze flags foreign hash | mismatch list emptied | FAIL | | noise% excludes v5 | filter removed | FAIL | | lufsDb / truePeakDb / centroidPct | each limit loosened (10 / 10 / 1000) | each FAIL | | lufsDb / truePeakDb | tightened (0.01 / 0.3) | each FAIL (in-tolerance control) | | relRmsErrDbImp3 | loosened (-10, 0) | FAIL | | lufs / truePeak / centroid / sample checks | each removed | each FAIL | | sample bound only under imp3 | applied in all modes | FAIL | | length mismatch | check removed | FAIL | ## Deviations - The scratch isolation probes in `soul-nd-1` (smoother cause, ulp sims) are investigation notes, not limit checks; they were not committed. The +1 dB / one-sample mutations from `MUT=` in the scratch copy are the committed perturbations. - `native-diff.mjs`'s wiring to `native-compare.js` is covered by running it, not by a test (no dotnet in the test). - The new `native-diff.mjs` row key order differs slightly (JSON content same). ## Not done - Item 5 (dx7-algorithm-32-additive-organ -79.5 dB unexplained) and item 6 (no headless browser, trial-browser-verify open). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
aqua merged commit 965dfe8576 into main 2026-11-12 10:25:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/AquaSynth!41
No description provided.