Skip to content

refactor(pooling): replace infinity_pool with plurality - #803

Open
martintmk wants to merge 10 commits into
mainfrom
martintmk-replace-infinity-pool
Open

martintmk wants to merge 10 commits into
mainfrom
martintmk-replace-infinity-pool

Conversation

@martintmk

Copy link
Copy Markdown
Member

Summary

  • migrate arty_executor heterogeneous task storage from infinity_pool::RawBlindPool to plurality::MultiPool
  • preserve the existing manual task lifetime through plurality::Box::into_raw / from_raw, including pinned access, cross-thread TaskRef transport, exact-once release, and steady-state slot reuse
  • remove the workspace dependency and all remaining comparison benchmarks, allocation tests, performance-report tooling, and documentation references
  • regenerate crate READMEs through Anvil (no generated README changes resulted)

Performance

Measured the existing arty_executor metabench target on isolated main (7a2de8ff) and this branch under WSL Callgrind/Gungraun. Instruction counts are deterministic on the same toolchain:

Workload Main Plurality Change
warm task add 315 258 -18.1%
warm spawn + complete 1,503 1,401 -6.8%
warm yield 2,687 2,544 -5.3%
sequential spawn + complete x1,000 1,397,191 1,303,201 -6.7%
ready burst x10,000 4,817,301 3,741,124 -22.4%
yield burst x10,000 7,918,708 6,620,265 -16.4%

Allocation-engine comparison remained at 0 allocations / 0 bytes for every warmed, sequential, and burst workload. First task registration changed from 10 allocations / 23,056 bytes to 11 allocations / 7,552 bytes: one additional cold layout-metadata allocation, but 67% fewer allocated bytes; the steady-state lifecycle remains allocation-free.

Validation

  • cargo check -p arty_executor -p plurality -p observed
  • focused base/migrated Gungraun runs for warm, sequential-1,000, and burst-10,000 executor workloads
  • focused base/migrated allocation-engine runs for the complete executor benchmark target
  • repository-wide case-insensitive search: no infinity_pool / infinity-pool references remain
  • git diff --check

Full formatting/lint/test matrices are delegated to CI per the requested minimal-local-validation policy. The generated nightly Anvil formatter could not run locally because the pinned nightly lacks rustfmt; directly changed packages were formatted with the installed stable rustfmt instead.

Migrate arty_executor task storage to plurality MultiPool raw handles and remove the legacy dependency, comparisons, documentation, and tooling references.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 8, 2026 13:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The generated performance report now contains inaccurate claims about the surveyed pool implementations.

1 open finding
What changed in this PR

Migrates arty_executor task storage to plurality::MultiPool and removes infinity_pool.

Changes:

  • Reworks raw task ownership and release through plurality::Box.
  • Removes infinity_pool dependencies and benchmarks.
  • Updates performance and design documentation.
File Description
Cargo.toml Removes workspace dependency.
Cargo.lock Updates resolved dependencies.
crates/​arty_executor/​Cargo.toml Replaces executor dependency.
crates/​arty_executor/​src/​executor_core.rs Migrates task storage and reclamation.
crates/​arty_executor/​src/​task_ref.rs Implements raw pooled task references.
crates/​observed/​benches/​observed_benchmarks.rs Generalizes benchmark comments.
crates/​plurality/​Cargo.toml Removes benchmark dependency.
crates/​plurality/​benches/​plurality.rs Removes comparison benchmarks.
crates/​plurality/​benches/​plurality_ops_common/​mod.rs Removes comparison operations.
crates/​plurality/​benches/​pool_comparison/​shared.rs Removes pool helpers.
crates/​plurality/​docs/​PERF.md Removes comparison results.
crates/​plurality/​docs/​design/​multi-pool.md Removes design comparison.
crates/​plurality/​scripts/​perf_report.rs Updates report generation.
crates/​plurality/​tests/​alloc_tracking.rs Removes comparison allocation tests.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

Comment thread crates/plurality/scripts/perf_report.rs Outdated
Clarify that comparison claims apply only to implementations retained in the generated report.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 8, 2026 13:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The migration preserves the existing task lifecycle while consistently removing the obsolete dependency and related artifacts.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@wukchung martinhavelka (wukchung) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 One verified finding on the migrated task storage.

Comment thread crates/arty_executor/src/task_ref.rs Outdated
@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (7a2de8f) to head (9dfeac6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main     #803     +/-   ##
=========================================
  Coverage   100.0%   100.0%             
=========================================
  Files         769      796     +27     
  Lines      117689   119447   +1758     
=========================================
+ Hits       117689   119447   +1758     
Flag Coverage Δ
linux 99.9% <100.0%> (-0.1%) ⬇️
linux-arm 100.0% <100.0%> (ø)
scheduled ?
windows 100.0% <100.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Avoid allocating test-only fake task references and restore owning-pool cleanup semantics when an executor is dropped during a panic or before shutdown completes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 8, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The unsafe raw-pointer ownership and cross-thread task-lifetime migration warrants final human validation.

0 open findings

🧠 Review effort: Balanced

Comment thread crates/arty_executor/src/executor_core.rs
Exercise dirty teardown across every scheduler collection and the pool-only state so mutation testing protects the plurality raw-handle cleanup path.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 8, 2026 19:07
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

⚠️ SemVer check advisory

Inconclusive comparisons

cargo semver-checks could not complete the following comparisons. These failures are informational because an unbuildable baseline is not evidence of a breaking API change.

metabench (exit 101)

     Cloning 7a2de8ff8e73dd0bad30fde62c7e33604f17c62d
    Building metabench v0.1.1 (current)
error: running cargo-doc on crate 'metabench' failed with output:
-----
   Compiling proc-macro2 v1.0.107
   Compiling unicode-ident v1.0.26
   Compiling quote v1.0.47
   Compiling serde_core v1.0.229
   Compiling zmij v1.0.23
   Compiling serde v1.0.229
   Compiling serde_json v1.0.151
    Checking cfg-if v1.0.5
   Compiling libc v0.2.190
    Checking itoa v1.0.18
   Compiling syn v3.0.6
   Compiling syn v2.0.119
    Checking memchr v2.8.3
    Checking bitflags v2.13.2
   Compiling zerocopy v0.8.62
   Compiling rustversion v1.0.23
   Compiling find-msvc-tools v0.1.14
   Compiling winnow v1.0.4
   Compiling shlex v2.0.1
   Compiling equivalent v1.0.2
   Compiling hashbrown v0.17.1
   Compiling semver v1.0.28
   Compiling rustc_version v0.4.1
   Compiling toml_parser v1.1.5+spec-1.1.0
   Compiling indexmap v2.14.2
   Compiling serde_derive v1.0.229
   Compiling cc v1.6.0
   Compiling zerocopy-derive v0.8.62
   Compiling derive_more-impl v2.1.1
   Compiling toml_datetime v1.1.2+spec-1.1.0
   Compiling autocfg v1.5.1
   Compiling rustix v1.1.5
   Compiling num-traits v0.2.19
   Compiling toml_edit v0.25.17+spec-1.1.0
   Compiling alloca v0.4.0
    Checking either-or-both v0.3.1
   Compiling gungraun-macros v0.9.1
   Compiling proc-macro-error-attr3 v3.1.1
    Checking linux-raw-sys v0.12.1
   Compiling bincode-next v3.1.1
    Checking ciborium-io v0.2.2
   Compiling getrandom v0.4.3
   Compiling cfg_aliases v0.2.2
    Checking either v1.19.0
    Checking regex-syntax v0.8.11
    Checking clap_lex v1.1.1
   Compiling thiserror v2.0.21
    Checking anstyle v1.0.14
    Checking clap_builder v4.6.7
    Checking regex-automata v0.4.18
    Checking itertools v0.13.0
   Compiling nix v0.31.3
    Checking half v2.7.1
    Checking ciborium-ll v0.2.2
   Compiling proc-macro-error3 v3.1.1
    Checking rapidhash v4.5.1
   Compiling proc-macro-crate v3.5.0
   Compiling derive_more v2.1.1
   Compiling thiserror-impl v2.0.21
    Checking cast v0.3.0
   Compiling gungraun v0.19.4
   Compiling pastey v0.2.3
    Checking same-file v1.0.6
    Checking unty-next v0.1.2
    Checking walkdir v2.5.0
    Checking criterion-plot v0.8.2
   Compiling metabench_macros_impl v0.1.1 (/home/runner/work/oxidizer/oxidizer/crates/metabench_macros_impl)
    Checking ciborium v0.2.2
    Checking gungraun-runner v0.20.0
    Checking regex v1.13.1
    Checking clap v4.6.7
    Checking gungraun-runner v0.19.4
    Checking tinytemplate v1.2.1
    Checking folo_utils v0.1.14
    Checking nix v0.27.1
    Checking page_size v0.6.0
    Checking oorandom v11.1.5
    Checking once_cell v1.21.4
   Compiling metabench v0.1.1 (/home/runner/work/oxidizer/oxidizer/crates/metabench)
    Checking fastrand v2.5.0
    Checking jiff-core v0.1.1
    Checking anes v0.1.6
    Checking criterion v0.8.2
    Checking command-group v5.0.1
    Checking gungraun-summary v6.0.0
error[E0432]: unresolved import `gungraun_runner::api::ValgrindTool`
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gungraun-summary-6.0.0/src/v6.rs:10:59
   |
10 |     CachegrindMetric, DhatMetric, ErrorMetric, EventKind, ValgrindTool,
   |                                                           ^^^^^^^^^^^^ no `ValgrindTool` in `api`

    Checking jiff v0.2.38
error[E0432]: unresolved imports `gungraun_runner::metrics::model::MetricsDiff`, `gungraun_runner::metrics::model::MetricsSummary`
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gungraun-summary-6.0.0/src/v6.rs:12:63
   |
12 | pub use gungraun_runner::metrics::model::{Metric, MetricKind, MetricsDiff, MetricsSummary};
   |                                                               ^^^^^^^^^^^  ^^^^^^^^^^^^^^ no `MetricsSummary` in `metrics::model`
   |                                                               |
   |                                                               no `MetricsDiff` in `metrics::model`

error[E0432]: unresolved imports `gungraun_runner::summary::model::Diffs`, `gungraun_runner::summary::model::FlamegraphSummary`, `gungraun_runner::summary::model::ProfileInfo`, `gungraun_runner::summary::model::SummaryFormat`, `gungraun_runner::summary::model::SummaryOutput`, `gungraun_runner::summary::model::ToolMetricSummary`
  --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gungraun-summary-6.0.0/src/v6.rs:14:38
   |
14 |     BenchmarkKind, BenchmarkSummary, Diffs, FlamegraphSummary, Profile, ProfileData, ProfileInfo,
   |                                      ^^^^^  ^^^^^^^^^^^^^^^^^                        ^^^^^^^^^^^ no `ProfileInfo` in `summary::model`
   |                                      |      |
   |                                      |      no `FlamegraphSummary` in `summary::model`
   |                                      no `Diffs` in `summary::model`
15 |     ProfilePart, ProfileTotal, Profiles, SCHEMA_VERSION, SummaryFormat, SummaryOutput,
   |                                                          ^^^^^^^^^^^^^  ^^^^^^^^^^^^^ no `SummaryOutput` in `summary::model`
   |                                                          |
   |                                                          no `SummaryFormat` in `summary::model`
16 |     ToolMetricSummary, ToolRegression,
   |     ^^^^^^^^^^^^^^^^^ no `ToolMetricSummary` in `summary::model`

For more information about this error, try `rustc --explain E0432`.
error: could not compile `gungraun-summary` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

-----

error: failed to build rustdoc for crate metabench v0.1.1
note: this is usually due to a compilation error in the crate,
      and is unlikely to be a bug in cargo-semver-checks
note: the following command can be used to reproduce the error:
      cargo new --lib example &&
          cd example &&
          echo '[workspace]' >> Cargo.toml &&
          cargo add --path /home/runner/work/oxidizer/oxidizer/crates/metabench &&
          cargo check &&
          cargo doc

error: aborting due to failure to build rustdoc for crate metabench v0.1.1

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Dirty teardown can free tasks while externally held wakers still reference their embedded wake signals.

1 open finding

🧠 Review effort: Balanced

Comment thread crates/arty_executor/src/executor_core.rs Outdated
Release uninitialized and inert tasks during dirty teardown, but retain non-inert raw owners so surviving wakers cannot access freed wake signals. Cover both reclamation and retention under Miri and mutation testing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 9, 2026 05:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The unsafe teardown rationale incorrectly states that newly queued tasks are uninitialized.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread crates/arty_executor/src/executor_core.rs Outdated
Document that queued tasks are initialized but have never been polled, so their embedded wakers cannot have escaped.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 9, 2026 06:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The unsafe exact-once task ownership and cross-thread waker lifetime changes warrant final human review.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@martintmk martintmk left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Copilot speaking]

I reviewed the complete diff, public surface, raw task ownership and waker lifetime, dirty teardown behavior, tests, manifests, benchmarks, generated performance-report inputs, documentation, and affected callers. I found no remaining high-confidence issues; the plurality::MultiPool migration preserves exact-once reclamation while retaining non-inert tasks, and the dependency/comparison cleanup is consistent.

Verdict: approve.

@martintmk

Copy link
Copy Markdown
Member Author

re-run the gungraun and allocation benches

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Copilot speaking]

Published 4 findings. No finding follows up on an existing discussion thread.

See diagnostics
Diagnostic Value
Cache Miss

Comment thread crates/arty_executor/src/executor_core.rs
Comment thread crates/plurality/docs/PERF.md Outdated
Comment thread crates/arty_executor/src/executor_core.rs
Comment thread crates/arty_executor/src/task_ref.rs Outdated
Document the synthetic dirty-drop fixture boundary, distinguish pool routing from trait-object unsizing, and group plurality imports consistently.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 9, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Dirty cleanup can invoke a panicking task destructor during unwinding before the existing double-panic guard runs.

1 open finding

🧠 Review effort: Balanced

Comment thread crates/arty_executor/src/executor_core.rs
@martintmk

martintmk commented Oct 9, 2026 •

Copy link
Copy Markdown
Member Author

