Skip to content

Make SteenrodModule an Arc#233

Merged
JoeyBF merged 2 commits into
SpectralSequences:masterfrom
JoeyBF:arc_module
Jun 22, 2026
Merged

Make SteenrodModule an Arc#233
JoeyBF merged 2 commits into
SpectralSequences:masterfrom
JoeyBF:arc_module

Conversation

@JoeyBF

@JoeyBF JoeyBF commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Refactor
    • Optimized internal module handling and memory management for improved performance and code maintainability across the algebra system.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@JoeyBF, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 36 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0f1aff84-b84c-4ba5-a64f-e09d77d3bfe3

📥 Commits

Reviewing files that changed from the base of the PR and between 9bd849c and 8236506.

📒 Files selected for processing (1)
  • ext/src/utils.rs
📝 Walkthrough

Walkthrough

SteenrodModule is changed from Box<dyn Module<...>> to Arc<dyn Module<...>>. The Module trait gains Arc in its auto_impl attribute. All construction sites (erase, zero_module, JSON deserialization) switch to Arc::new. Call sites in utils.rs and mahowald_invariant.rs are updated accordingly.

Changes

Box→Arc migration for SteenrodModule

Layer / File(s) Summary
Module trait and SteenrodModule type redefinition
ext/crates/algebra/src/module/module_trait.rs, ext/crates/algebra/src/module/steenrod_module.rs, ext/crates/algebra/src/module/zero_module.rs
Module trait's #[auto_impl] attribute gains Arc; SteenrodModule type alias changes from Box<dyn ...> to Arc<dyn ...>; erase() wraps with Arc::new; JSON deserialization closure returns Arc-backed instances; zero_module wraps FDModule with Arc::new.
Call sites updated to erase()
ext/src/utils.rs, ext/examples/mahowald_invariant.rs
utils.rs imports erase explicitly and replaces Box::new(...) as SteenrodModule with erase(...) in construct_standard and get_unit; mahowald_invariant.rs updates imports and the Resolution type alias to use the concrete SteenrodModule type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hop, hop, from Box to Arc we go,
Shared ownership is all the rage, you know!
The erase() function wraps things tight,
With reference counts gleaming bright.
No more boxing—Arc's the key,
Concurrent modules, running free! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Make SteenrodModule an Arc' directly and clearly describes the main change: converting the SteenrodModule type alias from Box-based to Arc-based smart pointers across the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@JoeyBF JoeyBF merged commit 5de8201 into SpectralSequences:master Jun 22, 2026
23 of 24 checks passed
@JoeyBF JoeyBF deleted the arc_module branch June 22, 2026 20:32
github-actions Bot added a commit that referenced this pull request Jun 22, 2026
* Make `SteenrodModule` an `Arc`

* Use qualified name for `erase`
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.

2 participants