Repository navigation
Fix unsafe parallel polynomial scheduling estimates - #20
Merged
Merged
Conversation
Stop estimating work once the relation target is reached or exceeded. Validate estimates and duration arithmetic, clearing both outputs for serial fallback on invalid or empty batches. Preserve integer-clock truncation and existing timing thresholds. Add native boundary regressions and serial/parallel factorization checks.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20 +/- ##
==========================================
- Coverage 92.49% 92.25% -0.24%
==========================================
Files 18 18
Lines 1572 1601 +29
==========================================
+ Hits 1454 1477 +23
- Misses 118 124 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Parallel quadratic-sieve batches can reach or exceed the relation target before the scheduler recalculates remaining work, leading to invalid arithmetic and unsafe conversion to
std::size_t.This change stops scheduling when the target is reached, validates remaining-work estimates, and guards duration arithmetic against overflow. Invalid or empty batches use the existing serial fallback. Safe schedules retain the original integer-clock truncation, worker-selection rule, and 15/30-second batch decisions.
Adds public serial/parallel factorization coverage and development-only native regressions for completion, overflow, timing boundaries, and fallback behavior.
Validation:
R CMD check --no-manualcompleted withStatus: OK.No sanitizers were run. Native diagnostics remain development-only, with no CI or dependency changes.
Fixes #19