Repository navigation
fix: Optimal P increase always names a higher P - #247
nerdCopter wants to merge 2 commits into
Conversation
safe_scaled_p truncates, so P below 20 with a 5% step (below 10 with 10%) scaled to the same integer and the Increase recommendation named the current P. Add safe_raised_p, which returns at least P+1 for increases, and use it in the four Increase paths. Decrease path and P >= 20 results are unchanged. Add boundary tests at P 0, 1, 9, 10, 19, 20, 21 and u32::MAX saturation. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoqKWwCzFDgbyFBKx3fnAe
The on-target, low-noise case checks conservative > current_p to decide whether a whole-integer step exists. Raising the step to P+1 there made the check always true and added increases for small P that were not recommended before. It uses safe_scaled_p again. The Td-slower and unknown-noise paths keep safe_raised_p. A test covers P 10 and P 19 on target. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KoqKWwCzFDgbyFBKx3fnAe
|
@coderabbitai — AI generated comment Analysis requested on PR 247 (
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
The existing maximum-value test checks the helper with There is also a pre-existing full-range output limitation: the console subtracts P values as I checked representative boundaries and reviewed the arithmetic; I did not run the repository tests or verify a low-P real log end to end. You are interacting with an AI system. |
|
@coderabbitai review |
Action not completed
|
AI Generated pull-request
Summary
safe_scaled_ptruncates, so a 5% step on P below 20 (or a 10% step on P below 10) scaled to the same integer and the recommendation read "Increase P to ". Newsafe_raised_preturns the scaled value but at least P+1. It serves the three Increase paths without a changed-value guard: Td significantly slower with low noise, Td moderately slower with low or moderate noise, and unknown noise with Td slower. The result names a higher P for every P belowu32::MAX(atu32::MAXno higher value exists; real P gains are far below that). Results for P of 20 and above are unchanged. The on-target low-noise path keeps plain scaling, because its ownconservative > current_pcheck must still be able to reject a step with no headroom.Console, report.md and the PNG legend share one recommendation, so all three are covered.
Refs #242
Gaps left
i32(optimal_p_estimation.rs~:655) and could overflow nearu32::MAX; not reachable with real gains, left unchanged.Test plan
cargo clippy --all-targets --all-features -- -D warnings,cargo fmt --all,cargo test,cargo build --releasepass.u32::MAX; on-target P 10 and 19 stay without an increase.