Skip to content

test+feat: optimizer invariant tests and compromise out-of-window warning#129

Merged
dc0sk merged 2 commits into
mainfrom
test/invariant-properties
Jul 8, 2026
Merged

test+feat: optimizer invariant tests and compromise out-of-window warning#129
dc0sk merged 2 commits into
mainfrom
test/invariant-properties

Conversation

@dc0sk

@dc0sk dc0sk commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Backlog items T1 + T2 (small quality/UX from the project review & SRS follow-ups).

T1 — invariant/property tests (calculations.rs):

  • resonant lengths strictly decrease with frequency across 1.8–28.5 MHz
  • OCFD split partitions the whole wire and stays in [0.20,0.45]/[0.55,0.80]
  • every non-resonant window optimum is a local maximum of resonance clearance

T2 — compromise out-of-window warning (app/mod.rs):

  • calculate_resonant_compromises silently dropped bands with no in-window resonance; new compromise_unreachable_bands()/_warning() names them and the warning is surfaced in ResultsDisplayDocument.warning_lines (resonant mode only).

Test plan: cargo test all pass (374 lib + integration), clippy + fmt clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jf8uBU8AYxkrG8fa8yo6tC

dc0sk and others added 2 commits July 8, 2026 21:49
Adds the invariant coverage identified in the v2.14.0 project review:
- resonant lengths strictly decrease with frequency (L ∝ 1/f) across a
  1.8–28.5 MHz sweep;
- OCFD split partitions the whole wire (ratios and legs sum) and stays inside
  the searched short-leg band [0.20, 0.45] / long-leg [0.55, 0.80];
- every non-resonant window optimum is a local maximum of resonance clearance
  (distance to nearest avoid-point ≥ its step-neighbours).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
calculate_resonant_compromises silently drops any band whose resonances all
fall outside the search window, so the "compromise across all selected bands"
recommendation could quietly ignore a band. Surface it: a new
compromise_unreachable_bands()/_warning() names those bands and the warning is
added to ResultsDisplayDocument.warning_lines (resonant mode only). Adjusts a
skipped-band test to use a reachable band so it still isolates its own warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dc0sk
dc0sk merged commit caa2a9b into main Jul 8, 2026
10 checks passed
@dc0sk
dc0sk deleted the test/invariant-properties branch July 8, 2026 19:59
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.

1 participant