Posted by an AI agent

Reviewed base: 7a2de8ff8e73dd0bad30fde62c7e33604f17c62d (main)
Reviewed head: 8cdb5c92eec4d716752959ea30884941e648a9ff
Review time: 2026-10-10T00:30:48Z (UTC)

This complete review covered all eleven areas across all 16 changed files: public contracts, runtime correctness, tests, performance, naming, telemetry, resilience, consistency, public API, documentation, and integration tests. Changes remain necessary.

Paired cargo public-api 0.52.0 captures for arty_executor, plurality, and observed were byte-identical with host --all-features, including parameter names; lockfiles and worktrees remained clean. Targeted native validation passed: 61 arty_executor library tests, one arty_executor allocation integration test, and seven plurality allocation tests. Reviewers also reported cargo test -p arty_executor, just anvil-miri --package arty_executor, and standard and strict-provenance Miri passing.

Linux Callgrind was not run. Exact-head-relevant Windows Criterion evidence was retained. A direct filtered cargo miri command could not start because cargo-miri rejected Cargo argfile invocation. At the final exact-head GitHub CI refresh, only the CLA check was successful; other checks had not appeared.

Current findings

Posted by an AI agent

Task-pool migration slows steady-state task churn

Problem
Matched Windows Criterion measurements show spawn_and_complete_one regressed 10.5% and sequential_1000 regressed 13.2%, with non-overlapping confidence intervals. Changes since measurement affect teardown and tests only; registration, reclamation, TaskRef, and benchmarks are unchanged.

