math_brute_force: Refactor input generation & reduce default test size #2749
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 155 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.302
Real PR Conversation Timeline
1 comments
"Review active on #2749"
general
weight: 0.35
shajder
This patch addresses execution time and input coverage in the math_brute_force tests by centralizing input generation and scaling down the default number of tested values.
Key changes:
Abstracted input generation: Replaced duplicated array-filling logic across test files with shared
fillInput helper functions (for unary, binary, and ternary operations). This ensures that special edge-case values (NaNs, Infs, denormals) and random payloads are consistently injected across all tests.Reduced default test size: The default loop bounds have been reduced from an exhaustive
1ULL << 32values to a randomized subset of1ULL << 27inputs. This drastically speeds up standard test runs.Added exhaustive
-aflag: Introduced a new-acommand-line option that restores the exhaustive testing behavior, allowing validation against all 2^32 sequential values when needed.scaleandstepskip logic, which could inadvertently skip combinations of special values. Instead, the patch now directly reduces the totalinput_count_power_of_twoby using a De Bruijn sequence bit-hack to calculate thelog2of thewimpyReductionFactor.Ref #2723
[run-test: test_bruteforce -w -1]