test+feat: optimizer invariant tests and compromise out-of-window warning#129
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backlog items T1 + T2 (small quality/UX from the project review & SRS follow-ups).
T1 — invariant/property tests (
calculations.rs):T2 — compromise out-of-window warning (
app/mod.rs):calculate_resonant_compromisessilently dropped bands with no in-window resonance; newcompromise_unreachable_bands()/_warning()names them and the warning is surfaced inResultsDisplayDocument.warning_lines(resonant mode only).Test plan:
cargo testall pass (374 lib + integration), clippy + fmt clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01Jf8uBU8AYxkrG8fa8yo6tC