Why this matters
MultiPool layout routing executes per task, compounding under sustained churn.

Suggested fix
Avoid repeated layout routing or retain the previous backend until comparable performance is restored.

Posted by an AI agent · Non-blocking

The implementation performance guide still describes removed comparisons

Problem
crates/plurality/docs/implementation/performance.md:127-128,165-172 still calls pool routing “type erasure” and describes external heterogeneous-pool rows removed from the benchmarks and report.

Why this matters
The implementation guide contradicts the retained benchmark set and generated performance report.

Suggested fix
Align the guide with the report's runtime-pool-routing terminology and plurality-versus-standard-library comparison scope.

Posted by an AI agent · Non-blocking

The executor's allocation-free claim omits debug diagnostics

Problem
crates/arty_executor/src/lib.rs:29-30 promises an allocation-free steady state, while tests/allocations.rs requires three allocations per operation with debug assertions and zero only without debug assertions.

Why this matters
Debug-build consumers receive a stronger performance guarantee than the implementation provides.

Suggested fix
Qualify the guarantee as warmed non-debug execution and mention debug diagnostic allocations.

Posted by an AI agent · Nit

The recovered waiter timeout is still named as a leak

Problem
Unlike sibling shutdown_times_out_with_leaked_join_handle, this test catches the timeout, drops the waiter, and completes shutdown. shutdown_times_out_with_leaked_waiter and leaked_waiter therefore describe the previous behavior.

Why this matters
The names obscure that this is recovery coverage rather than permanent dirty-shutdown coverage.

Suggested fix
Rename to shutdown_timeout_then_completes_after_waiter_release and retained_waiter.

Posted by an AI agent · Non-blocking

The shutdown-timeout test accepts an unrelated panic

Problem
The is_err() assertion does not verify that execute_cycle() panicked specifically because the shutdown deadline expired.

Why this matters
Another panic that leaves the executor usable could satisfy the assertion, then allow waiter cleanup and the subsequent Shutdown, masking a timeout-path regression.

Suggested fix
Inspect the panic payload and assert "executor shutdown timed out" before dropping the waiter.

Posted by an AI agent · Non-blocking

Dirty teardown has duplicate new-task coverage

Problem
dirty_drop_reclaims_task_without_result_event duplicates dirty_drop_reclaims_new_task: both use TaskLocation::New, inert = true, and identical assertions.

Why this matters
The distinct name implies additional boundary coverage but exercises no additional behavior.

Suggested fix
Remove the duplicate test or restore a genuinely distinct fixture.

Public API changes

No API Changes

All paired public API captures for arty_executor, plurality, and observed are byte-identical.

Integration tests

Breaking Behavioral Changes

  • Removed four plurality assertions requiring warmed infinity_pool pinned, local-pinned, blind, and local-blind operations to perform zero system allocations. No equivalent coverage replaces them.
  • Added arty_executor coverage verifying warmed spawn-and-complete allocation behavior: three diagnostic allocations per debug operation and zero allocations in release builds.
  • Remaining plurality expectations are preserved.

Human review is required because established allocation contracts were removed. This monitor leaves labels unchanged.

@martintmk martintmk left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent

Changes remain necessary. See the verified rolling review for the complete current results.

Comment thread crates/arty_executor/src/executor_core.rs
Comment thread crates/arty_executor/src/executor_core.rs
Comment thread crates/arty_executor/src/executor_core.rs
@AdomasBekeras

