fix: handle undefined effort in getEffortScale (#1525) - #1738
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Benchmark This PRRun benchmarks by commenting on this PR: Comment Everything after Use Any PR whose title contains |
|
Unit test |
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
|
Friendly bump on this PR. All CI checks pass 100% and unit tests are included. |
|
This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs. |
Summary
Closes #1525
When
params.effortisundefined,Math.max(undefined, 1e-2)ingetEffortScaleevaluates toNaN. This causesMAX_ITERATIONSto evaluate toNaNacross downstream solvers, triggering an immediate 'ran out of iterations' failure on small boards.This PR updates
getEffortScaleto safely handleundefinedor non-numeric effort inputs by defaulting to1.Testing
tests/get-effort-scale.test.tsverifyingundefined,NaN, normal, and minimum effort scale calculations.