Skip to content

v0.3: profile-ladder re-pin — economy at 18 kHz, balanced, super_economy, ladder notebook - #16

Merged
tap merged 6 commits into
mainfrom
claude/repo-audit-lhlw7c
Aug 7, 2026
Merged

tap merged 6 commits into
mainfrom
claude/repo-audit-lhlw7c

Conversation

@tap

@tap tap commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What this changes

The profile ladder is re-pinned as four tiers: the default economy() moves to an 18 kHz passband at 58/38 taps (−26%/−14% MACs vs the previous default), the former economy design continues bit-for-bit unchanged as balanced(), super_economy() (16 kHz, 40/28 taps) joins as the explicit voice/comms tier, and transparent() is untouched. A new committed-executed notebook (notebooks/profile_ladder.ipynb) compares all four tiers with measurements taken through the shipping engine. Version bumps to 0.3.0.

Why

The "economy18" spec-relaxation experiment showed the 19→18 kHz passband move is the same species of inaudible speed-first trade that put economy at 19 kHz rather than transparent's 20 — and it buys a quarter off the expensive direction's hot loop on every embedded target (measured: M33 −23.5/−25.5% down q15/float, M55 −21.4/−22.6%, Hexagon −21.8/−23.3%). balanced preserves the old default for content that needs the 18–19 kHz shelf flat. super_economy makes a different promise — an audibly shelved top octave for half of balanced's compute — so it is never a default, opt-in by name only, positioned for voice/comms/Bluetooth-class links; in Q15 it is quieter than transparent at a fifth of the taps.

Tap counts are the minimal even counts meeting the 70 dB stopband with ≥ 1 dB margin on a fine (12.5 Hz) sweep grid; one quirk is recorded in PLAN §4 (up-direction 40 taps fails while 38 passes — Kaiser sidelobe peaking is non-monotonic near threshold).

Verification

  • Host suite 82/82 green (Linux/GCC Release, -Werror), clang-tidy clean on every changed TU; CI matrix on the branch: linux/macOS/Windows, ASan+UBSan, Cortex-M33/M55 and Hexagon emulated legs all green.
  • All three test legs re-measured, not just renamed: scipy reference vectors regenerated for the eight direction × profile cases; cross-validation floors re-pinned at 1.2e-5 down / 3.1e-5 up (−98/−90 dB), still equal at async L=512 and L=1024 (test_cross_validation.cpp); Q15 flagship 76.5 dB, 997 Hz float imaging floor 91.3 dB (test_converter_fixed_point.cpp / test_converter.cpp [ measured ] lines).
  • Instruction-count ratchet: baselines re-recorded from the CI run's own deterministic measurements on all three targets (30 scenarios, the designed serial-harvest path), including first baselines for the two new up_q15_se/down_q15_se scenarios; the transparent legs moved ≤ ±1.3%. The harvest-commit CI run re-gates everything at the new values.
  • bluetooth_bridge locks and recovers at 72.8 dB SNR (> 70 gate), total latency 1.93 ms.
  • Margin notes stated plainly: the 23 kHz stopband-tone folded-alias margin thins from 12.9 to 2.9 dB over the ≥ 71 dB contract line (worst audible-band product improves to −96 dBFS), and the bridge SNR margin thins from ~6 to 2.8 dB.

Notes for the reviewer

  • Contract change. The default profile's output changes for every consumer that constructs a converter without naming a profile — different filter, different latency (latency_frames() 39→29 down, 22→19 up), different (better) instruction counts. balanced() is the bit-exact escape hatch to the v0.2 default. The C ABI grows tags 2 = balanced, 3 = super_economy; tags 0/1 keep their meanings (0 = economy now denotes the new design).
  • Notebooks re-executed, because behavior changed: design_spike.ipynb (all eight designs, minimality asserts included), ratio_demo.ipynb (18 kHz edge asserts), and the new profile_ladder.ipynb — all committed executed.

Generated by Claude Code

claude added 6 commits August 7, 2026 00:45
The economy18 spec-relaxation experiment graduates: the default economy
profile moves to an 18 kHz passband at 58/38 taps per phase (minimal even
counts meeting the 70 dB stopband with >= 1 dB margin on a 12.5 Hz sweep
grid; up-direction 40 taps fails while 38 passes — sidelobe peaking is
non-monotonic near threshold, recorded in PLAN section 4). That is 26%/14%
fewer MACs per output and -25%/-14% table storage against the previous
default, whose design continues bit-for-bit unchanged as balanced(). The
18-19 kHz shelf moves into the transition band (-1.4 dB at 19 kHz going
down) — the same species of inaudible speed-first trade that set economy
at 19 kHz rather than transparent's 20.

