Skip to content

ATU pre-tune: per-band early exit instead of full-sweep abort (#3062). Principle XIII.#3063

Merged
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-3062
May 24, 2026
Merged

ATU pre-tune: per-band early exit instead of full-sweep abort (#3062). Principle XIII.#3063
ten9876 merged 1 commit into
mainfrom
aetherclaude/issue-3062

Conversation

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Summary

Fixes #3062

What was changed

ATU pre-tune: per-band early exit instead of full-sweep abort (#3062). Principle XIII.

Files modified

  • src/gui/AtuPreTuneDialog.cpp
 src/gui/AtuPreTuneDialog.cpp | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

Generated by AetherClaude (automated agent for AetherSDR)


🤖 aethersdr-agent · cost: $4.5039 · model: claude-opus-4-7

…. Principle XIII.

After 3 consecutive TUNE_FAIL_BYPASS results, advance m_currentIndex past
the remaining points on the dying band rather than aborting the whole
sweep. Multi-band runs keep producing useful results when only one band's
antenna is bad (e.g. broken feedline on 80m while 40m/20m/15m are fine).

- Last-band / single-band failure: the skip loop body never executes,
  beginNextPoint() increments past m_points.size() and falls through to
  finishSweep() — matches the prior terminal-abort behaviour for those
  cases (covers the test-plan edge cases).
- First point of a new band fails-bypasses: counter is reset to 0 before
  the recursion, so three fresh fails are required to trigger another
  per-band skip.
- m_skipCount is incremented by (current - skipStart), not (+ 1): the
  triggering point already incremented m_failCount, so only the
  remaining points on the dying band count as skips.
- Audible cue (QApplication::beep) preserved from PR #3050 item #7.
- Message includes the next band name when one exists so the operator
  sees what is about to run.

Principle XIII (The Operator Outranks Every Agent): the operator with
one bad antenna outranks a defensive over-abort — give them the useful
remainder of the sweep rather than the binary "every band aborted"
verdict the previous safety net imposed.

Blast radius: risk_score=0.0504, 5 high-risk affected (top:
RadioModel::transmitModel, RadioModel::isConnected, SliceModel::sliceId).
All five are downstream-transitive callees of onAtuStateChanged whose
behaviour and call sites are unchanged by this patch — the edit
modifies only the consecutive-fail-bypass branch's control flow.

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good — implementation matches the issue spec and the surrounding code's idioms.

Verified:

  • Skip-count accounting is correct: the failing point is already in m_failCount (line 779), and only the points after it on the dying band are added to m_skipCount. This matches the issue's intent and is more accurate than the sketch in #3062 (which would have double-counted the failing point as a skip).
  • Edge cases all collapse to finishSweep() via beginNextPoint():
    • Single-band sweep → loop body runs through remaining points, then beginNextPoint() increments past m_points.size() and calls finishSweep().
    • Last band of a multi-band sweep → same path.
    • Failure on the very last point → loop body is a no-op, beginNextPoint() finishes.
  • m_consecutiveFailBypass reset before beginNextPoint() so the new band gets a fresh 3-strike budget. Matches the issue's edge-case #3.
  • Beep + status text preserved; existing showFailControls path for non-terminal fail-bypass is untouched.

One small nit (non-blocking) — the inline comment claims "If the dying band is the last one, the loop body never runs". That's only true when we're at the last point of the last band; in the more common case (fail on point 1 of 5 on the last band) the loop body does run, skipping points 2-5 before beginNextPoint() finishes the sweep. End behavior is correct; the comment just describes one sub-case, not all "last band" cases. Worth tightening if you re-touch the file, not worth a respin.

Thanks for the careful change, @aethersdr-agent — the per-band early exit is a genuine UX win for multi-band sweeps with one bad antenna.


🤖 aethersdr-agent · cost: $4.9065 · model: claude-opus-4-7

@ten9876 ten9876 merged commit 010ee6a into main May 24, 2026
5 checks passed
@ten9876 ten9876 deleted the aetherclaude/issue-3062 branch May 24, 2026 16:57
G6PWY-Chris pushed a commit to G6PWY-Chris/AetherSDR that referenced this pull request Jun 22, 2026
…sdr#3062). Principle XIII. (aethersdr#3063)

## Summary

Fixes aethersdr#3062

### What was changed

ATU pre-tune: per-band early exit instead of full-sweep abort (aethersdr#3062).
Principle XIII.

### Files modified

- `src/gui/AtuPreTuneDialog.cpp`

```
 src/gui/AtuPreTuneDialog.cpp | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)
```

---
Generated by AetherClaude (automated agent for AetherSDR)

---
<sub>🤖 aethersdr-agent · cost: $4.5039 · model: claude-opus-4-7</sub>

Co-authored-by: aethersdr-agent[bot] <273844287+aethersdr-agent[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ATU pre-tune: per-band early exit instead of full-sweep abort (deferred from #2649)

1 participant