Copy link
Copy Markdown
Contributor

🤖 Agent-authored review

[optional] Update the remaining heterogeneous-comparison documentation

The implementation performance guide still says the reference implementation's multi pools appear in the owning fat-pointer comparison and describes that comparison as the multi pool's cross-crate row. With those benchmarks removed, describe it instead as plurality's typed-versus-heterogeneous comparison with a standard-library allocator baseline.

Evidence: crates/plurality/docs/implementation/performance.md:165-172 retains both claims. The pinned DYN_BOX_OPS in scripts/perf_report.rs now contains only plurality Box, plurality MultiPool, and std::Box, matching the remaining benchmark registrations and generated report.

Impact: The guide incorrectly implies that the remaining benchmarks compare plurality's heterogeneous pooling architecture against another pooling implementation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Agent-authored approval, explicitly confirmed in Review Harness.

Skip task reclamation while already unwinding so panicking task destructors cannot trigger a process-aborting double panic. Add public-boundary allocation tracking that enforces diagnostic-only allocations in debug and zero allocations in release.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 9, 2026 14:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The expanded unit-test module needs the repository-standard coverage exclusion.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread crates/arty_executor/src/executor_core.rs

@martintmk martintmk left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent

Changes remain necessary. See the verified rolling review for the complete current results.

Comment thread crates/arty_executor/src/executor_core.rs Outdated
Comment thread crates/arty_executor/tests/allocations.rs Outdated
Match existing same-crate drop-helper terminology and align the allocation test operation with the spawn-and-complete benchmark.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7563af05-5a5e-4e41-ac9e-8da71ac73baf
Copilot AI balanced review requested due to automatic review settings October 9, 2026 15:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The unsafe raw-pointer task-lifetime migration warrants final human review despite no confirmed defects.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

Co-authored-by: martintmk <103487740+martintmk@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The migration preserves ownership invariants, adds focused lifecycle coverage, and consistently removes the retired dependency.

0 open findings

🧠 Review effort: Balanced

@martintmk martintmk left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent

Changes remain necessary. See the verified rolling review for the complete current results.

// panics or even memory safety violations in the test runner. This may break in the future,
// so be ready to adjust or remove as needed when additional complexity makes it impractical.
#[should_panic]
fn shutdown_times_out_with_leaked_waiter() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent · Nit

The recovered waiter timeout is still named as a leak

Problem
Unlike sibling shutdown_times_out_with_leaked_join_handle, this test catches the timeout, drops the waiter, and completes shutdown. shutdown_times_out_with_leaked_waiter and leaked_waiter therefore describe the previous behavior.

Why this matters
The names obscure that this is recovery coverage rather than permanent dirty-shutdown coverage.

Suggested fix
Rename to shutdown_timeout_then_completes_after_waiter_release and retained_waiter.


// We expect this to panic.
_ = executor.execute_cycle();
assert!(std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| executor.execute_cycle())).is_err());

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent · Non-blocking

The shutdown-timeout test accepts an unrelated panic

Problem
The is_err() assertion does not verify that execute_cycle() panicked specifically because the shutdown deadline expired.

Why this matters
Another panic that leaves the executor usable could satisfy the assertion, then allow waiter cleanup and the subsequent Shutdown, masking a timeout-path regression.

Suggested fix
Inspect the panic payload and assert "executor shutdown timed out" before dropping the waiter.

}

#[test]
fn dirty_drop_reclaims_task_without_result_event() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent · Non-blocking

Dirty teardown has duplicate new-task coverage

Problem
dirty_drop_reclaims_task_without_result_event duplicates dirty_drop_reclaims_new_task: both use TaskLocation::New, inert = true, and identical assertions.

Why this matters
The distinct name implies additional boundary coverage but exercises no additional behavior.

Suggested fix
Remove the duplicate test or restore a genuinely distinct fixture.

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.

9 participants