Re-measured through every leg: scipy reference vectors regenerated for the
six direction x profile cases; cross-validation floors re-pinned at 1.2e-5
down / 3.1e-5 up (-98/-90 dB), still equal at async L=512 and L=1024 (the
floor remains the deliberate per-branch DC-normalization difference, which
scales with the shorter designs' branch-sum spread); Q15 flagship at
76.5 dB (was 76.1) — the format floor, not the filter; 997 Hz float
imaging floor 91.3 dB (was 89.2); bluetooth_bridge locks and recovers at
72.8 dB SNR, total latency 1.93 ms. The converter dispatches on three
committed trip counts now (economy/balanced/transparent); the C ABI gains
profile tag 2 = balanced; both notebooks re-executed against the shipping
engine. Host suite 68/68 green.

Contract change: the default output changes for every consumer that does
not name a profile; balanced() is the bit-exact escape hatch. Embedded
icount baselines for the six economy workloads are re-recorded in the
follow-up commit harvested from this push's CI measurements.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1fs1FmoRxYgVLwATD3HB9
Fourth rung of the v0.3 ladder, from the same fine-grid criterion as the
economy re-pin: 40/28 taps per phase (minimal even counts at 70 dB with
>= 1 dB margin; 38 and 26 both fail) — half of balanced's MACs, 11.6/8.8
KiB stored f32 tables, 0.42/0.32 ms latency. Unlike economy's inaudible
trade, this tier audibly shelves the top octave (-1.4 dB at 18 kHz,
-5.9 dB at 19 kHz going down), so it is never a default: opt-in by name,
positioned for voice/comms/Bluetooth-class links where the top octave is
already gone. In Q15 it is quieter than transparent (77.7 dB measured at
997 Hz) at a fifth of the taps — the format floors near 76 dB regardless
of tier, so cheap tiers are the right 16-bit pairing.

Wired through every layer the other tiers get: constexpr profile with a
committed trip count in the process() dispatch, scipy reference vectors
(both directions), the design/phase-table/converter batteries (78 -> 82
host tests, all green), C ABI profile tag 3, ctypes bridge name, two Q15
icount scenarios (up_q15_se / down_q15_se) pinning the tier in its
deployment format, and the design-spike notebook re-executed over all
eight designs. Baselines for the new scenarios land with the harvest
commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1fs1FmoRxYgVLwATD3HB9
notebooks/profile_ladder.ipynb puts the four v0.3 tiers side by side, all
measured against the shipping C++ through the C ABI (family convention):
overlaid prototype responses both directions, the top-octave zoom that is
the tier-choice decision plot, engine-measured passband sweeps (each tier
asserted flat within +/-0.02 dB inside its own passband), the four-way
program-material spectra with the alias/image species annotated, grouped
MACs/storage/latency cost bars, and a measured quality-vs-compute scatter
(997 Hz float SNR: 85.3 / 91.3 / 89.2 / 144.9 dB for
super_economy/economy/balanced/transparent). Tier colors are fixed across
every figure and CVD-validated (adjacent-pair delta-E >= 8.6); every
series is direct-labeled so identity never rides on color alone.
Committed executed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1fs1FmoRxYgVLwATD3HB9
Harvested from the ratchet job's measurements on 924b737 (QEMU counts are
deterministic; the job measures all targets even after a gate failure,
the designed serial-harvest path). The six economy workloads land at the
new 58/38-tap design: M33 -23.5/-25.5% (down q15/float) and -11.6/-13.6%
(up), M55 -21.4/-22.6% and -8.7/-10.4%, Hexagon -21.8/-23.3% and
-3.7/-10.6% — the tap-count cut, delivered on silicon paths. The two new
super_economy Q15 scenarios record their first baselines (e.g. M55 down
47.7M vs economy's 58.3M). The transparent legs moved only inside the
gate (+/-1.3% worst) and are re-recorded at measured per --update
semantics.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1fs1FmoRxYgVLwATD3HB9
A branch push and its open PR fired the full matrix twice for the same
commit (both run sets are visible on any PR of this branch). Concurrency
groups keyed on the head SHA collapse the pair to one surviving run — the
later-starting PR run cancels the push run — while a branch with no PR
keeps its push-triggered CI, which the pre-PR baseline-harvest flow
(PLAN section 7) depends on. Keyed per workflow so CI and the style gate
never cancel each other.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1fs1FmoRxYgVLwATD3HB9
The SHA-keyed cancel-in-progress scheme left the cancelled push run's
checks attached to the PR head commit, so the merge box read "10
cancelled, 10 successful — some checks haven't completed yet" on a fully
green head. Push runs are now filtered to main: a PR branch gets exactly
one run set (pull_request events) and a clean merge box; main keeps push
coverage; a branch with no PR yet runs via workflow_dispatch (the pre-PR
baseline-harvest path) or by opening the PR first. Concurrency now only
cancels superseded in-flight runs per PR/ref — those cancellations attach
to the old commit, never the current head.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C1fs1FmoRxYgVLwATD3HB9
@tap
tap merged commit 94775b0 into main Aug 7, 2026
10 checks passed
@tap
tap deleted the claude/repo-audit-lhlw7c branch August 7, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants