Skip to content

test(parallel): bound public control and workspace inputs - #767

Merged
seonghobae merged 5 commits into
mainfrom
fix/parallel-analysis-control-bounds
Aug 11, 2026
Merged

test(parallel): bound public control and workspace inputs#767
seonghobae merged 5 commits into
mainfrom
fix/parallel-analysis-control-bounds

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Buyer-visible reliability / input-integrity gap

Public parallel_analysis() currently coerces n_iterations, centile, and seed through int(...) and has no package-owned pre-dispatch ceiling for the Rust random-benchmark simulation workspace. Booleans, floats, strings, and caller-defined integer conversion hooks can therefore cross an integer control boundary, while a very large iteration count can request an impractical n_iterations * n_items f64 allocation before a stable resource error.

Intentional fail-first slice

This Draft currently contains tests only. The RED requires:

  • booleans/floats/strings to fail before Rust dispatch for all three integer controls;
  • caller-defined __int__ hooks not to execute;
  • an oversized benchmark workspace to fail before compiled dispatch;
  • seed to be validated against the Rust u64 transport range; and
  • exact NumPy integer scalars to remain accepted.

A valid RED must reach these public-boundary assertions after normal package setup; setup/import/fixture/changelog failure is not acceptance evidence.

Planned minimum GREEN

After exact-head RED is observed, add the narrowest Python + Rust resource/input validation:

  1. strict admitted integer types (int / NumPy integer; excluding bool) with stable non-reflective errors;
  2. bounded simulation-workspace bytes derived from the n_iterations * n_items * sizeof(f64) allocation, enforced in Python before PyO3 and independently in mlsirm-core before allocation;
  3. stable u64 seed range validation;
  4. no change to Horn/paran eigenvalue, RNG, centile, bias-adjustment, or retention arithmetic;
  5. boundary tests plus full applicable Python/Rust/package/fuzz/security evidence.

Advances the resource/input-integrity work under #627 without widening into a new factor-retention algorithm or changing numerical ownership.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c00130db-dddd-4110-b3f5-cc454525f562

📥 Commits

Reviewing files that changed from the base of the PR and between 1324de1 and ffead4b.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • crates/mlsirm-core/src/parallel.rs
  • docs/changelog.d/627-parallel-analysis-control-bounds.md
  • docs/doctoring/parallel_analysis_control_bounds.md
  • python/fast_mlsirm/parallel_analysis.py
  • tests/test_parallel_analysis_control_bounds.py

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae force-pushed the fix/parallel-analysis-control-bounds branch from 180e42f to ffead4b Compare August 11, 2026 19:37
@seonghobae
seonghobae marked this pull request as ready for review August 11, 2026 19:37
@seonghobae
seonghobae merged commit 607e3f2 into main Aug 11, 2026
5 checks passed
@seonghobae
seonghobae deleted the fix/parallel-analysis-control-bounds branch August 11, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant