GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com (truncated) — feat(tx): keep engine-generated audio at the level its generator chose (stacked on #5646) by on8st · Pull Request #5647 · aethersdr/AetherSDR Conversation
|
| build | beacon TX:ALC peak |
|---|---|
today's main |
−1.412 dBFS |
| #5646 alone | −20.002 dBFS |
| #5646 + this PR, WSPR level stored at −20 dBFS | −20.002 dBFS |
+ the WSPR default branch (hl2/wspr-host-modulated-level) |
−3.0 dBFS |
The mic-slider bypass is what this PR repairs, and it is measured: the same
+40 dB slider move (50 → 100) shifts the beacon by 18.59 dB on the
#5646-only build and by 0.0 dB on this one. Both sides were run —
a single-sided result would be consistent with the slider having been inert on both.
The 18.59 dB level shortfall is NOT repaired here, and this PR should not be
credited with it. This branch is the TxAudioSource work and nothing else; it
sets no defaults. wspr-unattended-ab measures that separation head-on: driven
with a −20 dBFS engine-generated signal, its repair_db is 0.0 and its
residual_vs_stock_db is −18.577. The level comes back only when the WSPR
Level spinbox default moves from −20 to −3 dBFS, which is
hl2/wspr-host-modulated-level and must land after this, or beacons sit at
−20 dBFS.
An earlier version of this commit carried that default change. It is an unrelated
change to an unattended transmit level and had no business riding inside an enum
refactor, so it was split out and carries its own measurement and its own
sequencing note.
AX.25 keeps the mic slider; it is not bypassed and needs no default. An
earlier revision of this body claimed "AX.25 computes a level per frame and RADE
carries its own PcMicGain, so neither has a single default to set in any case".
Neither half was true of the code. AX.25's amplitude is the constant
kTxAfskAmplitude = 0.35 in AetherAx25LibmodemShim.cpp, and on an HL2 the
slider never reaches setPcMicGain at all — MainWindow_Session.cpp returns
early on hostModulatesTxAudio(). Bypassing the slider for AX.25 therefore left
it with no level control. It is tagged Microphone and behaves exactly as it
did before this branch.
The AX.25 level itself is still −9.12 dBFS and still has no operator control.
That is pre-existing, it is unchanged by this PR, and it is not this PR's to fix.
Giving the shim its own persisted level (the shape #5651 uses for WSPR) is the
right follow-up.
Nothing on the AX.25 path was exercised on the bench — only WSPR was. The tag
now has a behavioural assertion at the AudioEngine seam (icom_identity_test),
which is what the source-text test used to stand in for.
New in this branch as of the 2026-09-16 rebase. #5646 removed the unkey
"raise mic gain" advice in 1d9d063d, and was explicit about why and about who
should bring it back:
The advice must not fire for audio the operator's microphone did not produce:
WSPR, AX.25 and RADE reachsubmitTxAudio()withclientLeveledfalse,
exactly like the microphone… The information needed to aim it does not exist
here. This branch's seam issubmitTxAudio(..., bool clientLeveled)— two
states, and engine audio is not one of them… #5647 reintroduces it gated on
!m_txAudioEngineGenerated.
That is exactly what this branch now does. The advice is restored in
setKeying(), gated on !m_txAudioClientLeveled && !m_txAudioEngineGenerated.
It is safe to restore only because the seam carries TxAudioSource.
The gate is narrower than #5646 anticipated, and deliberately so. #5646
assumed AX.25 would be gated off with WSPR. It is not: AX.25 is tagged
Microphone, so a quiet packet frame does draw the advice. That is correct —
the mic slider is the only control in the product that can move an AX.25 frame
(kTxAfskAmplitude is a constant and the packet dialog has no level control), so
"raise mic gain" is precisely the right instrument there. Only the WSPR beacon
has no slider in its path, and only the WSPR beacon is gated off.
| file | conflict | resolution |
|---|---|---|
Hl2Backend.cpp setMicGain |
#5646 wrote "NOTHING IS PATH-DEPENDENT HERE ANY MORE" | Took this branch's text. That claim is false once EngineGenerated bypasses the multiplier — which is this PR's substance |
Hl2TxLevelPolicy.h |
#5646 added a key-on-seed paragraph; this branch narrowed the SCOPE paragraph | Both kept. #5646's seed paragraph explains why the widened slider stays inside the clamp and is still true; it now sits inside this branch's narrowed scope |
docs/radio-certification.md TX:ALCGAIN |
both rewrote the row | Took #5646's measured criterion (0.00 dB ±0.25 below the target; strictly decreasing above it) — it is tighter than this branch's ±1 dB — and appended this branch's EngineGenerated sentence |
FOUR processAudioBlock(..., bool) call sites were added in
hl2_txdsp_test.cpp while this branch sat — three by #5646, one more by
another change already on main. All are converted to the enum here. That is the
same sibling-call-site class as 6e526b4e (originally f99e386a), and it has
now recurred three times: once caught by review, twice by the build during a
rebase. Widening a seam type keeps colliding with call sites written in parallel,
which is an argument for landing this branch rather than letting it age further.
Hermes-Lite 2 only. The enum is consumed inside Hl2TxDsp.
IcomCivBackend::submitTxAudio takes the new parameter and explicitly
Q_UNUSEDs it — "this backend ships PCM to a radio that runs its own transmit
processing, so there is no host ALC here to bypass" — and the Flex backend has no
submitTxAudio override at all. Receive is untouched everywhere.
TCI/DAX clients are unaffected: ClientLeveled behaves exactly as
clientLeveled == true did.
Mic slider 0 no longer silences an unattended transmission on an HL2. This is
user-visible, it is new in this PR, and nobody would predict it from the title,
so it is here rather than in a footnote. EngineGenerated never reaches
micSliderToLinear, so a WSPR beacon goes out at the level its generator
chose whatever the Mic Level control reads — including 0. Before this PR the
multiplier was in every path and 0 was a plain 0.0x multiply on all of them.
Voice, TCI/DAX and AX.25 all still mute at 0.
That is the behaviour we want, and it is the same argument the rest of the PR
makes: a microphone mute has no business muting a beacon. But Hl2TxLevelPolicy.h
told the operator the opposite — "At 0 nothing transmits, as a plain 0.0x multiply
on every path", and that this was "worth knowing before parking the control at 0
between voice sessions". That is a safety claim about transmission that this PR
falsifies, and leaving it in shipped source was the worst of the findings below.
It is corrected in this branch, in Hl2TxLevelPolicy.h and — after round 3
of review found the twin copy still standing — in Hl2Backend.cpp's setMicGain
doc comment, which is the function the slider actually calls.
micSliderToLinear itself is unchanged and still returns 0.0: voice, TCI/DAX
and AX.25 still mute at 0. Stopping an unattended transmission is the generator's
own control, not this slider.
New hl2_txdsp_test case. Engine-generated output is unmoved by a 1000×
span of mic gain (spread 0.00 dB) and sits +0.000 dB against a measured
control — the mic path at unity, which applies no gain either. The control is
measured rather than asserted against a constant because the modulator has its own
scale factor (amplitude 0.5 leaves as |IQ| 0.52), and dividing by a guessed number
would have tested the guess. The mic path still moves with its slider, −6.02 dB for
a 2:1 cut.
Two of the three tags are asserted BEHAVIOURALLY, at the AudioEngine seam.
icom_identity_test stands up a real AudioEngine with hostModulation() true
and reads the tag off a live queued txFinalMonitorPcmReady:
| entry point | asserted tag | mutation result |
|---|---|---|
feedDaxTxAudio |
ClientLeveled |
tag it EngineGenerated → fails |
sendModemTxAudio |
Microphone |
tag it EngineGenerated → fails |
AGENTS.md §Test-layer boundary asks for exactly this ("Prefer behavioral seams
over source-text assertions"), and an earlier revision of this branch reached for
source text instead on a premise that was simply false — that AudioEngine.cpp is
compiled into no test target. It is in CORE_SOURCES and therefore in
aethercore, which icom_identity_test already links.
tx_audio_source_wiring_test now covers only what a running test cannot
reach: startWsprPump()'s call site, and the metatype. Driving that one
behaviourally needs a prepared beacon and a timer tick for a frame that keys for
111.6 s, against a bench loopback approval that permits 35 s; raising a rail to
fit a convenience is what that ceiling's own comment forbids. It does not prove
the code runs, and it does not retire the end-to-end beacon leg, which stays
open. It also pins that nobody derives the tag from markExternalSource again —
that flag means "a TCI/DAX client is feeding", it is not "not a beacon", and
reading it as one is what swept AX.25 into the beacon's bucket.
Its enum assertions are scoped to the enum body. Matching a name anywhere in
the file is satisfied by the doc comment that spells all three names in prose, and
the first version of those three checks duly passed against an enum gutted down to
one enumerator.
A mis-tag is otherwise silent: a beacon goes out 18.58 dB down again,
unattended, with every existing test still green.
Test runs, with the count each one was actually taken on — the 417/417 figure
this section used to quote predates two rebases and is no longer this head's.
Before the 2026-09-13 rebase onto 87b80c65: 417 tests, 417 passed, 0 failed,
5 skipped (crdv_quarantined_test,
app_settings_safety_explicit-profile-path-isolation,
weather_radar_texture_gl_test, range_slider_a11y_test,
relay_bar_a11y_test). After that rebase, which picked up #5505 and #5506:
423 of 424, the one failure vkamp_connection_test, which fails the same
way on an untouched tree (2 of 3 isolated runs) and is one of the four legacy
fake-peer socket tests AGENTS.md already tracks for extraction in #5254.
tx_audio_source_wiring_test is the target new here.
Re-run after the review fixes: still 417/417, 0 failed, same 5 skipped — the
count is unchanged because the loopback target is not in the default graph, which
is the whole point of the blocker below. Separately, configured with
-DAETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and built hl2_tx_loopback_test: clean,
exit 0. That build is the evidence for the fix; the 417 is not, and never could
have been.
This PR widens a seam type. IRadioBackend::submitTxAudio's third parameter
changes from bool clientLeveled to TxAudioSource source, and the enum is
declared in its own header, src/core/backends/TxAudioSource.h, which
IRadioBackend.h includes.
Our own lab-side checker (see Localization check below — it is not in this
repository) deliberately does not check "that a missing seam verb was split into
its own capability-shaped PR". Whether you would rather have the enum as its own
small seam PR ahead of the HL2 behaviour is your call — say so and it will be
split, rather than waiting to be asked. The round-3 review made that cheaper
either way: the type is a self-contained four-line header now, so splitting it out
is a file move rather than a surgery.
Namespace, and then its own header. TxAudioSource was briefly declared at
global scope while everything else in IRadioBackend.h lives in
namespace AetherSDR. It moved inside that namespace in round 1, with
Q_DECLARE_METATYPE(AetherSDR::TxAudioSource) to match
Q_DECLARE_METATYPE(AetherSDR::IRadioBackend::LinkStats) beside it, at a cost of
two lines in two test files — every production translation unit that names the
type is already inside namespace AetherSDR or a nested one.
Round 3 moved it again, out of IRadioBackend.h entirely. The reason is the one
that motivated checking the cost in the first place: AudioEngine.h and
Hl2TxDsp.h both name the type, AudioEngine.h is included by 75 files, and
neither had any other reason to parse 1378 lines of backend seam — nor did they
before this branch, which introduced the dependency. src/core/backends/
already keeps one-type headers for exactly this (MeterDef.h, SliceDelta.h,
TransmitDelta.h), so TxAudioSource.h joins them and carries the whole
contract for the three states.
check_localization.py is ours and is NOT in this repository — a reviewer cannot
re-run it. Earlier revisions of this body cited it as tools/check_localization.py
and quoted its docstring as though it were a repo gate; tools/ here has
check_engine_boundary.py, check_test_registration.py, check_ci_test_gate.py
and friends, and no localization checker. Correcting that, plainly: it is a
lab-side script of ours that makes executable two things the maintainer already
wrote in docs/HERMES.md §"For coding agents — keep bring-up inside the family
backend" — the pre-PR grep, verbatim (and per that document a hit is not
automatically a violation: it has to be explained in the PR body, which is what
this section is), and the one named prohibition that is mechanically detectable, a
family string test above the seam (family == "hl2" / usesFlexCommandPlane()
outside src/core/backends/). The rule is the maintainer's; only the script is
ours, and nothing in this section rests on the script rather than on the diff.
It reports 4 hits, 0 violations on this branch (exit 2 — advisory). One of the four, src/gui/MainWindow_Session.cpp, is
inherited from #5646 and is comment-only; it is explained there. The other three
are type propagation only:
src/gui/MainWindow.cpp, src/models/RadioModel.cpp, src/models/RadioModel.h
— they pass the widened seam parameter through and nothing else: MainWindow's two
txFinalMonitorPcmReady lambdas, and RadioModel::submitTxAudio's forward to
m_backend. No family test, no family branch, no new above-seam logic. The
enum is consumed inside Hl2TxDsp.
Everything quoted above was measured against hpsdrsim, serial
AA:BB:CC:DD:88:FF, under a loopback approval. Nothing in this series has
ever been radiated — no on-air contact, no WSPRnet spot, no receiving station
has heard either build. The beacon itself is real and took the operator's own
path, so there is no stand-in for it; but the run's own not_measured list names
what it is silent on, and it is worth repeating here:
TransmitModel — theAETHER_HL2_MIC_LEVEL into Hl2Backend::setMicGain,hpsdrsim;aethersdr-agent, review 5188163057)The blocker was real and is fixed. tests/hl2_tx_loopback_test.cpp still passed
/*clientLeveled=*/false to Hl2Backend::submitTxAudio, which a scoped enum will
not take. Now TxAudioSource::Microphone.
That target sits behind AETHER_ENABLE_HL2_TX_LOOPBACK_TEST, OFF by default,
which is exactly why the 417/417 run and the green checks did not see it — and
.github/workflows/sanitizers.yml turns it ON weekly for the reason its own
comment gives: "Building it weekly keeps the source honest against API drift now
that it is out of the default graph." That lane earned its keep here. A build
that only runs weekly is the one nobody checks.
Proved rather than asserted, because the whole point of the finding is that
this target is not in the default graph: configured with
-DAETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and built the target — clean, exit 0.
Then reverted the single token and rebuilt, to confirm the fix is load-bearing and
not a tidy-up:
tests/hl2_tx_loopback_test.cpp:418:65: error: cannot initialize a parameter of
type 'TxAudioSource' with an rvalue of type 'bool'
— the diagnostic class the review predicted, from the same line. Restored, rebuilt
clean.
The four retired calls are updated too. tests/icom_backend_test.cpp had the
same stale call four times. That target is inside the #[==[ … ]==] bracket in
tests/tests.cmake, so it is retired and does not compile, and this change is
not verified by any build — it is done anyway so that reviving it is not spent on
this. Leaving known-broken calls for whoever comes back to a retired target is the
same trap this PR hit in the loopback test.
Hl2TxLevelPolicy.h — the false safety claim. See Who is affected above;AudioEngine.h — the txFinalMonitorPcmReady comment still described theClientLeveled bucket as "the mic chain or the engine's own toneIRadioBackend.h — enum moved into namespace AetherSDR. Cost measuredtests/tx_audio_source_wiring_test.cpp — the header's justification wasAudioEngine.cpp is not in tests/tests.cmake by filename, but it is inCORE_SOURCES and therefore in aethercore, which icom_identity_test links —source == TxAudioSource::ClientLeveled on aAudioEngine there. The 111.6 s frame argument holds for the end-to-endsendModemTxAudio reaches in onecheck_localization.py citation — see Localization check above. ItRadioModel.h's submitTxAudio comment still described the parameter as
clientLeveled, "true for external TCI/DAX client audio" — a bool that no longer
exists, in the same class as the AudioEngine.h nit. Corrected to name the three
states and to say that this seam only forwards the tag.
Nothing. Every finding held when checked against the source.
ten9876, review 5205796898)That pass built this head, ran every touched target, and broke the code on
purpose four times. No blockers. Six nits, all taken; 6fbc9703 carries
the four that are code or docs, and this body carries the other two.
Hl2TxDsp.h — the declaration of the function this PR exists to changeclientLeveled and "THE FLAG IS NOW INERT HERE … nothingHl2Backend.cpp — the comment named tciAudioFresh() as what keeps twofeedDaxTxAudioInternal arms m_tciAudioTimer under markExternalSourcestartWsprPump() says as much insetDaxTxMode(true) in startWsprPump()Ax25HfPacketDecodeDialog, and the radeMode early return. Not a livedocs/radio-certification.md — the TX:ALCGAIN row set its criterionalcHoldBelowDbfs and the makeup ceiling" and "capped at unity forclientLeveled audio". fix(hl2): make the ALC reduction-only and widen the mic slider (#5463 change 3) #5646 removed the first two, this branch removes theIcomCivBackend.cpp — still called it "the flag".a9415acc and 3d7e5187".13b634b0 quoted in the round-1 reply. It also said five commits, and quoted aPR_BODY as the commit message,main's history.f99e386a headline naming one token while the commit also carried themain at all — the PR titleRe-run on 6fbc9703 (RelWithDebInfo, Arch, Qt 6.11.2): hl2_txdsp_test,
tx_audio_source_wiring_test, hl2_tx_level_policy_test,
hl2_dsp_readback_test, hl2_tx_gate_test, icom_identity_test and
hl2_tci_signaling_test all pass. hl2_tx_loopback_test builds with
-DAETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and skips at exit 77 with no simulator
present. check_engine_boundary.py 0 would block, check_test_registration.py
OK, check_ci_test_gate.py ok. The change is comments and one documentation row;
there is no executable difference from f99e386a.
ten9876, review 5218387337)That pass built this head, ran every touched socket-free target, drove the app
offscreen against the demo simulator, and broke the code on purpose four times.
Three blockers, two of them in code this branch does not touch. All fixed.
Blocker 1 — the #4796 behavioural guard had gone inert.
tests/hl2_tci_signaling_test.cpp asserted the property with
monitor.first().at(1).toBool(). That was exact while the argument was a bool;
when it became TxAudioSource the call kept compiling and stopped meaning
anything, because toBool() goes enum → int → bool and reads both
ClientLeveled(1) and EngineGenerated(2) as true. The reviewer applied the
exact regression this branch's own wiring test exists to catch — tagging
markExternalSource == true as EngineGenerated — rebuilt, and got
hl2_tci_signaling_test: all checks passed, exit 0. This branch updated
icom_identity_test to compare the enum and missed the sibling, and because the
file is not in the diff nothing flagged it. It compares the enum now, and the
same mutation fails it.
Blocker 2 — AX.25 had lost every upward drive control. See Scope narrowed
after review at the top and Not fixed, and named so. The justification this
body gave for leaving it ("AX.25 computes a level per frame") was not what the
code does, and is corrected above.
Blocker 3 — the retired safety claim was still in Hl2Backend.cpp.
6fbc9703 was titled "correct four places that still describe the bool", and
this body calls the identical sentence in Hl2TxLevelPolicy.h the worst of the
round-1 findings. It survived 130 lines away on setMicGain() itself — the
function the slider calls — along with "the same on every path" and "the one
path-dependent thing left", both falsified by this branch. Rewritten.
TxAudioSource has its own header. AudioEngine.h did not includeIRadioBackend.h before this branch and is itself included by 75 files;Hl2TxDsp.h picked it up too. 1378 lines of backend seam for a three-valuesrc/core/backends/TxAudioSource.h now carries the type, its metatypedeclares X checks could not fail. Scoped to theMainWindow::activateRADE() refuses a radio that cannot provide DAX audio:307 records that not guarding it was a segfaultTxAudioSource.h, Hl2TxDsp.h,Hl2TxLevelPolicy.h, AudioEngine.h and docs/radio-certification.md.setDaxTxMode(true)radeMode early return both act on onTxAudioReady. The client pathfeedDaxTxAudio returns early whilem_wsprBeacon->isActive(). Both are named now, and it is no longer only anHl2TxDsp::processAudioBlock drops carried m_inBuffer residuehealthSnapshot() gains a txAudioSource row besidetxMicPeakDbfs, and micGainAppliedLinear now says it is what the modulatorqRegisterMetaType uses the qualified name, as AetherClockEngine.cpp:293KiwiSdrManager.cpp:376 do.target_include_directories ontx_audio_source_wiring_test (it includes only Qt headers), andhl2_txdsp_test's mp, which was threaded through five calls and discarded —EngineGenerated path itTX:ALCGAIN's meter face. Hl2Backend.cpp still declares it -20.0, 40.0
with a comment naming Hl2TxDsp::Config::alcMaxGainDb, a field #5646 deleted;
under a unity ceiling the top 40 dB is unreachable. Real, and #5646's to fix —
left there rather than widening this diff into the branch below it.
RelWithDebInfo, Arch, Qt 6.11.2. hl2_txdsp_test, tx_audio_source_wiring_test,
icom_identity_test, hl2_tci_signaling_test, hl2_tx_level_policy_test,
hl2_tx_gate_test, hl2_dsp_readback_test all pass, and every new guard was
broken on purpose to confirm it fires:
| mutation | result |
|---|---|
TCI tagged EngineGenerated |
hl2_tci_signaling_test fails (passed green before blocker 1's fix) |
AX.25 tagged EngineGenerated |
icom_identity_test fails |
| residue guard removed | hl2_txdsp_test fails, residue at +20.0 dBFS |
| enum gutted to one enumerator | tx_audio_source_wiring_test fails all three |
check_engine_boundary.py 0 would block, check_test_registration.py OK,
check_ci_test_gate.py ok. No CHANGELOG.md entry and no workflow edits.
🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There is no fixes/closes #NNNN here — by design; #5646 closes #5463 and this branch is explicitly scoped to the TxAudioSource split with no defaults. Reviewed against its own stated intent, it does what it says: the bool becomes a three-state source, Hl2TxDsp bypasses m_micGain for EngineGenerated, the unkey diagnostic is gated off for it, and the ALC is left alone for all three. Per GOVERNANCE.md this is a bug fix with a named root cause (the bool that could not distinguish mic from generator), so it does not need an RFC — but the seam-type widening is the one piece that wants a maintainer word, and you already asked for it, which is the right call.
I reviewed only a9415acc and 3d7e5187 as the body asks; the other three commits are #5646's and are reviewed there.
| File / group | What it changes | Claimed by the body? | Verdict |
|---|---|---|---|
IRadioBackend.h |
bool clientLeveled → enum class TxAudioSource, Q_DECLARE_METATYPE |
yes, and flagged as a judgement call | Needs maintainer decision — widens a seam type every backend implements |
AudioEngine.{h,cpp} |
metatype registration; mic emit → Microphone; markExternalSource → ClientLeveled/EngineGenerated |
yes | in scope |
Hl2TxDsp.{h,cpp} |
per-block micGain = 1.0 for EngineGenerated, used by both loops |
yes | in scope |
Hl2Backend.{h,cpp} |
m_txAudioEngineGenerated, diagnostic gate |
yes | in scope |
IcomCivBackend.{h,cpp}, RadioModel.{h,cpp}, MainWindow.cpp |
type propagation only | yes | in scope — I read each; no family branch, no new logic |
tests/hl2_txdsp_test.cpp |
enum threading + new engine-generated case | yes | in scope |
tests/icom_identity_test.cpp |
asserts source == ClientLeveled at runtime |
yes | in scope |
tests/tx_audio_source_wiring_test.cpp, tests/tests.cmake |
new source-text test, registered | yes | in scope (see nit 2) |
docs/radio-certification.md, Hl2TxLevelPolicy.h, hl2_tx_level_policy_test.cpp, hl2_dsp_readback_test.cpp, MainWindow_Session.cpp |
— | #5646's commits, shown here only because of the fork base-branch limitation | not this PR's scope |
Nothing in the two commits under review is unexplained. No CHANGELOG.md entry — correct. No settings keys, no new capability field, no protocol verb.
Socket tests: this PR adds none. tx_audio_source_wiring_test links only Qt6::Core, opens no socket and no peer — it reads three source files under AETHER_SOURCE_DIR. It is registered at tests/tests.cmake:3532 and tools/check_ci_test_gate.py passes (7 frozen, 7 selected, 436 registered). It does, however, change the build status of an existing socket-owning test — see Blocker 1.
1. A sibling call site was missed, and it breaks the weekly sanitizer build.
tests/hl2_tx_loopback_test.cpp:418 still reads backend.submitTxAudio(pcm, kRate, /*clientLeveled=*/false) against Hl2Backend backend; (line 273). TxAudioSource is a scoped enum, so bool will not convert — I confirmed the diagnostic class on this toolchain (cannot initialize a parameter of type 'S' with an rvalue of type 'bool').
That target is behind AETHER_ENABLE_HL2_TX_LOOPBACK_TEST, which is OFF by default — which is why your 417/417 run and the five green checks on 3d7e5187 do not see it. But .github/workflows/sanitizers.yml:126 sets it ON, and the comment immediately above that line says why: "Building it weekly keeps the source honest against API drift now that it is out of the default graph." This is exactly that drift. Fix is one token: TxAudioSource::Microphone.
Related but not a blocker: tests/icom_backend_test.cpp has four identical stale calls (1098, 1114, 1138, 1351). That target sits inside the #[==[ … ]==] bracket comment at tests/tests.cmake:786–808, so it is retired and does not build. Worth updating anyway so the day someone revives it is not spent on this. Inline comment on Hl2Backend.h.
Hl2TxLevelPolicy.h:76–77 now asserts the opposite of what the code does. "At 0 nothing transmits, as a plain 0.0x multiply on every path" was true when m_micGain was in every path. After this PR EngineGenerated never sees micSliderToLinear, so mic slider 0 no longer silences a WSPR beacon, an AX.25 frame or the RADE waveform on an HL2. I think that is the behaviour you want — a mute for a microphone should not mute a beacon — but the file's own closing sentence tells the operator it is "worth knowing before parking the control at 0 between voice sessions", which now reads as a safety claim that is no longer true. Worth one line in the body's "who is affected" too: it is a user-visible change nobody would predict from the title. Inline comment there.src/core/AudioEngine.cpp is in aethercore (CMakeLists.txt:804), and icom_identity_test (tests/tests.cmake:764–767) links aethercore, stands up a real AudioEngine with hostModulation() true, and — in this very commit — asserts source == TxAudioSource::ClientLeveled on a live txFinalMonitorPcmReady. sendModemTxAudio(QByteArray) is public and hits the m_hostModulation branch in one call, so the EngineGenerated tag is reachable behaviourally in that same fixture without going near a 111.6 s WSPR frame or the 35 s approval ceiling. The 111.6 s argument is sound for the end-to-end beacon leg; it does not carry the modem branch. Not merge-gating — the test is honest about its limits and the tagging has no other deterministic seam today — but the justification is stronger than the facts support.AudioEngine.h:730–733 still describes the non-ClientLeveled bucket as "the mic chain or the engine's own tone generators" — the exact conflation this PR exists to split. Stale by one revision.TxAudioSource lands in the global namespace while everything else in IRadioBackend.h is inside namespace AetherSDR (Q_DECLARE_METATYPE(AetherSDR::IRadioBackend::LinkStats) right above the new one). IRadioBackend.h is now reached from AudioEngine.h and Hl2TxDsp.h, so this is a new global-scope name in a widely-included header.tools/check_localization.py ("4 hits, 0 violations") and quotes its docstring. That file exists in neither this PR head nor main — tools/ has check_engine_boundary.py, check_test_registration.py, check_ci_test_gate.py and friends, no localization checker. If it is a local/agent-side tool, say so; as written it reads as a repo gate a reviewer can re-run.CodeGuard: the five CG-PATH-001 findings all point at src/gui/MainWindow.cpp:9085–9318. This PR touches that file only at lines 1722–1745. Unrelated to the diff — dropped.
ClientLeveled reaches processAudioBlock on the same branch clientLeveled == true took, the ceiling is unity either way, and hl2_txdsp_test's three #4796 cases were retyped and not otherwise touched. icom_identity_test additionally pins the tag at runtime.m_inBuffer residue is processed under the wrong micGain. Hl2Backend.cpp's own comment warns about exactly this. I could not construct it: onTxAudioReady returns before the mic emit when m_daxTxMode is set and again inside the radeMode branch (AudioEngine.cpp:9085–9110), so RADE and DAX never coexist with a Microphone emit. If you know of a path where a mic block and an engine block land in the same over, that is where it bites.m_alcGain from loud mic audio attenuating the first blocks of a beacon. Hl2TxDsp::reset() sets it back to 1.0 on unkey (Hl2TxDsp.cpp:155), so it does not survive a key edge.qRegisterMetaType<TxAudioSource> runs in AudioEngine's constructor, before MainWindow connects either lambda, and Q_DECLARE_METATYPE is present, so the Qt 6 queued path is covered twice over rather than not at all.hl2_txdsp_test case against the unfixed code. It is not vacuous: with m_micGain still applied, the 0.1×/100× legs are 60 dB apart and spreadDb < 0.5 fails outright. The vsControlDb check against a measured mic-at-unity control rather than a constant is the right call given the modulator's own scale factor.check_engine_boundary.py (0 would block) and check_test_registration.py (OK) both pass on the head checkout, so AudioEngine.h reaching for the seam header is within the rule rather than around it./tmp/aetherclaude/pr-5647 plus a standalone compile of the bool→scoped-enum conversion. I cannot reproduce the bench numbers (wspr-real-beacon-source-ab, wspr-unattended-ab) or the 0.0 dB slider-move result; those rest on your run records. The check_localization.py output I could not verify at all, per the nit above.Request changes, for the one-token fix in tests/hl2_tx_loopback_test.cpp:418 — the weekly sanitizer lane exists to catch precisely this drift and will go red on it. Everything else is a nit. The design is right and the split is the correct seam: a bool that conflated an operator standing at the mic with an unattended beacon was the actual defect, and the enum names it rather than papering over it. The scope discipline is genuinely good — splitting the WSPR default out of an enum refactor was the right instinct, and the body's own "not repaired here" table is the kind of thing that makes a stacked series reviewable.
Next step: fix line 418, update the four retired-target calls while you are there, correct the Hl2TxLevelPolicy.h "At 0" sentence, and add the slider-0 consequence to the body. The seam-widening question is a maintainer call — my read is that the enum belongs where you put it and does not need its own PR, but that is not my ruling to make.
🤖 aethersdr-agent · cost: $9.1299 · model: claude-opus-5
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Cisco CodeGuard — static analysis of this PR (5 finding(s))
Automated static scan by Cisco DefenseClaw CodeGuard on the changed files. Advisory — some may be false positives; the review above verifies them. 🤖 aethersdr-agent · cost: $10.1857 · model: claude-opus-5 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Antares Detector — candidate vulnerable file(s)
The HL2 backend implements the radio's UDP transport and deserializes HL2 packets (MetisClient, Hl2RxDsp). AudioEngine uses QUdpSocket for UDP transport; these subsystems handle untrusted network input that can trigger unsafe memory operations such as buffer overruns or unsafe deserialization. The relevant dangerous APIs are likely in the packet framing/deserialization logic and any network socket read implementations. Localized by Cisco Foundation AI Antares-1B running locally in the AetherClaude sandbox, seeded by the Cartographer security map. Advisory only — please verify before acting. 🤖 aethersdr-agent · cost: $10.1857 · model: claude-opus-5 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Every finding held when I checked it against the source. Nothing to push back on — pushed as The blockerRight, and right about why nothing caught it. Thank you specifically for the sanitizer catch. A lane that runs weekly is exactly the one nobody checks, and this is the second time in one evening that a target outside the default graph went stale under a signature change — So I did not just assert the fix. Configured with Your predicted diagnostic class, from the line you named. Restored, rebuilt clean.
The nit that was not a nit
Corrected in the file, and named in the body's "who is affected" rather than buried: it is user-visible, and nobody would predict it from the title. The behaviour stays as you read it — a microphone mute has no business muting a beacon — and The rest
While fixing those I found one of the same class you did not flag: The
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
13b634b to
f99e386
Compare
|
Rebased onto Note on ordering: this PR carries the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The advice fires on audio the operator's microphone did not produce. WSPR, AX.25 and RADE reach submitTxAudio() with `clientLeveled` false, exactly like the microphone, and a beacon at its -20 dBFS default sits about 18.6 dB under the ALC target — past the 12 dB margin. Every beacon unkey would tell the operator to raise a mic gain that has nothing to do with the level. It cannot be aimed from this branch. The seam here is `submitTxAudio(..., bool clientLeveled)` — two states, and engine-generated audio is not one of them. Distinguishing it means the three-state TxAudioSource, which is aethersdr#5647's substance and reaches four files above the HL2 backend; importing it would move aethersdr#5647 into aethersdr#5646 and take this change's localization from one hit to four. So the advice goes, and aethersdr#5647 reintroduces it gated on `!m_txAudioEngineGenerated`. The measurement stays: `m_txMicPeakMaxDbfs` still tracks and still reaches the health snapshot, so the number is readable even while nothing volunteers it. Merge order matters one way only: aethersdr#5647 carries the advice with its gate, and this removal must not be applied over it. Reported by K5PTB on aethersdr#5646. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No fixes/closes — by design; #5646 closes #5463 and this branch is scoped to the TxAudioSource split and sets no defaults. Against its own stated intent it does exactly what it says: the bool becomes a three-state source, Hl2TxDsp substitutes 1.0 for m_micGain on EngineGenerated, the unkey "raise mic gain" diagnostic is gated off for it, and the ALC is left alone on all three paths. Per GOVERNANCE.md §"What does NOT require an RFC" this is a bug fix with a named root cause, so no RFC — the seam widening is the one piece wanting a maintainer word, and you asked for it rather than waiting to be asked.
I built this head and ran it. The previous round's blocker is genuinely fixed, and I could not find a new one. Everything below is a nit.
Only a7139545, d14c6970 and f99e386a are this PR's. I checked the four files below rather than taking the body's word for it: each has a zero diff across f6f5fed7..f99e386a, this PR's own range.
| File / group | What it changes | Claimed by the body? | Verdict |
|---|---|---|---|
IRadioBackend.h |
bool clientLeveled → enum class TxAudioSource in namespace AetherSDR; Q_DECLARE_METATYPE |
yes, flagged as a judgement call | Maintainer call — see §5 |
AudioEngine.{h,cpp} |
metatype registration; mic emit → Microphone; markExternalSource → ClientLeveled/EngineGenerated |
yes | in scope |
Hl2TxDsp.{h,cpp} |
per-block micGain = 1.0 for EngineGenerated, used by both loops |
yes | in scope — but see nit 1 |
Hl2Backend.{h,cpp} |
m_txAudioEngineGenerated, unkey-diagnostic gate |
yes | in scope |
Hl2TxLevelPolicy.h |
retires the false "0 mutes every path" safety claim | yes, prominently | in scope |
IcomCivBackend.{h,cpp}, RadioModel.{h,cpp}, MainWindow.cpp |
type propagation only | yes | in scope — read each; no family test, no new above-seam logic |
tests/hl2_txdsp_test.cpp |
enum threading + the new engine-generated case | yes | in scope |
tests/icom_identity_test.cpp |
runtime assert source == ClientLeveled |
yes | in scope |
tests/tx_audio_source_wiring_test.cpp + tests/tests.cmake |
new source-text test, registered | yes | in scope |
tests/hl2_tx_loopback_test.cpp |
the sibling call site, 1 token | yes | in scope — closes the prior blocker |
tests/icom_backend_test.cpp |
4 stale calls in a retired target | yes | in scope |
docs/radio-certification.md, MainWindow_Session.cpp, hl2_tx_level_policy_test.cpp, hl2_dsp_readback_test.cpp |
— | #5646's commits | not this PR's — zero diff in this PR's own range |
No CHANGELOG.md entry — correct. No settings keys, no capability field, no protocol verb. check_test_registration.py OK; check_ci_test_gate.py ok (7 frozen, 7 selected, 443 registered); check_engine_boundary.py 0 would block.
Socket tests: this PR adds none. tx_audio_source_wiring_test links only Qt6::Core and opens nothing. It does modify one — hl2_tx_loopback_test.cpp, which binds an ephemeral UDP socket and keys against hpsdrsim. Per AGENTS.md I notified the operator before continuing and had explicit direction for this PR before touching it.
None.
1. Hl2TxDsp.h:109–129 still says the opposite of what the parameter now does — on the declaration of the function this PR exists to change.
The comment opens by naming a parameter that no longer exists and then states, in caps, that it is inert:
109: // `clientLeveled` marks audio whose level is owned by an external client —
113: // THE FLAG IS NOW INERT HERE, and saying so is the point of this comment.
121: // The ceiling is now unity on EVERY path, so the two branches have
122: // converged and there is nothing left for the flag to select.
…and then, eighteen lines later in the same block, line 131: "THE PARAMETER HAS A JOB AGAIN, AND IT IS THE MIC SLIDER." Against main the diff shows both of those as added lines in one hunk. The new half is yours; the stale half is #5646's, written when the flag really was inert, and the replacement started one line too far down.
This is the same class of finding the body itself ranks highest from last round — a comment in shipped source asserting the opposite of the code — and it was fixed in Hl2TxLevelPolicy.h, AudioEngine.h and RadioModel.h but not here. Inline comment — no suggestion block, because the fix needs line 109 and that sits just outside the diff.
2. docs/radio-certification.md:44 — the TX:ALCGAIN acceptance criterion now names three things that no longer exist. It reads "sweep the MIC input 20 dB, between alcHoldBelowDbfs and the makeup ceiling" and "capped at unity for clientLeveled audio". #5646 removed alcHoldBelowDbfs and the makeup ceiling; this PR deletes the last clientLeveled in the tree. grep -rn clientLeveled src/ tests/ docs/ at this head returns five hits, four of them explicitly historical narration and this one a live acceptance criterion a certifier reads. The row is inherited so you may prefer it on #5646 — but this PR is what makes the symbol unfindable. Inline comment.
3. The PR body is stale after the 2026-09-13 rebase. "Review only a9415acc and 3d7e5187" — neither object exists in the branch (git cat-file -t fails on both, and on 13b634b0 from the review reply). "currently shows five commits" — it shows six. "417 tests, 417 passed" is superseded by your own 423/424 comment. The instruction at the top of the body is the first thing a reviewer acts on, so it is worth more than its size.
4. IcomCivBackend.cpp:3250 still calls it "The flag". Same one-revision staleness as nit 1, one word. Inline suggestion.
5. f99e386a's headline undersells it. "the sibling call site the weekly sanitizer lane would have caught" names one token, but the commit also carries the namespace AetherSDR move for a type in a now widely-included header, the falsified-safety-claim correction in Hl2TxLevelPolicy.h, and three comment rewrites across eight files. Whoever bisects to it will not expect the namespace move.
6. Hl2Backend.cpp:3908–3915 names the wrong guard for the state this PR adds — and the cost of being wrong just went from 0 dB to 40 dB.
The comment your hunk sits directly on top of says the sticky OR leans on sources never interleaving inside one transmission, and names the mechanism:
"AudioEngine steps local mic capture aside while a TCI/DAX source is actively feeding (
onTxAudioReady'stciAudioFresh()gate). If that mutual exclusion is ever relaxed,Hl2TxDspwould flip its ALC per block and processm_inBufferresidue under the newest block's flag … Whoever touches the mic-capture gate owns re-checking this."
tciAudioFresh() does not provide that exclusion for EngineGenerated. feedDaxTxAudioInternal starts m_tciAudioTimer only when markExternalSource is true (AudioEngine.cpp:9681), and both engine feeds pass it false. startWsprPump()'s own comment says so outright: "onTxAudioReady() only bails out on m_daxTxMode; the WSPR feed passes markExternalSource=false … so without this the mic path keeps building TX packets" (AudioEngine.cpp:9875–9883).
What actually keeps a Microphone block out of an engine-generated over is three unrelated guards in three files — setDaxTxMode(true) in startWsprPump() (AudioEngine.cpp:9888), the same call in Ax25HfPacketDecodeDialog.cpp:2429, and the radeMode early return at AudioEngine.cpp:9104. I tried to construct an interleave through each and could not, so this is not a live defect. But the residue hazard used to cost nothing once #5646 made both ceilings unity, and after this PR it costs up to the full 40 dB of slider travel — while the comment still points the next maintainer at a gate that never covered this case. One line, and it is the cheapest possible insurance on the exact failure mode you built the enum to prevent. Inline comment.
IRadioBackend has no QPluginLoader and no Q_DECLARE_INTERFACE; all six implementers are in-tree (Flex, HL2, Icom, RTL-SDR, ANAN, Sim), only Hl2Backend and IcomCivBackend override submitTxAudio, and the base is a defaulted no-op, so every other backend compiles untouched. There is no out-of-tree ABI to break and every call site is compile-checked — I grepped for string-based QMetaObject::invokeMethod on submitTxAudio, processAudioBlock and txFinalMonitorPcmReady and there are none, so nothing can drift silently. On that basis I do not think this needs to be its own PR, but it is your call and the author has offered to split it.
And the slider-0 change wants an explicit nod, not just a disclosure. I classified it per the preference-vs-fix test: it is not a smuggled preference — there is no restyle, no reordering, no changed default value, and it follows necessarily from the root cause rather than from taste, which is why it is not a blocker. But GOVERNANCE.md's RFC list includes "Any change to default UX behavior — what a click, shortcut, or gesture does out of the box", and "drag the Mic Level slider to 0 and the transmitter stops" is default UX behaviour that Hl2TxLevelPolicy.h explicitly told the operator to rely on. It is inseparable from the fix, the body discloses it at length and in the right place, and the reasoning is sound — a microphone mute has no business muting a beacon. It still reads to me as your call to make rather than one a reviewer should wave through on the author's argument alone.
Merge ordering is the thing that actually needs a decision. #5646 alone drops the beacon to −20.002 dBFS; this PR leaves it there (repair_db 0.0, by the author's own measurement) and removes the mic slider as an accidental compensation for it; #5651 is what restores −3 dBFS. Between #5647 and #5651 merging, an HL2 WSPR beacon transmits ~18.6 dB low with no operator-accessible remedy. All three are open. That window is the maintainer's to size.
hl2_txdsp_test, hl2_tx_level_policy_test, hl2_dsp_readback_test, hl2_tx_gate_test, hl2_tci_signaling_test, icom_identity_test, tx_audio_source_wiring_test — all pass, and the new case reproduces the body's numbers exactly: spread 0.00 dB, +0.000 dB vs control, -6.02 dB for a 2:1 cut.micGain = m_micGain unconditionally) and rebuilt. hl2_txdsp_test fails: engine-generated: mic 1x 0.104536, 100x 1.022743, 0.1x 0.010454 -> spread 39.81 dB → FAIL: the mic slider does not reach engine-generated audio. The fix is load-bearing and the test is not vacuous.1.0 → 0.5 — a wrong level that is still perfectly consistent. Spread stays 0.00 dB and passes; the control check catches it: engine-generated vs mic-at-unity control: -6.021 dB → FAIL. The two checks are genuinely complementary, which is the part I expected to be able to poke a hole in and could not.micGain = (source == EngineGenerated) ? 1.0 : m_micGain leaves Microphone and ClientLeveled on exactly the arithmetic the old unconditional m_micGain gave them, so "TCI/DAX clients are unaffected" should be provable rather than argued. Under mutation 1 above — the fix fully reverted — every mic and client assertion in hl2_txdsp_test is unchanged, the three #4796 cases included, and the mic-slider line still reads -6.02 dB; only the engine-generated checks move. hl2_tci_signaling_test and icom_identity_test pass on both sides too. The claim holds.markExternalSource ? ClientLeveled : EngineGenerated. FAIL: markExternalSource=false maps to EngineGenerated, true to ClientLeveled. Then applied a behaviour-preserving refactor (same ternary hoisted into a named local) to see whether it is as brittle as source-text tests usually are — it passed, because simplified() still finds the expression.hl2_tx_loopback_test itself (operator-authorised for this PR under the AGENTS.md socket-test rule; configured -DAETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON). It links clean at this head and skips honestly and immediately — SKIPPED — nothing answering discovery at 127.0.0.1, exit 77 — rather than burning its timeout, which is the third obligation canon puts on a socket test.tests/hl2_tx_loopback_test.cpp:418:65: error: cannot convert 'bool' to 'AetherSDR::TxAudioSource' — same line, same class, different toolchain from the one in your reply (GCC/Arch here, Clang/macOS there). Restored, rebuilt clean.submitTxAudio, processAudioBlock, txFinalMonitorPcmReady and feedDaxTxAudioInternal. All compile-checked; the only non-compiled one is icom_backend_test.cpp inside the retired bracket at tests/tests.cmake:786–808, and it is updated anyway.AnanBackend.cpp:361 declares hostModulates = true // client-side WDSP, like the HL2 and does not override submitTxAudio — but canTransmit = false and takesTxAudioOverSeam is annotated "moot while canTransmit is false", so it is correctly unaffected. The body's "who is affected" enumeration omits it; harmless, but it is the one backend a reader would ask about.m_micGain across threads. Hl2Backend::setMicGain marshals it with a queued invokeMethod onto the DSP thread (Hl2Backend.cpp:4193), so write and read are both on that thread. No race, and the "decided once per block" phrasing is accurate.Hl2TxLevelPolicy.h had told the operator it was, which is why correcting it was the right call.vkamp_connection_test failure in your 423/424 comment. This PR touches nothing vkamp-related, and AGENTS.md's Test-layer boundary section already names that target as one of the four legacy fake-peer socket tests still in the default graph and tracked for socket-free extraction in #5254 — so "fails the same way on an untouched tree" is consistent with what canon says about it. I did not run it: it stands up a fake VKAMP amplifier, and re-running a known-flaky fake-firmware peer to confirm somebody else's negative is not worth the socket.AETHER_SETTINGS_DIR, explicit socket aethersdr-pr5647, AETHER_AUTOMATION_NO_TX=1, offscreen. connect list offered the operator's real FLEX-8600 alongside DEMO-0001; I attached explicitly to the demo and checked I was on it ("model":"AetherSDR Demo", "serial":"DEMO-0001", family sim). It starts, connects, registers its pan/waterfall streams and answers the bridge — no crash, and no Qt warning of any kind on stderr, which is where a Cannot queue arguments of type 'TxAudioSource' would land.testtone on 1000 -12, which drives onTxAudioReady). It did not reach the tap: this sandbox has no working capture device (the log is all ALSA unable to open slave) and get audio comes back with an empty tx block, so onTxAudioReady never ran and txFinalMonitorPcmReady was never emitted. The queued connection is therefore still unverified at runtime — everything I can say about it is from reading, plus the observation that in Qt 6 moc resolves a signal parameter's metatype at compile time for function-pointer connections, which makes the registration belt-and-braces rather than the only thing standing between you and silence. Reaching it properly needs a host with a capture device, or an HL2.wspr-real-beacon-source-ab, wspr-unattended-ab, the 18.59 dB vs 0.0 dB slider-move A/B) rest on your run records — no HL2 and no hpsdrsim on this box. The DSP change itself is not reachable from the demo, which is single-slice, not HL2 and cannot key, so the unit-level mutation work above is the instrument here rather than the bridge.🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Review nits on aethersdr#5647. No executable change: comments and one certification row. Hl2TxDsp.h carried both halves of the story on the declaration of the function this PR changes. It opened by naming `clientLeveled` and asserting "THE FLAG IS NOW INERT HERE ... nothing left for the flag to select", then said the opposite eighteen lines later. The stale half was written for aethersdr#5646, when the flag really was inert, and the replacement started one line too far down. The aethersdr#4796 history that still explains why the type is a source and not a bool is kept; the claim that it does nothing is gone. Hl2Backend.cpp named tciAudioFresh() as what keeps two sources out of one transmission. It is not, for engine audio: feedDaxTxAudioInternal arms m_tciAudioTimer under markExternalSource alone, and both engine-generated feeds pass it false. The exclusion comes from setDaxTxMode(true) in startWsprPump() and in Ax25HfPacketDecodeDialog, and from the radeMode early return. That distinction did not matter while the two buckets differed only in a ceiling they now share; with EngineGenerated bypassing m_micGain, misattributed m_inBuffer residue is worth the slider's full range, so the comment now names the real guards and says a fourth such feed owns re-checking. radio-certification.md's TX:ALCGAIN row set its acceptance criterion "between alcHoldBelowDbfs and the makeup ceiling" and "capped at unity for clientLeveled audio". aethersdr#5646 removed the first two and this branch removes the last, so the row named nothing that exists. It now states what a reduction-only stage with a unity ceiling actually does, and records that EngineGenerated moves it 0 dB by construction. IcomCivBackend.cpp still called the parameter "the flag". Every remaining `clientLeveled` in the tree is explicitly historical narration. Tests unchanged and re-run on this head: hl2_txdsp_test, tx_audio_source_wiring_test, hl2_tx_level_policy_test, hl2_dsp_readback_test, hl2_tx_gate_test, icom_identity_test and hl2_tci_signaling_test all pass; hl2_tx_loopback_test builds with AETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and skips at exit 77 with no simulator present. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
6fbc9703All six nits from review 5205796898 are taken, every thread on this PR is resolved, and the code that actually transmits is unchanged from f99e386a. Approving.
6fbc9703 is comments and one documentation row — no executable difference:
Hl2TxDsp.h |
dropped the stale opening that named clientLeveled and asserted "THE FLAG IS NOW INERT HERE … nothing left for the flag to select" eighteen lines above its own "THE PARAMETER HAS A JOB AGAIN". The #4796 history that still explains why the type is a source and not a bool is kept |
Hl2Backend.cpp |
the guard comment now says tciAudioFresh() is not what covers engine audio, and names the three that are: setDaxTxMode(true) in startWsprPump() and in Ax25HfPacketDecodeDialog, and the radeMode early return. Plus the raised stake, and the obligation on a fourth engine-generated feed |
docs/radio-certification.md |
the TX:ALCGAIN row no longer sets its criterion in terms of alcHoldBelowDbfs, "the makeup ceiling" and clientLeveled — all three now gone from the tree |
IcomCivBackend.cpp |
"the flag" → "the source tag" |
| PR body | the "review only a9415acc and 3d7e5187" instruction pointed at objects rebased away on 2026-09-13; five commits was seven; the 417/417 run predated two rebases. All corrected — and this mattered more than its size, because the repository squash-merges with PR_BODY as the commit message, so this text lands in main's history verbatim |
f99e386a's headline |
deliberately not fixed. Under squash-merge the per-commit headlines never reach main — the PR title does — so rewriting published history to repair a message that gets discarded costs more than it buys. Recorded in the body instead |
Every remaining clientLeveled in src/, tests/ and docs/ is now explicitly historical narration. The alcHoldBelowDbfs at docs/radio-certification.md:133 is left alone on purpose: it narrates a measurement on the pre-#5646 build and the paragraph closes by saying the signature disappears once the stage is reduction-only, so it is correct as history.
hl2_txdsp_test, tx_audio_source_wiring_test, hl2_tx_level_policy_test, hl2_dsp_readback_test, hl2_tx_gate_test, icom_identity_test, hl2_tci_signaling_test — all pass (RelWithDebInfo, Arch, Qt 6.11.2). hl2_tx_loopback_test builds with -DAETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and skips at exit 77 immediately rather than burning its timeout. check_engine_boundary.py 0 would block, check_test_registration.py OK, check_ci_test_gate.py ok.
I also re-confirmed all five round-1 findings are fixed at head rather than taking the reply's word for it: the loopback call site reads TxAudioSource::Microphone; "At 0 nothing transmits" is gone from Hl2TxLevelPolicy.h; the wiring test's premise is corrected in its own header; "the mic chain or the engine's own tone generators" is gone from AudioEngine.h; and the enum sits at IRadioBackend.h:45 inside namespace AetherSDR with Q_DECLARE_METATYPE(AetherSDR::TxAudioSource) at global scope.
The adversarial work behind the approval is in review 5205796898 and stands: reverting the micGain substitution fails the test at spread 39.81 dB; setting the substitution constant to 0.5 — wrong but consistent — is caught by the control check at -6.021 dB; reversing the tag mapping fails the wiring test; and under a full revert every mic and client assertion is unchanged, which is what makes "TCI/DAX clients are unaffected" a measured claim rather than an argued one.
This approval covers this PR's own four commits. It is not a green light for the seven commits that would actually land, and I am not arming auto-merge, for a reason that is not about this PR:
main contains #5646's three commits, and the repository squash-merges. Merging this lands all seven in one commit.CHANGES_REQUESTED with a measured blocker: the +40 dB widening in Hl2TxLevelPolicy.h puts slider 76–100 outside the modulator's overload guard — peak |IQ| 1.5391 at slider 100, hard-clipped by ep2WriteTxIq, and on the TCI/DAX path too. Auto-merging this PR would land exactly that change and moot that review.So: this one is ready and waiting. Order is #5646 (once its clipping blocker is settled) → #5647 → #5651, and the merge button stays a human decision until the first of those is resolved.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed at 6fbc9703, the head at the time of writing. Built it, ran every touched socket-free target, drove it offscreen against the demo simulator, and broke the code on purpose four times. The core change is right and its own new test is load-bearing — I checked by reverting the fix, and it fails.
Three blockers, two of them found by reading what is not in the diff. The strongest is mutation-proven: the one behavioural guard on the #4796 property went inert when the bool became an enum, and hl2_tci_signaling_test now passes green through exactly the regression the PR's new wiring test was written to catch.
No fixes/closes, by design: #5646 closes #5463, this branch is the TxAudioSource split and sets no defaults. Against its own stated intent it does what it says, and the parts that carry the claim survived being attacked:
| Claim in the body | How I tested it | Result |
|---|---|---|
| "the mic slider does not reach engine audio" | reverted the bypass to const double micGain = m_micGain;, rebuilt hl2_txdsp_test |
fails: spread 39.81 dB / FAIL: the mic slider does not reach engine-generated audio, exit 1. Restored → spread 0.00 dB. The new case is load-bearing |
| "the ALC is unchanged for all three sources" | one micGain is computed per block and used by both the peak estimator and the sample loop (Hl2TxDsp.cpp:252,259,304); no other m_micGain read survives in that TU |
holds |
| "two sources never interleave inside one transmission" | startWsprPump() (AudioEngine.cpp:9888) and Ax25HfPacketDecodeDialog (:2429) both setDaxTxMode(true); onTxAudioReady() returns early on m_daxTxMode (AudioEngine.cpp:9118) |
holds for both HL2-reachable engine feeds |
| "Hermes-Lite 2 only" | AnanBackend also sets hostModulates = true (AnanBackend.cpp:361) — but it declares no submitTxAudio override and canTransmit is false, so it takes the base no-op |
holds today |
| "a queued connection cannot marshal a type Qt was never told about" | icom_identity_test delivers a real queued txFinalMonitorPcmReady and now asserts source == TxAudioSource::ClientLeveled on it |
passes, 14.11 s |
Per GOVERNANCE.md "What does NOT require an RFC" this is a bug fix with a named root cause, so no RFC. The seam widening is the maintainer's call and you asked for it rather than waiting to be asked — see §5.
CI green is not coverage here, and that is fine. tools/check_ci_test_gate.py reports the per-PR gate resolves to 7 frozen tests; neither hl2_txdsp_test nor tx_audio_source_wiring_test is among them (by design — .github/ci-test-gate.txt says new tests run unfiltered on full-suite.yml and weekly under the sanitizers). So I ran them locally instead of reading the badge.
Against this PR's own range, f6f5fed7..6fbc9703 — the other three commits are #5646's objects, byte-identical, as the body says.
| File / group | What it changes | Claimed by the body? | Verdict |
|---|---|---|---|
IRadioBackend.h |
bool clientLeveled → enum class TxAudioSource in namespace AetherSDR; Q_DECLARE_METATYPE |
yes, flagged as a judgement call | Maintainer call — see §5 |
AudioEngine.{h,cpp} |
metatype registration; mic → Microphone; markExternalSource → ClientLeveled/EngineGenerated |
yes | in scope |
Hl2TxDsp.{h,cpp} |
per-block micGain = 1.0 for EngineGenerated |
yes | in scope |
Hl2Backend.{h,cpp} |
m_txAudioEngineGenerated; unkey diagnostic gate; signature |
yes | in scope |
Hl2TxLevelPolicy.h |
retires the "0 mutes every path" claim | yes | in scope — and see blocker 1, which is the half that was missed |
IcomCivBackend.{h,cpp}, RadioModel.{h,cpp}, MainWindow.cpp |
type propagation only; no family test, no new above-seam branch | yes | in scope |
docs/radio-certification.md |
one row: the EngineGenerated bypass sentence on TX:ALCGAIN |
yes | in scope — nit 3 on the RADE half |
tests/hl2_txdsp_test.cpp |
signature + the new EngineGenerated case |
yes | in scope |
tests/tx_audio_source_wiring_test.cpp, tests/tests.cmake |
new source-text test | yes, and disclosed as source-text | in scope — nits 1 and 2 |
tests/hl2_tx_loopback_test.cpp |
one token, opt-in target | yes | in scope |
tests/icom_backend_test.cpp |
four stale calls in the bracket-retired target | yes, and disclosed as unverifiable | in scope |
tests/icom_identity_test.cpp |
asserts ClientLeveled on a live AudioEngine |
yes | in scope |
Nothing in the diff is unexplained by the stated change. The body's own checklist holds: no CHANGELOG.md entry (correct — it is a release-prep file), no workflow edits, no formatting churn. authoredDate on the four own commits is 2026-09-07, 09-07, 09-12, 09-15 — no outlier and no cherry-picked local workaround riding along.
tests/hl2_tci_signaling_test.cpp:488:
check(monitor.first().size() >= 2 && monitor.first().at(1).toBool(), "host modulation: TCI audio is marked client-leveled at the tap");
at(1) used to be a bool, so .toBool() was exact. It is now a QVariant holding TxAudioSource, and .toBool() goes enum → int → bool: Microphone(0) → false, ClientLeveled(1) → true, EngineGenerated(2) → true. The assertion can no longer tell the two apart.
Proved, not argued. I applied exactly the regression this PR's new wiring test says must never happen silently — reversed the ternary in feedDaxTxAudioInternal so markExternalSource == true tags EngineGenerated — rebuilt, and ran it:
[415/416] Linking CXX executable hl2_tci_signaling_test
hl2_tci_signaling_test: all checks passed
EXIT=0
Green. Before this PR the same mutation would have flipped the bool and failed the check. This PR correctly updated icom_identity_test to source == TxAudioSource::ClientLeveled and missed the sibling, and because the file is not in the diff nothing flagged it. The fix is the same edit:
check(monitor.first().size() >= 2 && monitor.first().at(1).value<TxAudioSource>() == TxAudioSource::ClientLeveled, "host modulation: TCI audio is marked client-leveled at the tap");
This one is squarely in the "distrust green" column: seven targets pass, CI is green, and the guard on the regression the whole ClientLeveled state exists to prevent is inert.
Hl2TxDsp.cpp:252. The PR body says AX.25 needs no default correction because it "computes a level per frame". It does not. The AFSK generator uses a compile-time constant:
src/core/tnc/AetherAx25LibmodemShim.cpp:93: constexpr double kTxAfskAmplitude = 0.35;
src/core/tnc/AetherAx25LibmodemShim.cpp:311: const float sample = static_cast<float>(kTxAfskAmplitude * std::sin(phase));
That is the only amplitude in the TX path (feedDaxTxAudioInternal applies no gain — its only level code is the meter measurement), and Ax25HfPacketDecodeDialog has no level control at all: its spin boxes are TNC port, paclen, retry count, beacon interval and digi dupe seconds. The per-frame numbers the dialog prints (RMS %9 dBFS, peak %10 dBFS) are a measurement, not a control.
So the arithmetic:
| AX.25 output | 0.35 = −9.12 dBFS |
alcTargetPeak |
0.85 = −1.41 dBFS |
| unreachable headroom | 7.71 dB |
#5646 removed the 40 dB of makeup that used to normalise this onto the target. Until this PR the Mic Level slider's +40 dB could still close the gap. After it, EngineGenerated bypasses m_micGain and the ALC only reduces — so an HF packet mode transmits 7.7 dB below full modulation with nothing in the product able to raise it.
The principle the PR argues from — "the generator chose the level on purpose" — is doing work here that the generator did not do: 0.35 is a fixed constant, not a level chosen against the HL2's reduction-only chain, and unlike WSPR there is no follow-up PR setting a default for it. Three ways out, all the maintainer's call: keep AX.25 on Microphone, give the shim its own level the way #5651 does for WSPR, or accept −9.12 dBFS and say so.
(The RADE half of the same argument does not apply — see nit 3, RADE cannot reach an HL2 at all.)
Hl2Backend.cpp:4188 still tells the operator that 0 stops the transmitter6fbc9703 is "correct four places that still describe the bool", and the body calls the identical sentence in Hl2TxLevelPolicy.h "the worst of the findings ... wrong in shipped source, about transmitting". It survives 130 lines away, in the doc comment on setMicGain() — the function the slider actually calls:
// Level 0 mutes outright rather than resolving to -20 dB. A slider at the bottom
// of its travel means off.
Two neighbours in the same block are falsified too: :4175 "WHAT THIS BUYS is now the same on every path" (now two paths, absent from the third) and :4183 "The one path-dependent thing left is setKeying()'s 'raise mic gain' diagnostic" (this PR makes m_micGain itself path-dependent). Suggestion inline.
1. Three checks in tx_audio_source_wiring_test cannot fail — proved by mutation. The doc comment on submitTxAudio() spells all three names in prose, so a whole-file contains() is satisfied by the comment, not the enum. I replaced the enum body with a single Nothing = 0, enumerator and re-ran the built binary:
[ OK ] TxAudioSource declares Microphone
[ OK ] TxAudioSource declares ClientLeveled
[ OK ] TxAudioSource declares EngineGenerated
tx_audio_source_wiring_test: all checks passed
EXIT=0
The rest of the file is load-bearing — reversing the ternary gave [FAIL] markExternalSource=false maps to EngineGenerated, true to ClientLeveled, exit 1. Three checks, not the test. Suggestion inline.
2. Canon prefers a behavioural seam, and this PR's own header shows one is a single call away. AGENTS.md §Test-layer boundary: "Prefer behavioral seams over source-text assertions: a test that greps a source file for an expression breaks on behavior-preserving refactors and gets deleted by whoever it fires on." The header already concedes the premise that justified source-text was wrong. Blocker 1 is the sharp edge of this: the behavioural guard that did exist was allowed to rot while a source-text one was added beside it.
3. RADE is named in five places as an affected HL2 source, and it cannot reach an HL2. MainWindow::activateRADE() refuses on any radio without DAX audio — MainWindow_DigitalModes.cpp:323, "RADE needs DAX audio, which this radio does not provide", with a QMessageBox saying "only a FlexRadio" (and :307 records that not guarding it was a segfault on a Hermes-Lite 2). The Flex backend has no submitTxAudio override. So docs/radio-certification.md:44's "a mic-slider sweep moves this reading 0 dB for the WSPR, AX.25 and RADE sources by construction" names a source that cannot be swept on the radio the row certifies; Hl2TxLevelPolicy.h:86, Hl2TxDsp.h, IRadioBackend.h and AudioEngine.h carry the same wording.
4. The exclusion argument covers the mic path and not the client path. Hl2Backend.cpp:3916 names setDaxTxMode(true) and the radeMode early return as what keeps two sources out of one over. All three suppress onTxAudioReady — the microphone. Nothing suppresses the client feed: AudioEngine::feedDaxTxAudio returns early only on m_wsprBeacon->isActive() (AudioEngine.cpp:9661). WSPR is therefore covered; AX.25 is not, and MainWindow_DigitalModes.cpp:1253 gates the DAX bridge on isDaxTxMode(), which AX.25 sets true. So a PipeWire/TCI client streaming during an AX.25 over interleaves ClientLeveled and EngineGenerated blocks into one Hl2TxDsp, and the m_inBuffer residue is multiplied by whichever arrived last. The comment is right that this "cost nothing while the buckets differed only in a ceiling they now share" — it just doesn't name a guard that closes it. Flushing m_inBuffer when source changes inside one over is the missing one-liner.
5. AudioEngine.h now pulls 1378 lines of IRadioBackend.h into 75 translation units for a three-value enum, and Hl2TxDsp.h — a DSP header — into four more. Neither included it before. A four-line core/backends/TxAudioSource.h would keep the type where the seam declares it and answer §5's question in the cheapest possible way.
6. The tag is tracked and never surfaced. m_txAudioEngineGenerated is read only to suppress a log line. The body's case for the wiring test is that "a mis-tag is otherwise silent" — and healthSnapshot(), whose thesis is "report what the modulator is running", is where an operator would look. Related: micGainLinear in gatherDspChains() and appliedMicGainLinear in the health snapshot now report a multiplier that was not applied on an engine-generated over.
7. TX:ALCGAIN's meter face is two-thirds dead scale, and its comment names a field that no longer exists. Hl2Backend.cpp:5641 still declares def(9, "TX", "ALCGAIN", "dB", -20.0, 40.0, ...), and the comment above it says "The top is Hl2TxDsp::Config::alcMaxGainDb (40 dB of makeup on the mic path)" — Config now holds only alcEnabled, alcTargetPeak, alcAttackSec, alcReleaseSec. With a unity ceiling the reading is bounded at 0 dB, so the needle can never enter the top 40 dB. This is #5646's to fix, not this PR's — flagging it here because this PR rewrote the docs/radio-certification.md row that describes this very meter and the meter itself was left behind.
8. Three small ones. tests/tests.cmake:3560 — target_include_directories(tx_audio_source_wiring_test PRIVATE src) is dead; the test includes only <QByteArray> <QFile> <QString> <cstdio> and reaches sources through AETHER_SOURCE_DIR. tests/hl2_txdsp_test.cpp:720 — float mp is threaded through five modulate() calls only to fill a positional slot and never asserted on; the pre-slider mic peak is in fact the interesting half of the EngineGenerated claim. AudioEngine.cpp:1873 — qRegisterMetaType<TxAudioSource>("TxAudioSource") uses an unqualified alias where the rest of the tree registers the qualified spelling (AetherClockEngine.cpp:293, KiwiSdrManager.cpp:376); harmless today (my bridge run logged no queued-connection warnings) but inconsistent.
IRadioBackend::submitTxAudio's third parameter changes for every backend. My read: it is justified — the bool genuinely cannot express the distinction, and a three-state origin tag on a TX-audio seam is the right shape — but nit 4 offers the split without a separate PR.Microphone, give the shim its own control the way #5651 does for WSPR, or ratify −9.12 dBFS as the level an HL2 packet station transmits at. The PR's stated reason for leaving it ("AX.25 computes a level per frame") is not what the code does, so this needs a decision rather than a deferral.CHANGES_REQUESTED on that PR. The body says so; repeating it here because it is the one way this PR can go wrong without any code being wrong.tests/hl2_tx_loopback_test.cpp is modified by this PR (one token, /*clientLeveled=*/false → TxAudioSource::Microphone). It is socket-owning — UDP to hpsdrsim, one of the four legacy fake-peer targets #5254 tracks — and it is option()-gated OFF by default with SKIP_RETURN_CODE 77. Per the test-boundary rule I notified the operator and did not build or run that target, and I did not verify the author's claim that it builds clean under -DAETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON. Everything else I ran is socket-free. No new socket test is added, so the disclosure/naming/exit-77 obligations do not newly apply.
m_micGain read in Hl2TxDsp.cpp is converted; the local is computed once and shared, so the ALC's estimate and the modulator's sample cannot diverge by block alignment.feedDaxTxAudioInternal call sites (AudioEngine.cpp:9498, :9664, :9964) and both false ones suppress the mic path themselves. Hl2Backend::submitTxAudio sets the sticky flags after the !m_keyed early return, so unkeyed blocks cannot poison an over.MainWindow_Session.cpp:1093 returns early on hostModulatesTxAudio(), so the slider never reaches setPcMicGain on an HL2 — which would have left RADE with nothing after this change. It dies on nit 3: RADE is refused on an HL2 before it can start.AnanBackend sets hostModulates = true; it has no override and canTransmit is false.CG-PATH-001 hits point at MainWindow.cpp:9085/9197/9316-9318, which are the NR2 FFTW-wisdom dialog's QLabel text and its cancel handler — no path handling, and nowhere near this PR's MainWindow.cpp hunks at :1722-1741. False positives. Antares' candidate files are the HL2/AudioEngine UDP transports, which this PR does not touch.AETHER_SETTINGS_DIR/HOME and an explicit socket, AETHER_AUTOMATION_NO_TX=1. connect list offered both the demo and the operator's real FLEX-8600; the fresh store meant AutoConnectToLastRadio did not fire, and I attached explicitly: connect local serial DEMO-0001 → connect wait 30000 → {"connected": true, "model": "AetherSDR Demo", "serial": "DEMO-0001"}. 396 log lines, zero warnings or errors — in particular no Cannot queue arguments of type, so MainWindow's two rewritten txFinalMonitorPcmReady lambdas marshal the enum across the queued connection cleanly. SimBackend declares no submitTxAudio and canTransmit = false, so the DSP path itself is genuinely unreachable in demo; that limit is why blocker 2 is arithmetic from the source rather than a measurement. Instance closed; the other running instance (pid 127778, another agent's #5642 review) was left alone.-20 dBFS in, -20 dBFS out claim, at the DSP level. engine-generated: mic 1x 0.104536 = −19.615 dBFS for an input amplitude of 0.1 (−20 dBFS) — the +0.34 dB is the modulator's own scale factor (0.5 → 0.52), and 0.1045 sits 19.6 dB below the 0.85 target so the ALC applies nothing. The bench's on-air figures I cannot reproduce; this is the part of them that is checkable here, and it checks.hl2_txdsp_test, tx_audio_source_wiring_test, icom_identity_test, hl2_tci_signaling_test, hl2_tx_level_policy_test, hl2_tx_gate_test, hl2_dsp_readback_test — 7/7 pass, RelWithDebInfo, Arch, in a scratch worktree at 6fbc9703. check_engine_boundary.py 0 would block, check_test_registration.py OK, check_ci_test_gate.py ok.What I could not verify: the on-air numbers. Everything quantitative in the body was measured against hpsdrsim on the author's bench and the body says so plainly, including the not_measured list — I have no way to reproduce those here and did not try. The AX.25 path is covered by the enum and by the source-text test and, as the body states, by nothing that ran. The demo simulator cannot key (Principle VI) and declares no submitTxAudio, so there is no offscreen bridge session that reaches this code; the TxAudioSource metatype crossing a live queued connection is verified instead by icom_identity_test, which asserts on the delivered value.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Removing alcMaxGainDb and alcHoldBelowDbfs left several surfaces still describing them, and one of them fails a correct radio. - docs/radio-certification.md: the TX:ALCGAIN row still swept "between alcHoldBelowDbfs and the makeup ceiling", neither of which exists. With the ceiling at unity the gain this meter reports can only be zero or negative, so the criterion is a sign and a knee rather than a window. This is the same defect as the TX:ALC row this branch already rewrote, three lines further down. - The TX:ALCGAIN meter's own face was -20..+40 dB and justified its top as Hl2TxDsp::Config::alcMaxGainDb. That field is gone and the needle can no longer leave the bottom third, so the face is now -20..0. - Four comments still explained themselves through the unkey "raise mic gain" diagnostic that this branch deleted: m_txAudioClientLeveled (now write-only until aethersdr#5647 gives it a job), m_alcTargetPeak (one reader, not two), setMicGain's "the one path-dependent thing left", and submitTxAudio's sticky-OR. - docs/automation-bridge.md's health example paired micLevel 80 with micGainAppliedLinear 3.98, which is the old curve; on curve 2 that position is 15.849. - migrateRestoredMicLevel treated a zero or negative micLevelCurve as a curve number from the future and silently skipped the migration. Those are a damaged document, not a newer build, so they take the malformed branch and say so — the sibling micLevel is range-validated for the same reason (Principle VII). Two test gaps, both found by mutation: - Deleting the micLevelCurve stamp from currentOperatingState() passed the entire suite, while the migration arithmetic is deliberately NOT idempotent. An unstamped round-trip would re-migrate on every connect: 80 -> 65 -> 58 -> 54 -> 52 -> 51, +12 dB walking down to +0.8 dB over five launches. hl2_state_restore_test now asserts the stamp. - The separation case used a round -54/-34 dBFS. aethersdr#5463's own loopback table is -37.05/-12.4 dBFS, where the merge base turned 24.65 dB of input separation into 0.33 dB. That leg is now asserted verbatim, so the test reproduces the report rather than a tidied version of it. Principle VIII. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… TX-level stack; #5646 and #5647 do not restore the level) (#5651) > ###⚠️ #5646 and #5647 do not restore the beacon level. **This PR does.** > A maintainer who merges the first two and believes unattended transmission is > fixed would ship every WSPR beacon **18.59 dB down — a factor of 72 in power**, > on a transmission that keys for 111.6 s with nobody watching. This is the > **third** of a stack of three and it is the one that closes that gap. > > It is **not** stacked in git: it branches from plain `origin/main`. The > dependency is behavioural, not textual. ## Where this sits in the stack | build | beacon `TX:ALC` peak | mic slider moves it? | |---|---|---| | today's `main` | **−1.412 dBFS** | — | | **#5646** alone (`hl2/alc-unity-ceiling`) | **−20.002 dBFS** | **yes**, up to +40 dB | | **+ #5647** (`hl2/engine-generated-tx-source`) | **still −20.002 dBFS** | no — measured **0.0 dB** | | **+ this PR** | **−3.0 dBFS** | no | That third row is the one worth pausing on. #5647 fixes *which control moves the beacon*; it deliberately sets no defaults and its body says so. The **level** comes back only here, by moving the WSPR Level spinbox default from −20 to −3 dBFS on host-modulating backends. **Merge order: #5646 → #5647 → this.** Between #5646 and this one there is a window in which every unattended transmission is ~18.6 dB down. ## The dependency, established from the code rather than asserted **Hard dependency on #5646. It is an exact no-op without it**, and the mechanism is arithmetic rather than opinion. On today's `main`, `Hl2TxDsp::processAudioBlock` computes `ceiling = clientLeveled ? 1.0 : pow(10, alcMaxGainDb/20)` — 40 dB for the WSPR pump, which reaches `submitTxAudio` with `clientLeveled=false` because `AudioEngine::startWsprPump` calls `feedDaxTxAudioInternal` with `markExternalSource=false`. It then drives the block peak onto `alcTargetPeak` (0.85 = −1.4116 dBFS). A −20 dBFS source and a −3 dBFS source are both well inside that 40 dB of makeup, so both arrive at the same −1.412 dBFS. `alcEnabled` defaults true and has no UI, so there is no reachable configuration in which this PR changes anyone's on-air level today. **No dependency on #5647 for correctness at the shipped slider position, and this is reasoned, not measured.** With #5646 + this PR but *without* #5647, the beacon still takes the microphone path: at the default Mic Level of 50 (`micGain` 1.0) it leaves at −3 dBFS, which is right; at 100 (+40 dB) it is driven into the ALC and limits at −1.412 dBFS. So without #5647 the level is correct but still slider-dependent. **No bench leg covers that combination** — `wspr-real-beacon-source-ab` has no #5646+this-PR-without-#5647 leg — so that paragraph is read off the code, and is offered as such. ## What was measured, and on what **Everything below is `hpsdrsim` on loopback**, serial `AA:BB:CC:DD:88:FF`, under a loopback approval issued by the orchestrator and **not** by ON8ST. **Nothing in this series has ever been radiated** — no on-air contact, **no WSPRnet spot**, no receiving station has heard any of these builds. Every claim about what a correspondent would hear is inference. This is stated because an earlier version of this series' commit messages said "measured on the air" of runs that were nothing of the kind. **`wspr-real-beacon-source-ab`** drove the application's own `PskReporterMapDialog` beacon button through the automation bridge. Six legs, all usable. Its `with-pr5` binary (`af434a95`) **contains this branch's default change** — that is why its default leg reads −3.0 dBFS. The honest proxy for "#5646 and #5647 without this PR" is its **`with-pr5-forced-20`** leg, the same binary with the level held at −20: **−20.002 dBFS**. `repair_db` for the default move is **17.002 dB**. The residual against stock is **−1.588 dB and is not expected to be zero**: stock put the beacon at `alcTargetPeak` because a makeup stage hunted for it, and this PR puts it at the level the generator chose, 1.6 dB below that target. Different mechanisms arriving near the same place. **`wspr-unattended-ab`** measures the separation head-on with a constant −20.000 dBFS stimulus: `repair_db` **0.0**, `residual_vs_stock_db` **−18.577**, with a `txraw` control whose spread across the binaries is **0.000 dB** — which is what makes the numbers attributable to the binaries rather than to three different inputs. That run delivers its stimulus through BlackHole rather than through `feedDaxTxAudioInternal`, so it is sound about level and silent about the pump's timing. ## A defect found while filing this, and fixed here The branch as first written read **`AudioEngine::hostModulation()`**, which is `takesTxAudioOverSeam && canTransmit`. That is the wrong predicate, and it comes apart on exactly one backend: **`IcomCivBackend` sets `takesTxAudioOverSeam = true` with `hostModulates = false`**, and its own source comment spells out why — *"The RADIO modulates ... but the host still SHIPS the audio."* So the original branch would have handed **every Icom a −3 dBFS beacon default** — 17 dB into a modulator the operator has already levelled, which is the precise harm the change claims to avoid. It now reads **`TransmitModel::hostModulation()`** (`hostModulates && canTransmit`), which is the question actually being asked: does *our* ALC see this audio. `Hl2TxDsp` is referenced nowhere outside `src/core/backends/hl2/`, so on Flex and Icom it genuinely never runs. Capability matrix, for the record: HL2 `hostModulates=true`; Flex, Icom and RTL `false`; ANAN `true` but `canTransmit=false`. **This fix is reasoned from the capability declarations, not measured — no Icom was connected.** ## What review changed (head `7d18ba4b`) Three things in the original two commits did not survive review, and the fixes are in the third commit rather than in a follow-up. **Re-evaluated on connect — the previous commit's claim was wrong.** `13874b1a` said `applyBeaconLevelDefault()` was "also called from `updateBeaconDefaults()`, which already re-runs on every radio status change". It does not. `updateBeaconDefaults()` has two call sites — the constructor, and a lambda on `RadioModel::callsignChanged` — and that signal is emitted only by the operator editing their own callsign (`RadioModel.cpp:3207`), the Flex `info` reply (`:7408`), and a `RadioDelta` carrying a callsign (`:11457`). `git grep -c callsign -- src/core/backends/hl2/` returns nothing, so **connecting an HL2 with this window already open fired nothing at all** and the operator kept −20 dBFS for the session. Reproduced offscreen against the demo radio: open-then-connect left the beacon callsign field empty on a radio reporting `"DEMO"`, while connect-then-open filled it. `applyBeaconLevel()` now rides `RadioModel::connectionStateChanged` (which carries the identity change) plus `TransmitModel::hostModulationChanged` (for a capability republish inside a live session). The second is **not sufficient on its own**, and driving it is what showed that: it is a change signal, so connecting a Flex leaves `hostModulation()` false either side and emits nothing. **Per radio, not per installation.** The level's correct value had just been made backend-dependent while its storage stayed one app-global key, so a level chosen on a Flex silently became the HL2's unattended beacon level and the "never override a stored value" rule made that permanent — the same silent shortfall this PR exists to prevent, reached from the other side. It now lives in the radio-scoped `WsprBeacon` feature document keyed by `RadioModel::settingsScope()` (`AGENTS.md`, "Radio-Scoped Feature Documents"), with the write result checked and the family-wide row guarded against. The legacy app-global key is claimed per scope on first access and then left frozen — **but only where it described an on-air level.** On a host-modulating backend it did not: while `Hl2TxDsp`'s ALC still had its makeup half the control was inert, so whatever sits in that key was never a choice *about the air*, and importing it into an HL2's document would freeze a non-choice into the one place that now decides an unattended transmit level. Verified offscreen against the demo radio, `AETHER_AUTOMATION_NO_TX=1`, never the FLEX: a dialog opened **before** connecting read −20 dBFS, and connecting to `DEMO-0001` moved it to the −40 dBFS stored for that radio. The store holds `('sim', 'DEMO-0001', 'WsprBeacon', 1, '{"levelDbFs":-40}')`. **One more disclosure.** The new default sits at the top of the control's range (`[-60, -3]`), so on a host-modulating backend the knob now only attenuates. That is deliberate and matches WSJT-X, whose Pwr slider is also attenuate-only, but it does mean the complaint this change opens with — a knob that cannot help an underdriven operator — is moved 17 dB rather than removed. ## What this does not do - **It does not touch an operator's own setting.** A stored level is read back ahead of the default and is never overridden — see "Per radio" below for what "an operator's own setting" now means. - **AX.25 and RADE get no default correction here or anywhere.** AX.25 computes a level per frame and RADE carries its own `PcMicGain`, so neither has a single default to set. Neither was exercised on the bench. - **Drive and power out are untouched.** Forward power is still set by drive. - **Whether −3 dBFS is the right drive for any particular station** is not established by anything here. ## Tests Both decisions now live in **`src/gui/PskBeaconLevelPolicy.h`** as pure functions the dialog *evaluates* rather than copies, pinned by **`psk_beacon_level_policy_test`** — a registered, socket-free CTest (`tests/tests.cmake`). It covers the capability default both ways, the armed guard, a stored value outranking either default, and which radios may claim the legacy key. Mutation-checked: reverting the default, dropping the armed guard, or claiming the legacy key everywhere each fail it. What the policy test does **not** pin is the signal wiring, which is what actually broke here — `PskReporterMapDialog.cpp` is in no test target, and a dialog-level target would need `MapDisplayWidget` + `MapView` + the weather radar + QGeoView listed in one place. That gap is covered by the offscreen bridge run recorded under "Re-evaluated on connect" instead, and named rather than hidden. Full `ctest` on this head (RelWithDebInfo, macOS): **416 tests, 416 passed, 0 failed**, 5 skipped (`crdv_quarantined_test`, `app_settings_safety_explicit-profile-path-isolation`, `weather_radar_texture_gl_test`, `range_slider_a11y_test`, `relay_bar_a11y_test`) — the same five skipped as on #5646 and #5647. This branch adds no test, so the count matches #5646's 416 rather than #5647's 417. ## Localization check A lab-side checker of mine (not in this repo), implementing `docs/HERMES.md`'s pre-PR grep plus the family-string prohibition, reports **clean — 0 hits, 0 violations, exit 0.** Stronger than either predecessor (#5646 had 1 hit, #5647 had 4), and worth saying why rather than claiming virtue: `src/gui/PskReporterMapDialog.cpp` is simply not on the document's pre-PR grep list. The substantive half does pass on merit — check 2 covers all of `src/gui`, and this branch adds no family string test, because it asks a **capability** (`hostModulation()`), never `family == "hl2"`. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Jeremy [KK7GWY] <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
a70e2f06All three blockers from review 5218387337 are fixed, all eight nits are taken, every thread on this PR is resolved, and CI is green on all five checks. I re-reviewed the fix commit rather than taking the reply text on trust, and broke each new guard on purpose to confirm it fires.
1. The #4796 behavioural guard works again. hl2_tci_signaling_test.cpp:488 compares value<AetherSDR::TxAudioSource>() == ClientLeveled instead of toBool(). The test that matters is the one that used to not fail: tagging TCI audio EngineGenerated — the exact regression — now produces
FAIL: host modulation: TCI audio is marked client-leveled at the tap
where before the same mutation printed hl2_tci_signaling_test: all checks passed, exit 0.
2. AX.25 has its drive control back. sendModemTxAudio tags Microphone, and the fix went further than the finding asked: the tag is no longer derived from markExternalSource at all. feedDaxTxAudioInternal takes a TxAudioSource explicitly, so each entry point states its own origin — which is the right shape, because the bug was precisely that "not a TCI client" was being read as "an unattended beacon". EngineGenerated now has exactly one producer, and the negative check in the wiring test stops the derivation coming back.
Asserted where I asked for it: icom_identity_test reads the tag off a live queued txFinalMonitorPcmReady, and re-tagging AX.25 EngineGenerated fails it.
3. The retired safety claim is gone from setMicGain. The block now reads "LEVEL 0 MUTES THE MICROPHONE AND THE TCI/DAX PATH. IT DOES NOT SILENCE THE TRANSMITTER.", names AX.25 as a mic-slider path, and gates the diagnostic sentence on both sources.
TxAudioSource.h is now a self-contained header with the whole three-state contract, out of 75 translation units' way; the wiring test's enum checks are scoped to the enum body and fail on a gutted enum; the behavioural seam covers two of three tags; RADE is gone from the story in all five places; the txAudioSource health row is sticky per transmission so a mixed over reports both rather than picking a winner; qRegisterMetaType is qualified; the dead target_include_directories is gone with a comment saying why.
Two went past the finding:
Hl2TxDsp::processAudioBlock drops carried m_inBuffer residue on a mid-transmission source change, warns once per over, and hl2_txdsp_test covers it. I removed the guard and the new case measures the residue arriving at +20.0 dBFS mic peak — a −20 dBFS beacon multiplied by the slider's 100×. That is the failure the comment used to only describe.mp is now four per-call mic peaks with two assertions, and the reply corrected my framing in the process: micPeak() publishes dBFS, not a linear peak, so the first version of that assertion compared a ratio and printed -nan. Caught by running it. That is the right way for a review comment to be wrong.a70e2f06 in a scratch worktree, RelWithDebInfo, Arch, Qt 6.11.2.hl2_txdsp_test, tx_audio_source_wiring_test, icom_identity_test, hl2_tci_signaling_test, hl2_tx_level_policy_test, hl2_tx_gate_test, hl2_dsp_readback_test — 7/7 pass.EngineGenerated fails hl2_tci_signaling_test; AX.25 → EngineGenerated fails icom_identity_test; residue guard removed fails hl2_txdsp_test; enum gutted fails all three declares checks.MainWindow.cpp — the only GUI translation unit that names TxAudioSource — compiles, as does libaethercore.a, which covers AudioEngine.cpp, Hl2Backend.cpp, Hl2TxDsp.cpp, RadioModel.cpp and IcomCivBackend.cpp.check_engine_boundary.py 0 would block, check_test_registration.py OK, check_ci_test_gate.py ok. No CHANGELOG.md entry, no workflow edits.-Wsfinae-incomplete warnings in the moc'd Qt code (RadioConnection, SmartCatSession, SliceModel) are pre-existing — identical in a build of the unmodified 6fbc9703.build 19m43s, check-windows 15m52s, check-macos 15m10s, Static checks, Sanitizer option configures.Ax25TxLevelDbfs shape #5651 uses for WSPR).TX:ALCGAIN's meter face is still -20.0, 40.0 naming the deleted Hl2TxDsp::Config::alcMaxGainDb; under a unity ceiling the top 40 dB is unreachable. Real, and #5646's to fix — correctly left out of this diff.Approving the code does not make this safe to merge yet. The repository squash-merges, so merging #5647 lands all eight commits in one commit on main, including #5646's slider widening — and #5646 is still CHANGES_REQUESTED with open blockers of its own, one of them about the new top of that travel sitting outside the modulator's overload guard. #5646 lands first, or this does not land. Auto-merge deliberately not armed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Review nits on aethersdr#5647. No executable change: comments and one certification row. Hl2TxDsp.h carried both halves of the story on the declaration of the function this PR changes. It opened by naming `clientLeveled` and asserting "THE FLAG IS NOW INERT HERE ... nothing left for the flag to select", then said the opposite eighteen lines later. The stale half was written for aethersdr#5646, when the flag really was inert, and the replacement started one line too far down. The aethersdr#4796 history that still explains why the type is a source and not a bool is kept; the claim that it does nothing is gone. Hl2Backend.cpp named tciAudioFresh() as what keeps two sources out of one transmission. It is not, for engine audio: feedDaxTxAudioInternal arms m_tciAudioTimer under markExternalSource alone, and both engine-generated feeds pass it false. The exclusion comes from setDaxTxMode(true) in startWsprPump() and in Ax25HfPacketDecodeDialog, and from the radeMode early return. That distinction did not matter while the two buckets differed only in a ceiling they now share; with EngineGenerated bypassing m_micGain, misattributed m_inBuffer residue is worth the slider's full range, so the comment now names the real guards and says a fourth such feed owns re-checking. radio-certification.md's TX:ALCGAIN row set its acceptance criterion "between alcHoldBelowDbfs and the makeup ceiling" and "capped at unity for clientLeveled audio". aethersdr#5646 removed the first two and this branch removes the last, so the row named nothing that exists. It now states what a reduction-only stage with a unity ceiling actually does, and records that EngineGenerated moves it 0 dB by construction. IcomCivBackend.cpp still called the parameter "the flag". Every remaining `clientLeveled` in the tree is explicitly historical narration. Tests unchanged and re-run on this head: hl2_txdsp_test, tx_audio_source_wiring_test, hl2_tx_level_policy_test, hl2_dsp_readback_test, hl2_tx_gate_test, icom_identity_test and hl2_tci_signaling_test all pass; hl2_tx_loopback_test builds with AETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and skips at exit 77 with no simulator present. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
a70e2f0 to
c88715a
Compare
…change 3) (#5646) > ###⚠️ This PR must not merge on its own > On its own it is a **known regression on every unattended transmission** — a > WSPR beacon at the shipped default goes out **18.59 dB down, a factor of 72 in > power**, on a transmission that keys for 111.6 s with nobody watching. It is > the first of a stack — **#5647 is the second** — and see > **[Do not merge this alone](#do-not-merge-this-alone)** for exactly which > branch closes which half. ## What this changes **This changes the transmit level of every Hermes-Lite 2 installation at Mic Level 50 or above.** The stage `Hl2TxDsp` calls an ALC is not one. It applied up to **40 dB of upward makeup gain** (`Hl2TxDsp::Config::alcMaxGainDb`) with an absolute hold threshold (`alcHoldBelowDbfs`, −45 dBFS) that sits *below* a real shack's noise floor. So between words the loop went on raising gain until the fan and the mic hiss reached the same target peak as the speech. After this PR the ALC only ever reduces. The **Mic Level slider becomes the operator's transmit level**, and its upper leg is widened so that it can be. | authored speech, Mic Level at its default of 50 | before | after | |---|---|---| | speech leaving the modulator | **−1.18 dBFS** (at the ceiling) | **−21.08 dBFS** | | speech-to-room contrast in the pauses between words | **0.21 dB** | **18.10 dB** | About **20 dB quieter at the default slider position**, and the room noise that used to be lifted level with the operator's voice between words is gone. The 20 dB is not a fixed offset — it is the gap between how loud a given operator actually speaks and full modulation, and it moves with the microphone, the input gain and the voice. **Both of those figures are simulator measurements.** See [What is measured on what](#what-is-measured-on-what). Part of #5463 — this is **change 3** of four. Not `Closes`: #5505 (change 1) and #5506 (change 2) are already merged against the same umbrella, and change 4 — the leveller, which a thread correction relocated into AetherVoice — is unfiled. Auto-closing the umbrella on this merge would orphan that. WDSP draws the same line: `create_txa()` in `third_party/wdsp/upstream/TXA.c` builds the stage it names `alc` with `run=1` and `max_gain=1.0` — always on, structurally incapable of adding gain — and puts the gain that *can* be added in a separate `leveler`, built `run=0` with `max_gain=1.778` (+5 dB). Two stages, two jobs. ## Who is affected, and who is not **Hermes-Lite 2 only. Flex and Icom are untouched**, and receive is untouched on every family. All of this is host-side HL2 transmit DSP: `Hl2TxDsp` is constructed only inside `Hl2Backend` (`new Hl2TxDsp` occurs nowhere else in the tree), the Flex backend has no `submitTxAudio` override at all, and `IcomCivBackend::submitTxAudio` ships PCM to a radio that runs its own transmit processing. **WSJT-X, fldigi and anything over TCI or DAX: no change.** That path already had a unity ceiling — it was fixed separately in #4796 — and its regression case in `hl2_txdsp_test` (*"the reduction half must RELEASE"*) passes **untouched at −0.15 dB, identical before and after**. That case is the evidence this is a no-op on client-leveled audio. Level is still set in the client. **Operators who have never moved the Mic Level slider** lose up to 40 dB of automatic makeup and must set a level for the first time. That is the point of the change and also its migration hazard — *it wants a release note, not a silent ship*. **Operators who had already moved the slider above 50** keep the level they chose. The number moves instead: a stored 75 was +10 dB on the old curve and restores as 63, which is +10.4 dB on the new one. See [A stored slider position is migrated, not reinterpreted](#a-stored-slider-position-is-migrated-not-reinterpreted). ## The slider mapping The widening is **asymmetric on purpose**: 0.4 dB per step below 50 (unchanged, down to −20 dB), **0.8 dB per step above, reaching +40 dB at 100** instead of the old +20 dB. **50 stays exactly unity**, because `TransmitModel` constructs `m_micLevel` at 50 and that is where every operator who has never touched the control transmits from — a symmetric widening would move unity off 50 and silently change the transmit level of every existing install. (#5505 has since landed, so a slider position now survives a launch as well; that widened the population this pin protects rather than retiring it.) `hl2_tx_level_policy_test` pins the join: `micSliderToGainDb(50) == 0.0`, `(49) == −0.4`, `(51) == +0.8`. For the bench's speech recording, roughly **slider 74** would have put the peak on the ALC's target. *That number is an inference from the mapping, not a measurement* — legs were run at 50 and at 100 and nothing in between. ## One instrument the quiet operator gets **`TX:ALC`** now reads the actual transmit peak and tracks its input one-for-one until it reaches the target, then limits at −1.41 dBFS. Sitting far below −1.41 dBFS while speaking means you are quiet. At unity, speech leaves the modulator **19.56–19.67 dB below `alcTargetPeak`** — `d81b-speech-pauses-alc`'s `result.json` gives `speech_output_dbfs` of −21.08 dBFS (fault leg) and −20.97 dBFS (control leg), both at mic level 50, against `20*log10(0.85) = −1.4116 dBFS`. An unkey log line naming the slider position would be the natural companion, and it is **not in this branch**: it must not fire on audio the operator's microphone did not produce, and WSPR, AX.25 and RADE reach `submitTxAudio` with `clientLeveled` false exactly like a microphone. Distinguishing them needs the three-state `TxAudioSource`, which is #5647's substance. #5647 carries the advice with its gate. ## Keeping the widening inside the modulator's headroom `reset()` starts the ALC at unity on every unkey, and the stage's hard clamp sits right behind it, so at the slider's new 100x any large step arrives with the loop still far above where it needs to be. The modulator flat-tops, and no meter reports it — `TX:ALC` is measured *after* the clamp. **Reduction is instantaneous.** The block that needs less gain simply takes the target; only the release is smoothed. That is the shape a splatter guard has to have, and the attack constant was never buying smoothing here: at a 512-sample block on 24 kHz — 21.3 ms — `1 - exp(-21.3/5)` already closed 98.6% of the error in one block. It was leaving 1.4% of the step above the clamp, and 1.4% of 40 dB is not small. `alcAttackSec` is deleted with the mechanism, like `alcMaxGainDb` and `alcHoldBelowDbfs` before it. A one-shot key-on seed was tried first and covers only the **first** reduction of an over. @on8st tested it against a crescendo and it held; the shape that breaks it is a source that crosses the target *gently* — an ordinary quiet word — which spends the seed on a fraction of a dB and leaves the next syllable unprotected. Measured at slider 100: | stimulus (whole-run \|IQ\|, slider 100) | seeded attack | instantaneous | |---|---|---| | full scale from sample 0 | 0.8594, 0 clipped | 0.8594, 0 | | 100 ms of −60 dBFS room, then full scale | 0.8593, 0 | 0.8593, 0 | | −41 dBFS plateau, then a step to full scale | **1.5297, 448 at the clamp** | **0.8592, 0** | | −38 dBFS word, then a −12 dBFS syllable | **1.0768, 223** | **0.8586, 0** | | quiet, one loud burst, quiet again | **1.5045, 727 (15.2 ms)** | **0.8594, 0** | All eighteen probe shapes settle at ~0.859 with nothing at the clamp. **The release is untouched** — #4796's case still measures −0.15 dB and the over-level client's crest is still 1.0001. `hl2_txdsp_test` pins four stimuli, and they are four different openings: full scale from sample 0, a 100 ms −60 dBFS room lead-in, a 50 → 100 slider move mid-over, and a quiet word followed by a loud one. The last fails on a 5 ms attack and none of the other three can see it. It pins the observable property rather than the mechanism — a 0.5 ms attack passes it too — and that is the argument for instantaneous: whether a constant is short enough is a function of `dspBlockSize` and `inputSampleRateHz`, so it is a guarantee that expires silently the day either moves. ## A stored slider position is migrated, not reinterpreted #5505 persists the mic level, and this PR changes what a stored number means, so a position stored against the old curve is re-expressed against the new one. An operator who parked at 80 asked for +12 dB; 80 means +24 dB now, so the document restores as **65** — the same gain, a different position. The document says which curve it was written on with `micLevelCurve`, and **absent means curve 1**: the key did not exist while curve 1 was the only curve, so its absence is a positive statement about the writer. Writing the level back stamps the curve beside it, which is what makes the migration one-shot — the arithmetic deliberately is not, and `hl2_state_restore_test` asserts the stamp so an unstamped round-trip cannot start a ratchet. Only the upper leg needs it; at and below 50 both curves agree and the migration is the identity, including the mute at 0. A curve number this build does not know restores as written rather than being re-derived on a guess. ## It rewrites two certification rows and a meter face `docs/radio-certification.md`'s `TX:ALC` row has said since `76a52403`: *"sweep the input 20 dB → reading does **not** move, ±1 dB across the sweep"*, with recorded evidence of −1.41 dBFS at −10, −20 and −30 dBFS injected tone. That no-movement is not a property of a post-ALC peak meter. It is the observable signature of `alcMaxGainDb` — 40 dB of makeup dragging any input from about −41 dBFS upward onto `alcTargetPeak` — and −1.41 dBFS is exactly `20*log10(0.85)`. **After this PR lands, that row fails a correctly behaving radio, by 28.6 dB.** Correcting it is this PR's job rather than the next reader's. The replacement is **measured rather than reasoned**, because a guessed pass criterion in a certification table is worse than a stale one — it looks measured. The **2026-08-10 block is kept**, not deleted: it is correct for the build it was run on, it is the control for the new one, and its verdict cell now says which build that was. The new tolerance is **±0.25 dB against a worst measured deviation of 0.0065 dB** — two orders of magnitude looser than the data supports, deliberately, because one radio on one host on one night does not earn a tolerance that only passes on the machine it was taken on. **`TX:ALCGAIN`, three rows further down, had the same defect and is corrected here too.** It swept *"between `alcHoldBelowDbfs` and the makeup ceiling"* — neither of which exists after this change — so it would fail a correct radio for exactly the reason the `TX:ALC` row would. With the ceiling at unity the gain that meter reports can only be zero or negative, so the criterion is now a sign and a knee rather than a window. **And the meter's own face moved with it.** `TX:ALCGAIN` was defined `-20..+40 dB` and its comment justified the top as `Hl2TxDsp::Config::alcMaxGainDb`. Deleting that field without moving the face would have left #5636 inheriting a meter whose needle can never leave the bottom third of its own scale; it is `-20..0` now. ## Do not merge this alone On its own this PR changes the level of **unattended** transmissions — WSPR, AX.25 packet and RADE — because they reach `submitTxAudio` on the same path as a microphone and were relying on the same 40 dB of makeup to normalise them. Measured with the application's own WSPR beacon against `hpsdrsim` (`wspr-real-beacon-source-ab`, beacon at the shipped −20 dBFS default): | build | beacon `TX:ALC` peak | |---|---| | today's `main` | **−1.412 dBFS** | | **this PR alone** | **−20.002 dBFS** | **18.59 dB down, a factor of 72 in power, on a transmission that keys for 111.6 s with nobody watching.** And on this PR alone the **Mic Level slider moves the beacon**: the same run measured a 50 → 100 slider move shifting it by **18.59 dB**. A microphone control has no business moving an unattended beacon. The repair takes **two** further branches, and it is worth being exact about which one does what, because it is natural to assume the next PR closes both halves and **it does not**: | | mic slider moves the beacon? | beacon level at the shipped default | |---|---|---| | this PR alone | **yes — up to +40 dB** | **−20 dBFS** (18.59 dB down) | | **+ #5647**, `hl2/engine-generated-tx-source` | **no** — measured **0.0 dB** across a 50 → 100 move | still **−20 dBFS** | | + the WSPR default branch, `hl2/wspr-host-modulated-level` (not yet filed) | no | **−3.0 dBFS** | #5647 removes the slider coupling and makes engine-generated audio carry the level its generator chose; it deliberately sets **no defaults**. The level shortfall itself is closed by the third branch, which moves the WSPR Level spinbox default from −20 to −3 dBFS on host-modulating backends. `wspr-unattended-ab` measures this separation directly: for a −20 dBFS engine-generated signal, the second branch's own `repair_db` is **0.0**. AX.25 and RADE get the slider bypass in #5647 and **no** default correction anywhere — AX.25 computes a level per frame and RADE carries its own `PcMicGain`, so neither has a single default to set. Neither was exercised on the bench; only the WSPR source was. **So: merge this with #5647, and land the WSPR default branch immediately after.** Between this PR and that one there is a window in which every unattended transmission is ~18.6 dB down. ## #5198 — offered as a candidate, not as a claim #5198 (`priority: high`, open since 2026-08-23) carries **two faults in one report, and only one of them is this one.** - *"the ALC meter swings nearly full-scale in response to normal transmitted speech"* — same defect class as #5463, and the mechanism this PR deletes. It would be worth @darkclassical re-testing on this branch. - *"opposite-sideband spillover at approximately −30 dB"* — **this PR does not touch it and must not be credited with it.** The host modulator was measured separately on the EP2 wire and agrees with `Hl2TxDsp::designFilters`, evaluated independently in double precision, to 0.02 dB (87.15 dB on a steady 1 kHz tone). The reporter's own drive sweep shows a fixed modulator/IQ image tracking the wanted signal 1:1. That half of his report is open. **Nobody has tested his configuration.** What connects the two is the defect class and his own title: a stage riding his gain by tens of dB when he has deliberately set his levels is what this PR removes, and 40 dB of makeup driven into a clamp is a plausible source of the distortion and the amplifier IMD he describes. That is a reasonable thing to check, not a diagnosis. It is offered as something for him to try. ## What is measured on what Read this before believing any number above. ### On the real radio — one run `d90-alc-input-sweep`, on ON8ST's Hermes-Lite 2, MAC `00:1C:C0:A2:13:DD` read from the radio's own response packet, gateware 74, into a **dummy load**, under the operator's own time-bounded transmit approval. 16 keyed windows, 165.3 s of keying, **drive register 0 — nothing was radiated**. It establishes, on both builds: that `TX:ALC` tracks its input one-for-one under the new behaviour (max deviation 0.0065 dB over 53.5 dB, fitted slope 0.99997), that it limits at −1.413 dBFS where the knee sits, that approach direction changes the reading by 0.0 dB, and — the part that makes the rest trustworthy — that the **old** documented triple reproduces on the **old** build to within **0.023 dB**. ### On the simulator — everything else `d78`/`d78b` (silent ratchet), `d81`/`d81b` (speech pauses) and both WSPR A/Bs ran against `hpsdrsim`, serial `AA:BB:CC:DD:88:FF`, under a `loopback` approval. **The two headline figures at the top of this PR — the −1.18 → −21.08 dBFS speech level and the 0.21 → 18.10 dB pause contrast — are simulator measurements.** The argument that they transfer is real and is recorded in each run: `Hl2TxDsp` is host-side DSP and executes on `m_keyed` regardless of peer, so the stage under test runs identically. But it is an argument, not a measurement. **Nothing in this series has ever been radiated.** No on-air contact, no WSPRnet spot, no receiving station has heard either build. Every claim about what a correspondent would hear is inference. The commit messages on this branch were corrected before filing, because an earlier version of them said *"measured on the air"* and *"measured on the radio"* of runs that were neither. ### Reasoned from code only - The slider position that lands on target (~74) — the mapping, not a leg. - The hop from `TransmitModel` to `Hl2Backend::setMicGain`. Every bench leg drove `AETHER_HL2_MIC_LEVEL` into `setMicGain` directly. (The **widget**'s half was since settled through the automation bridge: `invoke "Microphone gain" setValue 100` moves `transmit.micLevel` to 100, and 76 to 76.) - **The limiter change and the migration have no bench leg.** Both were measured against the real `Hl2TxDsp` and the real `Hl2Backend` in a harness rather than on hardware or `hpsdrsim`, and both are pinned by the tests above. Every |IQ| figure quoted on this page comes from that harness. ## Localization check a lab-side checker of mine — not in this repo — that makes executable the rule in `docs/HERMES.md` (*"For coding agents — keep bring-up inside the family backend"*), reports **1 hit, 0 violations** on this branch. Exit 2 is advisory: hits are to be explained, not failures. **`src/gui/MainWindow_Session.cpp` — comment only.** Three lines inside `MainWindow::wireRadioModel()`, correcting a comment that said the ALC *"needs the mic pushed UP past its hold threshold"* — a claim this PR makes false. **No executable line changes.** ## What this does NOT fix, and might be mistaken for it - **Drive and power out.** Nothing here touches the drive control or the PA. Forward power is still set by drive. - **The `TX:ALCGAIN` meter.** Separate work, #5506 and #5636. It exists on neither build measured here. - **Nothing about drive or the speech processor.** Mic Level is the modulator's input level; it is not a substitute for either. - **Splatter protection is unchanged.** The ALC still reduces on a transient, with the same attack and release, on every path. It simply never lifts. - `clientLeveled` has no remaining use in `processAudioBlock`; it is kept and marked unused here rather than deleted, and #5647 gives it a real job as `TxAudioSource`. ## Test results Full `ctest` (RelWithDebInfo, macOS): **416 tests, 416 passed, 0 failed**, 5 skipped (`crdv_quarantined_test`, `app_settings_safety_explicit-profile-path-isolation`, `weather_radar_texture_gl_test`, `range_slider_a11y_test`, `relay_bar_a11y_test`). On this head (RelWithDebInfo, Linux): the whole `hl2_*` family plus `radio_state_memory_test`, **35/35 pass**, and so do `meter_model_test` and `meter_surfaces_test`. Note that CI's green does **not** include any of them — `.github/ci-test-gate.txt` is frozen and carries none of the HL2 tests, so they first run on `full-suite.yml` after merge. Each guard on this branch was inverted to check it is a guard rather than a restatement. Reverting the seed's `reducing` gate fails the lead-in case and nothing else; reverting `setMicGain`'s re-arm fails the mid-over case and nothing else; deleting the `micLevelCurve` stamp fails the new `hl2_state_restore_test` assertion and nothing else; replacing `micLevelFromCurve1` with the identity fails both `hl2_tx_level_policy_test` and `hl2_dsp_readback_test`. The one change here with **no** test guarding it is the `TX:ALCGAIN` face range, which is a display bound checked against `alcGainDb()`'s ceiling by inspection. One claim from the original report did **not** survive its own falsifier and is withdrawn on this branch rather than quietly dropped: *"within one over the ALC gain can only rise"* is refuted by 148 downward steps across `d78`'s ten stock legs. What survives is narrower and sufficient — reduction is never held, so the fault is the level during a pause, not a level that runs away across the over. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Jeremy [KK7GWY] <[email protected]>
WSPR, the AX.25 modem and the RADE waveform were losing 18.58 dB once the ALC's makeup half went. Measured on both binaries with the same stimulus (bench-runner runs/wspr-unattended-ab): a beacon generated at -20.000 dBFS left the modulator at -1.412 dBFS on stock and -19.989 dBFS after PR3. A factor of 72 in power, on a transmission that keys for 111.6 s with nobody watching. THE ROOT CAUSE IS A BOOL THAT COULD NOT SAY ENOUGH. `clientLeveled` answered "did an external client set this level?" -- true for TCI/DAX, false for EVERYTHING ELSE -- which put the operator's microphone and the engine's own generators in one bucket. AudioEngine's own comment claimed engine audio "keeps the ALC so its on-air level does not change"; that was never a property of this code, it depended on 40 dB of makeup normalising any generated level onto the modulator's target. So the bool becomes TxAudioSource: Microphone, ClientLeveled, EngineGenerated. This also gives PR3's vestigial processAudioBlock parameter a real job rather than deleting it as that PR anticipated. WHAT ENGINE-GENERATED NOW MEANS: the mic slider does not reach it. A microphone control has no business moving an unattended beacon, and that defect PREDATES the ALC change -- Hl2TxLevelPolicy's own comment records that the multiplier applied to "digital-mode and WSPR-beacon audio arriving through submitTxAudio, not only voice". It was merely invisible while the makeup normalised everything. The ALC itself is unchanged for all three sources: reduction-only, unity ceiling, so engine audio is still protected from splatter. It is simply not RE-LEVELLED on the way in. THE WSPR DEFAULT CHANGE IS NOT HERE ANY MORE. An earlier version of this commit also moved the WSPR Level spinbox default from -20 to -3 dBFS on host-modulating backends. That is an unrelated change to an unattended transmit level and had no business riding inside an enum refactor, so it is split out to hl2/wspr-host-modulated-level and carries its own measurement and its own sequencing note. This branch is the TxAudioSource work and nothing else; it sets no defaults. The unkey "raise mic gain" diagnostic is gated off for engine-generated transmissions -- the slider is not in that path, so the advice would name a control that cannot help. TxAudioSource is a registered metatype: it crosses AudioEngine's thread on txFinalMonitorPcmReady, and a queued connection cannot marshal a type Qt was never told about. That failure is a runtime warning and a dropped signal, not a compile error. TESTED. New hl2_txdsp_test case: engine-generated output is unmoved by a 1000x span of mic gain (spread 0.00 dB) and sits +0.000 dB against a measured control -- the mic path at unity, which applies no gain either. The control is measured rather than asserted against a constant because the modulator has its own scale factor (amplitude 0.5 leaves as |IQ| 0.52), and dividing by a guessed number would have tested the guess. The mic path still moves with its slider, -6.02 dB for a 2:1 cut. NOT FIXED, AND NAMED SO: all three engine-generated sources get the mic-slider bypass, and none of them gets a default correction here -- defaults are out of scope for this branch. AX.25 computes a level per frame and RADE carries its own PcMicGain, so neither has a single default to set in any case; WSPR is the one that does, and it is split out. Rebased onto origin/main 8a358c5. Build and full suite figures are recorded in the lab against that head. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs
Hl2TxDsp's test proves what the DSP does with each TxAudioSource. Nothing proved the audio is TAGGED right in the first place, and a mis-tag is silent: a beacon goes out 18.58 dB down again, unattended, with every existing test still green. SOURCE-TEXT, AND THE REASON IS RECORDED IN THE FILE. AudioEngine.cpp is compiled into no test target in this repository -- zero occurrences in tests/tests.cmake -- and is not a unit that stands up cheaply. The behavioural alternative was a live WSPR frame against the simulator, but a frame keys for 111.6 s and the bench's loopback approval class permits 35 s; raising a rail to fit a convenience is what that ceiling's own comment forbids. So this pins the wiring as WRITTEN and fails loudly on a reversal. It does NOT prove the code runs, says so in its header, and does not retire the end-to-end beacon leg, which stays open. Pins both halves, because either reversing alone loses the property: the markExternalSource -> TxAudioSource mapping, and each of the three callers (WSPR pump false, sendModemTxAudio host-modulation branch false, external DAX/TCI true). Also pins the metatype registration, whose absence is a runtime warning and a dropped signal rather than a build failure -- no transmit audio, nothing to catch it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs
…aught hl2_tx_loopback_test still passed /*clientLeveled=*/false to submitTxAudio, which a scoped enum will not take. The target is behind AETHER_ENABLE_HL2_TX_LOOPBACK_TEST, OFF by default, so the full ctest and the PR checks never compiled it — but sanitizers.yml sets it ON weekly, for the reason its own comment gives: it keeps the source honest against API drift now that it is out of the default graph. This was that drift. Proved rather than asserted, since the default graph cannot prove it: configured with the option ON and built the target clean, then reverted the token and rebuilt to confirm the fix is load-bearing — tests/hl2_tx_loopback_test.cpp:418:65: error: cannot initialize a parameter of type 'TxAudioSource' with an rvalue of type 'bool' icom_backend_test carried the same stale call four times. That target is inside the #[==[ ]==] bracket in tests/tests.cmake, so it is retired and does not compile, and this change is verified by nothing. Done anyway: leaving known- broken calls for whoever revives it is the trap this PR just hit. A FALSE SAFETY CLAIM ABOUT TRANSMITTING, in shipped source. Hl2TxLevelPolicy.h told the operator "At 0 nothing transmits, as a plain 0.0x multiply on every path", and that this was "worth knowing before parking the control at 0 between voice sessions". EngineGenerated no longer reaches micSliderToLinear, so mic slider 0 does not silence a WSPR beacon, an AX.25 frame or the RADE waveform. The behaviour is right — a microphone mute has no business muting a beacon, which is this PR's own argument — but the comment had quietly stopped being true, and an operator could have leaned on it. The function is unchanged and still returns 0.0: voice and TCI/DAX still mute. TxAudioSource moves into namespace AetherSDR, where the rest of the header lives, with Q_DECLARE_METATYPE(AetherSDR::TxAudioSource). Cost measured before moving, because IRadioBackend.h is now reached from AudioEngine.h and Hl2TxDsp.h: two lines, in two test files. Every production TU that names the type is already inside the namespace, as are three of the four tests via a using-directive. hl2_txdsp_test.cpp had `using namespace AetherSDR::hl2;`, which does not reach the enclosing namespace, so it gained a using-declaration; tx_audio_source_wiring_test.cpp pins the metatype as source text, so its expected string moved too. Stale comments corrected: - AudioEngine.h described the non-ClientLeveled bucket as "the mic chain or the engine's own tone generators" — the exact conflation this PR exists to split. Rewritten around the three states. - tx_audio_source_wiring_test.cpp claimed AudioEngine.cpp is compiled into no test target. Not so: it is in CORE_SOURCES and therefore in aethercore, which icom_identity_test links — and this branch already asserts ClientLeveled on a live AudioEngine there. The 111.6 s frame argument holds for the end-to-end beacon leg, not for the modem branch, which sendModemTxAudio reaches in one public call. The test is unchanged; only its stated reason is corrected. - RadioModel.h named a `clientLeveled` parameter that no longer exists. 417 tests, 417 passed, 0 failed, same 5 skipped; the loopback target built separately with its option ON. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs
Review nits on aethersdr#5647. No executable change: comments and one certification row. Hl2TxDsp.h carried both halves of the story on the declaration of the function this PR changes. It opened by naming `clientLeveled` and asserting "THE FLAG IS NOW INERT HERE ... nothing left for the flag to select", then said the opposite eighteen lines later. The stale half was written for aethersdr#5646, when the flag really was inert, and the replacement started one line too far down. The aethersdr#4796 history that still explains why the type is a source and not a bool is kept; the claim that it does nothing is gone. Hl2Backend.cpp named tciAudioFresh() as what keeps two sources out of one transmission. It is not, for engine audio: feedDaxTxAudioInternal arms m_tciAudioTimer under markExternalSource alone, and both engine-generated feeds pass it false. The exclusion comes from setDaxTxMode(true) in startWsprPump() and in Ax25HfPacketDecodeDialog, and from the radeMode early return. That distinction did not matter while the two buckets differed only in a ceiling they now share; with EngineGenerated bypassing m_micGain, misattributed m_inBuffer residue is worth the slider's full range, so the comment now names the real guards and says a fourth such feed owns re-checking. radio-certification.md's TX:ALCGAIN row set its acceptance criterion "between alcHoldBelowDbfs and the makeup ceiling" and "capped at unity for clientLeveled audio". aethersdr#5646 removed the first two and this branch removes the last, so the row named nothing that exists. It now states what a reduction-only stage with a unity ceiling actually does, and records that EngineGenerated moves it 0 dB by construction. IcomCivBackend.cpp still called the parameter "the flag". Every remaining `clientLeveled` in the tree is explicitly historical narration. Tests unchanged and re-run on this head: hl2_txdsp_test, tx_audio_source_wiring_test, hl2_tx_level_policy_test, hl2_dsp_readback_test, hl2_tx_gate_test, icom_identity_test and hl2_tci_signaling_test all pass; hl2_tx_loopback_test builds with AETHER_ENABLE_HL2_TX_LOOPBACK_TEST=ON and skips at exit 77 with no simulator present. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The rebase landed on the wrong base — #5646 was squash-mergedThanks for the quick rebase. It went onto That makes every one of them look like a new change relative to the merge base. A read-only There is a second reason not to resolve those by hand: this branch predates The fix is to drop the #5646 commits rather than merge them, replaying only your five: git fetch origin git rebase --onto origin/main b6dbc7897 hl2/engine-generated-tx-source That keeps Worth checking afterwards that Your force-push also dismissed the approval, so this needs a re-review regardless — ping me when it's rebased and I'll take it. The unattended-TX window is open until this lands, so it has my attention. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
c88715a to
36dd6d6
Compare
…ks again Review 5218387337 found three blockers. All are fixed here, and every new guard was broken on purpose to confirm it fires. 1. THE aethersdr#4796 BEHAVIOURAL GUARD HAD GONE INERT. tests/hl2_tci_signaling_test.cpp asserted the property with monitor.first().at(1).toBool(). That was exact while the argument was a bool; when it became TxAudioSource the call kept compiling and stopped meaning anything, because toBool() goes enum -> int -> bool and reads BOTH ClientLeveled(1) and EngineGenerated(2) as true. Tagging TCI audio EngineGenerated -- the exact regression tx_audio_source_wiring_test exists to catch -- left the suite green. It compares the enum now, and that mutation fails it. 2. AX.25 HAD LOST EVERY UPWARD DRIVE CONTROL. It was tagged EngineGenerated, which bypasses the mic slider. Its AFSK amplitude is a compile-time constant (kTxAfskAmplitude = 0.35, -9.12 dBFS) and Ax25HfPacketDecodeDialog has no level control, so the slider was the only thing in the product that could move a packet frame -- leaving HF packet 7.71 dB under alcTargetPeak (0.85, -1.41 dBFS) with nothing able to raise it. sendModemTxAudio tags Microphone now, and icom_identity_test asserts it on a live txFinalMonitorPcmReady. The tag is no longer DERIVED from markExternalSource either. That flag means "a TCI/DAX client is feeding" and arms the TCI active-audio timer; reading it as "not a beacon" is what swept AX.25 into the beacon's bucket. feedDaxTxAudioInternal takes the source explicitly, so each entry point states its own origin. EngineGenerated now has exactly one producer: AudioEngine::startWsprPump(). RADE was never affected and is no longer described as if it were: activateRADE() refuses a radio that cannot provide DAX audio, so it is Flex-only, and a Flex modulates on its own side. 3. THE RETIRED SAFETY CLAIM WAS STILL IN Hl2Backend.cpp. setMicGain's doc comment -- on the function the slider actually calls -- still said "a slider at the bottom of its travel means off", the same claim Hl2TxLevelPolicy.h was corrected for, plus "the same on every path" and "the one path-dependent thing left", both falsified by this branch. Nits, all taken: - TxAudioSource moves to src/core/backends/TxAudioSource.h. AudioEngine.h did not include IRadioBackend.h before this branch and is itself included by 75 files; Hl2TxDsp.h picked it up too. 1378 lines of backend seam for a three-value enum. - tx_audio_source_wiring_test's three "declares X" checks matched the whole file, which the doc comment satisfies in prose -- they passed against an enum gutted to one enumerator. Scoped to the enum body. - Hl2TxDsp::processAudioBlock drops carried m_inBuffer residue when the source changes mid-transmission. The upstream fences are real (startWsprPump's setDaxTxMode(true) for the mic path, feedDaxTxAudio's m_wsprBeacon->isActive() for the client path) but they are an argument about call sites in another class; this makes the property structural. Without it the new test case measures the residue arriving at +20.0 dBFS mic peak. - healthSnapshot() gains a txAudioSource row; micGainAppliedLinear says it is what the modulator holds, not always what it applies. - qRegisterMetaType uses the qualified name, as AetherClockEngine.cpp and KiwiSdrManager.cpp do. - tx_audio_source_wiring_test drops a target_include_directories it never used; hl2_txdsp_test asserts the pre-ALC mic peak per call instead of threading one scratch float through five and discarding it. Not taken: TX:ALCGAIN's meter face is still declared -20..+40 naming the deleted Hl2TxDsp::Config::alcMaxGainDb. Real, and aethersdr#5646's to fix. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
36dd6d6 to
8f755ea
Compare
Rebased onto
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
8f755ea6, rebased onto mainRe-review after the rebase. The code approved at a70e2f06 is unchanged in
substance; what is new is the rebase itself, the restored unkey advice, and one
documentation fix. All of it re-verified on the new base rather than carried over
from the previous pass.
git rebase --onto origin/main b6dbc7897 — #5646 was squash-merged as
5607b565f, so its nine commits are not ancestors of main and had to be
dropped rather than merged. The PR now shows five commits and its diff is its
own content: 22 files, and every hunk in Hl2Backend.cpp lands in a function
this PR is about (setKeying, submitTxAudio, setMicGain, healthSnapshot).
I checked what the branch deletes from main, which is where a rebase
silently reverts someone's work. Every deletion is either #5646's own hand-off
comment, the old bool clientLeveled signature, or one of the two claims this PR
falsifies. Nothing of #5646's substance is reverted:
Hl2TxLevelPolicy.h's reduction paragraph — kept, it is unchanged contextTX:ALCGAIN — #5646's measured criterion kept (0.00 dB ±0.25 below the target; strictly decreasing above it), which is tighter than this branch's±1 dB; only the EngineGenerated sentence is appendedm_alcSeedPending, alcSeed, alcAttackSec — absent, matching main. The1d9d063d removed it because a two-state seam could not aim it, and its
replacement comment said "#5647 reintroduces it gated on
!m_txAudioEngineGenerated". It does.
One correction to that hand-off, and it is deliberate. #5646 expected AX.25 to
be gated off alongside WSPR. It is not: AX.25 is tagged Microphone, so a quiet
packet frame does draw the advice. kTxAfskAmplitude is a compile-time
constant (0.35, −9.12 dBFS) and Ax25HfPacketDecodeDialog has no level control,
so the mic slider is the only thing in the product that can move a packet frame —
"raise mic gain" is exactly the right instrument there. Only the WSPR beacon has
no slider in its path, and only it is gated off.
main, taken here37ecd25f deleted the key-on ALC seed and Config::alcAttackSec;
Hl2TxDsp.cpp documents why it was rejected. Hl2TxLevelPolicy.h missed that
sweep and still described the seed as the mechanism keeping the widened slider
inside the clamp. Corrected here rather than left, because that paragraph opens
"THAT LAST SENTENCE IS TRUE ONLY BECAUSE…" and that sentence is one this branch
rewrites — the rebase made it this branch's to own. It now describes
m_alcGain = target and names 37ecd25f.
| mutation | result |
|---|---|
TCI → EngineGenerated |
hl2_tci_signaling_test fails |
AX.25 → EngineGenerated |
icom_identity_test fails |
| residue guard removed | hl2_txdsp_test fails — carry arrives at +20.0 dBFS |
| enum gutted to one enumerator | tx_audio_source_wiring_test fails all three |
MainWindow.cpp compiles (the only GUI TU naming TxAudioSource)check_engine_boundary.py 0 would block · check_test_registration.py OK ·check_ci_test_gate.py ok · no CHANGELOG.md entry · no workflow editsprocessAudioBlock(..., bool) call site arrived from mainThe AX.25 level is −9.12 dBFS with no operator control: pre-existing, unchanged
here, and named in the body as the follow-up (Ax25TxLevelDbfs, the shape #5651
uses for WSPR). TX:ALCGAIN's meter face remains -20.0, 40.0 naming the deleted
alcMaxGainDb — that one is main's now, not this PR's. The end-to-end beacon
leg stays open and the wiring test says so.
#5651 must land after this, or beacons sit at −20 dBFS. Auto-merge armed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…t still said it did ### One comment the seed's removal left behind `37ecd25f` deleted `Config::alcAttackSec` and made ALC reduction instantaneous, and `Hl2TxDsp.cpp` records the reasoning at the assignment — the seed was tried, it covered only the first reduction of an over, and a −38 dBFS word followed by a −12 dBFS syllable reached |IQ| 1.0768 with 223 samples clipped. Thirty lines above that note, the same file still opened with: > Above the target the loop reduces on its **5 ms attack**, so the response degrades to smooth limiting instead of clipping. That sentence names a constant which no longer exists **and** describes the opposite of what the code twenty lines below it now does. `grep alcAttackSec src/` returns nothing. ### How it was found @ten9876 fixed the same shape in `Hl2TxLevelPolicy.h` while rebasing #5647, and wrote: *"Flagging it because it means #5646 merged with one stale paragraph, and if anything else on that sweep was missed it will be in the same shape."* It was, one file over. This is that sweep finished: ``` $ git grep -inE "alcAttackSec|m_alcSeedPending|key-on seed|seeds the gain|5 ms attack" main -- src/ docs/ src/core/backends/hl2/Hl2TxDsp.cpp:248 <- this PR src/core/backends/hl2/Hl2TxLevelPolicy.h:82 <- already fixed on #5647 src/core/ClientPudu.cpp:219 <- unrelated, a musical envelope ``` **`Hl2TxLevelPolicy.h` is deliberately not touched here.** That paragraph is already corrected on #5647's branch, which is approved and waiting; fixing it twice would put this PR in conflict with it for no gain. ### Validation Comment only — the diff is three lines of prose inside one `//` block. `hl2_txdsp_test` passes unchanged. No behavioural change, no new symbol, no settings key, no doc row. **Not measured:** anything on hardware; nothing in this diff is executable. I did not sweep for other comments describing removed mechanisms in general — only for this one's five markers. If a broader sweep is wanted it should be its own change, because it would touch files this one has no business in. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Squashed-from: #5737 Co-authored-by: on8st <[email protected]>
The rebase @ten9876 asked for as a precondition. main's tip is now 5607b56 (aethersdr#5646) and 8f4b4dc (aethersdr#5647) -- exactly the two commits he said must land before TXA work touched Hl2TxDsp -- so this is the condition being MET rather than worked around. Four files conflicted; three decisions in them are worth stating. THE SOURCE ARGUMENT IS MAIN'S, NOT OURS. aethersdr#5647 replaced processAudioBlock's `bool clientLeveled` with a three-way TxAudioSource, and this branch was written against the bool. Main's signature wins everywhere, including through the test's feed() helper. The TXA rate-coupling note survives beside it with a sentence saying the two are orthogonal: the rate coupling is a property of which MODULATOR was compiled in, the source argument is about which LEVEL policy applies, and neither reads the other. THREE CLIPPING CASES MAIN ADDED WERE FEEDING THE MODULATOR DIRECTLY. They arrived after this branch forked, so they were the only sites left calling processAudioBlock instead of feed(). Unpaced against a TXA channel that is the same as not feeding it at all: 64 of 66 blocks underran, whole-run |IQ| peak read 0.0000, and the case reported "the transmission is still on the air" as a FAILURE. The transmission was on the air. The test was feeding five times faster than the channel drains. feed() is a no-op in the phasing build, so this costs that build nothing. AND THE SLIDER-TOP CREST CHECK NEEDED A PER-BUILD WINDOW -- the one change here that is not mechanical. Crest is peak over mean |IQ|, so anything making the envelope non-constant raises it. In the phasing build the only such thing IS the fault the leg guards, a key-on window of flat-topped input, which is why it asserts over the whole run. A TXA channel has a second and LEGITIMATE source of envelope: create_slews' mute ramp, 840 input samples of deliberate T/R shaping at the head of every over. Measured: whole run 1.0684, settled tail 1.0000, with ZERO samples at the clamp across the whole run. So the whole-run form reports the transmitter's intended envelope as distortion, and fails a modulator that is in fact cleaner than the one it replaces. The TXA build asserts on the settled tail; the clamp-count assertion, which is what actually pins the key-on fault, still runs whole-run in BOTH. The key-on fault cannot arise under TXA anyway -- the ramp starts the modulator's input at zero, so no full-scale block precedes convergence. Also: wdsp_channel_test's runner is main's non-short-circuiting form, with our two cases inserted into it rather than the `||` chain restored; <algorithm> included where the diff started using it; and section 8 of the configuration diff rewritten with the post-rebase numbers and its line-number citation replaced by the assertion text. Both builds, full suite: AETHER_HL2_TX_TXA=ON 461/463 (tgxl aethersdr#5676, vkamp flake) AETHER_HL2_TX_TXA=OFF 462/463 (tgxl aethersdr#5676) vkamp_connection_test is flaky in ISOLATION as well as under -j8 -- failed once alone, then passed -- so it is not parallel contention. It does not appear in the phasing run. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs
The rebase @ten9876 asked for as a precondition. main's tip is now 5607b56 (aethersdr#5646) and 8f4b4dc (aethersdr#5647) -- exactly the two commits he said must land before TXA work touched Hl2TxDsp -- so this is the condition being MET rather than worked around. Four files conflicted; three decisions in them are worth stating. THE SOURCE ARGUMENT IS MAIN'S, NOT OURS. aethersdr#5647 replaced processAudioBlock's `bool clientLeveled` with a three-way TxAudioSource, and this branch was written against the bool. Main's signature wins everywhere, including through the test's feed() helper. The TXA rate-coupling note survives beside it with a sentence saying the two are orthogonal: the rate coupling is a property of which MODULATOR was compiled in, the source argument is about which LEVEL policy applies, and neither reads the other. THREE CLIPPING CASES MAIN ADDED WERE FEEDING THE MODULATOR DIRECTLY. They arrived after this branch forked, so they were the only sites left calling processAudioBlock instead of feed(). Unpaced against a TXA channel that is the same as not feeding it at all: 64 of 66 blocks underran, whole-run |IQ| peak read 0.0000, and the case reported "the transmission is still on the air" as a FAILURE. The transmission was on the air. The test was feeding five times faster than the channel drains. feed() is a no-op in the phasing build, so this costs that build nothing. AND THE SLIDER-TOP CREST CHECK NEEDED A PER-BUILD WINDOW -- the one change here that is not mechanical. Crest is peak over mean |IQ|, so anything making the envelope non-constant raises it. In the phasing build the only such thing IS the fault the leg guards, a key-on window of flat-topped input, which is why it asserts over the whole run. A TXA channel has a second and LEGITIMATE source of envelope: create_slews' mute ramp, 840 input samples of deliberate T/R shaping at the head of every over. Measured: whole run 1.0684, settled tail 1.0000, with ZERO samples at the clamp across the whole run. So the whole-run form reports the transmitter's intended envelope as distortion, and fails a modulator that is in fact cleaner than the one it replaces. The TXA build asserts on the settled tail; the clamp-count assertion, which is what actually pins the key-on fault, still runs whole-run in BOTH. The key-on fault cannot arise under TXA anyway -- the ramp starts the modulator's input at zero, so no full-scale block precedes convergence. Also: wdsp_channel_test's runner is main's non-short-circuiting form, with our two cases inserted into it rather than the `||` chain restored; <algorithm> included where the diff started using it; and section 8 of the configuration diff rewritten with the post-rebase numbers and its line-number citation replaced by the assertion text. Both builds, full suite: AETHER_HL2_TX_TXA=ON 461/463 (tgxl aethersdr#5676, vkamp flake) AETHER_HL2_TX_TXA=OFF 462/463 (tgxl aethersdr#5676) vkamp_connection_test is flaky in ISOLATION as well as under -j8 -- failed once alone, then passed -- so it is not parallel contention. It does not appear in the phasing run. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs
Nineteen files conflicted. Every resolution keeps BOTH sides; none takes the PR's side over main's. - `submitTxAudio`/`processAudioBlock` take main's three-way `TxAudioSource` AND this branch's `TxCoordinator::Context`. The `bool clientLeveled` those signatures carried here is gone: `ClientLeveled` is one of main's three states, so the flag was the same question asked worse (aethersdr#5647). - `TransmitModel::requestAtu` keeps main's `m_userAbortedAtu` tracking (996b367), set AFTER admission on whichever route carries the command — a refused request never reached the ATU and must not claim an abort. Without this a bypass of a running tune reports "ATU tune failed". - `MetisClient` keeps main's RQST allow-list, `onControlPacketSent` accounting and bandscope transmit interlock alongside this branch's operation fence. The fence is set before the `m_mox == was` early-out, so a repeat key from a NEW producer re-anchors it. - `RadioModel::onDisconnected` keeps main's `expirePendingCallbacks` (bc9abdf) and this branch's retrying `acknowledgeTxTransportTeardown`. - `AudioEngine` keeps main's per-entry-point source tagging and emits the transport tap with the same tag; `Hl2Backend` keeps this branch's shared_ptr capture rather than `this`, which the DSP thread outlives. - Touchpoint manifest regenerated rather than hand-merged: 223 headers. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The rebase @ten9876 asked for as a precondition. main's tip is now 5607b56 (aethersdr#5646) and 8f4b4dc (aethersdr#5647) -- exactly the two commits he said must land before TXA work touched Hl2TxDsp -- so this is the condition being MET rather than worked around. Four files conflicted; three decisions in them are worth stating. THE SOURCE ARGUMENT IS MAIN'S, NOT OURS. aethersdr#5647 replaced processAudioBlock's `bool clientLeveled` with a three-way TxAudioSource, and this branch was written against the bool. Main's signature wins everywhere, including through the test's feed() helper. The TXA rate-coupling note survives beside it with a sentence saying the two are orthogonal: the rate coupling is a property of which MODULATOR was compiled in, the source argument is about which LEVEL policy applies, and neither reads the other. THREE CLIPPING CASES MAIN ADDED WERE FEEDING THE MODULATOR DIRECTLY. They arrived after this branch forked, so they were the only sites left calling processAudioBlock instead of feed(). Unpaced against a TXA channel that is the same as not feeding it at all: 64 of 66 blocks underran, whole-run |IQ| peak read 0.0000, and the case reported "the transmission is still on the air" as a FAILURE. The transmission was on the air. The test was feeding five times faster than the channel drains. feed() is a no-op in the phasing build, so this costs that build nothing. AND THE SLIDER-TOP CREST CHECK NEEDED A PER-BUILD WINDOW -- the one change here that is not mechanical. Crest is peak over mean |IQ|, so anything making the envelope non-constant raises it. In the phasing build the only such thing IS the fault the leg guards, a key-on window of flat-topped input, which is why it asserts over the whole run. A TXA channel has a second and LEGITIMATE source of envelope: create_slews' mute ramp, 840 input samples of deliberate T/R shaping at the head of every over. Measured: whole run 1.0684, settled tail 1.0000, with ZERO samples at the clamp across the whole run. So the whole-run form reports the transmitter's intended envelope as distortion, and fails a modulator that is in fact cleaner than the one it replaces. The TXA build asserts on the settled tail; the clamp-count assertion, which is what actually pins the key-on fault, still runs whole-run in BOTH. The key-on fault cannot arise under TXA anyway -- the ramp starts the modulator's input at zero, so no full-scale block precedes convergence. Also: wdsp_channel_test's runner is main's non-short-circuiting form, with our two cases inserted into it rather than the `||` chain restored; <algorithm> included where the diff started using it; and section 8 of the configuration diff rewritten with the post-rebase numbers and its line-number citation replaced by the assertion text. Both builds, full suite: AETHER_HL2_TX_TXA=ON 461/463 (tgxl aethersdr#5676, vkamp flake) AETHER_HL2_TX_TXA=OFF 462/463 (tgxl aethersdr#5676) vkamp_connection_test is flaky in ISOLATION as well as under -j8 -- failed once alone, then passed -- so it is not parallel contention. It does not appear in the phasing run. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014TtnKQu6QGrSeBirGeAsAs