Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new workspace crate, plurality, implementing a growable fixed-slot pool allocator that returns thin smart-pointer handles (Box, Alloc, Arc, Rc) and includes a full suite of tests, concurrency model-checking (loom), property testing (bolero), and benchmarking/reporting tooling.
Changes:
- Add the
crates/pluralitycrate with pool/slot/chunk infrastructure and four handle types. - Add extensive correctness coverage: integration tests, loom model tests, bolero property tests, plus local correctness/perf scripts.
- Wire
pluralityinto the workspace docs/dependency listings and mutation-testing exclusions.
Reviewed changes
Copilot reviewed 41 out of 42 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Adds plurality to the root crate list. |
| CHANGELOG.md | Adds plurality to the workspace changelog index. |
| Cargo.toml | Adds plurality to [workspace.dependencies]. |
| Cargo.lock | Updates lockfile for new crate + benchmark/dev dependencies. |
| .cargo/mutants.toml | Adds plurality-related mutant exclusions. |
| crates/plurality/Cargo.toml | New crate manifest (features, deps, benches). |
| crates/plurality/README.md | New crate README describing API, benchmarks, testing. |
| crates/plurality/CHANGELOG.md | New crate changelog. |
| crates/plurality/logo.png | Adds crate logo asset via Git LFS pointer. |
| crates/plurality/favicon.ico | Adds crate favicon asset via Git LFS pointer. |
| crates/plurality/docs/DESIGN.md | Detailed internal design/architecture document. |
| crates/plurality/docs/TODO.md | Tracks planned/unimplemented follow-ups. |
| crates/plurality/docs/PERF.md | Adds a generated performance report snapshot. |
| crates/plurality/scripts/perf_report.rs | Script to run benches and regenerate PERF.md. |
| crates/plurality/scripts/correctness.rs | Script to run the full local correctness suite. |
| crates/plurality/src/lib.rs | Crate root, docs, module wiring, public re-exports. |
| crates/plurality/src/atomic.rs | Atomic shim to support loom-instrumented atomics. |
| crates/plurality/src/builder.rs | PoolBuilder implementation and validation. |
| crates/plurality/src/chunk.rs | Chunk layout math + slot/header recovery helpers. |
| crates/plurality/src/slot.rs | SlotCell definition + refcount overflow abort path. |
| crates/plurality/src/pool.rs | Core pool allocation/grow/free/teardown logic. |
| crates/plurality/src/common.rs | Shared handle surface + forwarding trait impl macros. |
| crates/plurality/src/boxed.rs | plurality::Box handle implementation. |
| crates/plurality/src/alloced.rs | plurality::Alloc handle implementation. |
| crates/plurality/src/sync.rs | plurality::Arc handle implementation. |
| crates/plurality/src/rc.rs | plurality::Rc handle implementation. |
| crates/plurality/tests/common/mod.rs | Shared test helpers (drop counters). |
| crates/plurality/tests/box.rs | Box handle integration tests. |
| crates/plurality/tests/arc.rs | Arc handle integration tests. |
| crates/plurality/tests/rc.rs | Rc handle integration tests (incl. cross-thread reuse scenario). |
| crates/plurality/tests/alloc.rs | Alloc handle integration tests. |
| crates/plurality/tests/smart_ptr.rs | Cross-handle smart-pointer surface/trait forwarding tests. |
| crates/plurality/tests/pool.rs | Pool/builder behavior tests, stress tests, allocator tests. |
| crates/plurality/tests/loom.rs | Loom model-checking tests for concurrency interleavings. |
| crates/plurality/tests/bolero.rs | Bolero property/fuzz tests for pool invariants. |
| crates/plurality/benches/shared/ops.rs | Shared per-op benchmark bodies for criterion/gungraun. |
| crates/plurality/benches/criterion_alloc.rs | Wall-clock (criterion) allocation benchmarks. |
| crates/plurality/benches/gungraun_alloc/main.rs | Callgrind bench entrypoint (Linux-only no-op otherwise). |
| crates/plurality/benches/gungraun_alloc/linux.rs | Callgrind bench bodies aligned with criterion ops. |
| crates/plurality/benches/pool_comparison/main.rs | Cross-crate Callgrind comparison entrypoint. |
| crates/plurality/benches/pool_comparison/linux.rs | Cross-crate Callgrind comparison bodies. |
| crates/plurality/benches/graph_churn.rs | Macro benchmark comparing pool vs Box+mimalloc. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #532 +/- ##
========================================
Coverage 100.0% 100.0%
========================================
Files 343 352 +9
Lines 26202 26809 +607
========================================
+ Hits 26202 26809 +607 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
No description provided.