Skip to content

test(reliability): pin the shed-path future locally for beta clippy (LAB-13773) - #240

Open
27Bslash6 wants to merge 1 commit into
mainfrom
lab-13773-beta-clippy-box-pin
Open

27Bslash6 wants to merge 1 commit into
mainfrom
lab-13773-beta-clippy-box-pin

Conversation

@27Bslash6

Copy link
Copy Markdown
Contributor

The beta toolchain job fails on main and on every open PR: beta clippy's unnecessary_box_pin lint flags one test in crates/cachekit/src/reliability.rs that boxes a future it polls once and drops.

This swaps that Box::pin(..).as_mut() for std::pin::pin!(..). Test-only, one line, no behaviour change. The other Box::pin sites in the module stay: those futures are polled and then awaited, so they need the owned pin.

Verified locally: cargo clippy --all-targets --features "cachekitio,redis,encryption,l1,macros,memcached,file,tracing" -- -D warnings is clean on beta (1.101.0-beta.3) and stable, cargo fmt --all -- --check passes, and the five limiter tests pass.

Closes LAB-13773

Beta clippy's unnecessary_box_pin lint rejects Box::pin for a future
that is polled once and dropped in the same statement. pin! does the
same job without the allocation; the test's assertions are unchanged.
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary by CodeRabbit

  • Tests
    • Updated the queue-capacity boundary test; the assertion and tested behaviour are unchanged.

Walkthrough

The queue-full boundary test now uses std::pin::pin! instead of Box::pin to pin the third limiter-acquire future. The assertion and tested behaviour are unchanged.

Changes

Reliability boundary test

Layer / File(s) Summary
Pin the acquire future
crates/cachekit/src/reliability.rs
The test pins the third limiter-acquire future with std::pin::pin! before polling it.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: kodus-27b

Merge Risk: Minimal · up to dc458

This is a test-only change that avoids a Clippy lint and an unneeded allocation. It has no production impact and is safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a test in crates/cachekit/src/reliability.rs now pins a future with std::pin::pin! instead of Box::pin, to avoid beta clippy's unnecessary_box_pin lint. The title is s…
Description check Passed The description explains the problem (beta clippy unnecessary_box_pin lint on one test in reliability.rs), the fix (Box::pin(..).as_mut() replaced by std::pin::pin!(..)), and the scope (test-only, one…
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.
Full details: Title check

Explanation

The title names the main change: a test in crates/cachekit/src/reliability.rs now pins a future with std::pin::pin! instead of Box::pin, to avoid beta clippy's unnecessary_box_pin lint. The title is specific, concise, and matches the single changed line in the diff and the PR objectives.

Full details: Description check

Explanation

The description explains the problem (beta clippy unnecessary_box_pin lint on one test in reliability.rs), the fix (Box::pin(..).as_mut() replaced by std::pin::pin!(..)), and the scope (test-only, one line, no behaviour change). It also lists local verification steps and notes why the other Box::pin sites remain. It is directly related to the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 07068a6 and dc458da.

Files selected for processing: 1

  • crates/cachekit/src/reliability.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@kodus-27b

kodus-27b Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

@github-actions

Copy link
Copy Markdown

Instruction counts: PASS

122 of 122 cases measured. A case fails when its median is slower than the base by its floor or more (SLOWER). The floor is 0.5%, and such a case also fails when the head's runs spread by more than that (NOISIER), except l2_hit, whose floor is 2% because its count varies between runs. delete cases are reported, never failed. Method: README, Measuring performance.

122 cases within noise
Verdict Case Base Ir/op Head Ir/op Delta Floor Head spread
within noise l1_hit/plain/40 1284 1284 +0.00% 0.50% 0.00%
within noise l1_hit/plain/64 1331 1331 +0.00% 0.50% 0.00%
within noise l1_hit/plain/1024 1860 1860 +0.00% 0.50% 0.00%
within noise l1_hit/plain/65536 95707 95707 +0.00% 0.50% 0.00%
within noise l1_hit/rel/40 1284 1284 +0.00% 0.50% 0.00%
within noise l1_hit/rel/64 1331 1331 +0.00% 0.50% 0.00%
within noise l1_hit/rel/1024 1860 1860 +0.00% 0.50% 0.00%
within noise l1_hit/rel/65536 95729 95729 +0.00% 0.50% 0.00%
within noise l1_hit/enc/40 4689 4689 +0.00% 0.50% 0.00%
within noise l1_hit/enc/64 4803 4803 +0.00% 0.50% 0.00%
within noise l1_hit/enc/1024 8157 8157 +0.00% 0.50% 0.00%
within noise l1_hit/enc/65536 331691 331691 +0.00% 0.50% 0.00%
within noise l1_hit/prev/40 7587 7587 +0.00% 0.50% 0.00%
within noise l1_hit/prev/64 7775 7775 +0.00% 0.50% 0.00%
within noise l1_hit/prev/1024 13989 13989 +0.00% 0.50% 0.00%
within noise l1_hit/prev/65536 632730 632730 +0.00% 0.50% 0.00%
within noise l1_hit/ns/40 1485 1485 +0.00% 0.50% 0.00%
within noise l1_hit/ns/64 1529 1529 +0.00% 0.50% 0.00%
within noise l1_hit/ns/1024 2064 2064 +0.00% 0.50% 0.00%
within noise l1_hit/ns/65536 95905 95905 +0.00% 0.50% 0.00%
within noise l1_hit/nsenc/40 4891 4891 +0.00% 0.50% 0.00%
within noise l1_hit/nsenc/64 5005 5005 +0.00% 0.50% 0.00%
within noise l1_hit/nsenc/1024 8347 8347 +0.00% 0.50% 0.00%
within noise l1_hit/nsenc/65536 331861 331861 +0.00% 0.50% 0.00%
within noise l1_hit_row/plain/40 7777 7777 +0.00% 0.50% 0.00%
within noise l1_hit_row/plain/64 7824 7824 +0.00% 0.50% 0.00%
within noise l1_hit_row/plain/1024 8339 8339 +0.00% 0.50% 0.00%
within noise l1_hit_row/plain/65536 102340 102340 +0.00% 0.50% 0.00%
within noise l1_hit_row/enc/40 11921 11921 +0.00% 0.50% 0.00%
within noise l1_hit_row/enc/64 11830 11830 +0.00% 0.50% 0.00%
within noise l1_hit_row/enc/1024 15024 15024 +0.00% 0.50% 0.00%
within noise l1_hit_row/enc/65536 339149 339149 +0.00% 0.50% 0.00%
within noise l2_hit/plain/40 6376 6373 -0.04% 2.00% 1.02%
within noise l2_hit/plain/64 6359 6372 +0.20% 2.00% 0.96%
within noise l2_hit/plain/1024 7178 7189 +0.15% 2.00% 0.67%
within noise l2_hit/plain/65536 166695 166561 -0.08% 2.00% 0.14%
within noise l2_hit/rel/40 6997 7007 +0.14% 2.00% 0.54%
within noise l2_hit/rel/64 7018 6998 -0.28% 2.00% 0.76%
within noise l2_hit/rel/1024 7802 7811 +0.11% 2.00% 0.42%
within noise l2_hit/rel/65536 167347 167315 -0.02% 2.00% 0.11%
within noise l2_hit/enc/40 9744 9749 +0.06% 2.00% 0.49%
within noise l2_hit/enc/64 9876 9862 -0.14% 2.00% 0.69%
within noise l2_hit/enc/1024 13485 13518 +0.24% 2.00% 0.47%
within noise l2_hit/enc/65536 402834 402821 -0.00% 2.00% 0.05%
within noise l2_hit/prev/40 12666 12646 -0.16% 2.00% 0.63%
within noise l2_hit/prev/64 12827 12843 +0.13% 2.00% 0.32%
within noise l2_hit/prev/1024 19376 19373 -0.01% 2.00% 0.20%
within noise l2_hit/prev/65536 703737 703740 +0.00% 2.00% 0.03%
within noise l2_hit/ns/40 6794 6805 +0.16% 2.00% 0.71%
within noise l2_hit/ns/64 6995 6959 -0.52% 2.00% 0.97%
within noise l2_hit/ns/1024 7592 7585 -0.09% 2.00% 0.33%
within noise l2_hit/ns/65536 167143 167135 -0.00% 2.00% 0.14%
within noise l2_hit/nsenc/40 10421 10438 +0.16% 2.00% 0.26%
within noise l2_hit/nsenc/64 10362 10373 +0.10% 2.00% 0.16%
within noise l2_hit/nsenc/1024 13907 13900 -0.05% 2.00% 0.34%
within noise l2_hit/nsenc/65536 403252 403271 +0.00% 2.00% 0.05%
within noise set/plain/40 4504 4504 +0.00% 0.50% 0.00%
within noise set/plain/64 4514 4514 +0.00% 0.50% 0.00%
within noise set/plain/1024 4665 4665 +0.00% 0.50% 0.00%
within noise set/plain/65536 70099 70099 +0.00% 0.50% 0.00%
within noise set/rel/40 5306 5306 +0.00% 0.50% 0.00%
within noise set/rel/64 5314 5314 +0.00% 0.50% 0.00%
within noise set/rel/1024 5459 5459 +0.00% 0.50% 0.00%
within noise set/rel/65536 70884 70884 +0.00% 0.50% 0.00%
within noise set/enc/40 7658 7658 +0.00% 0.50% 0.00%
within noise set/enc/64 7727 7727 -0.00% 0.50% 0.00%
within noise set/enc/1024 10784 10784 +0.00% 0.50% 0.00%
within noise set/enc/65536 305961 305961 +0.00% 0.50% 0.00%
within noise set/ns/40 4719 4719 +0.00% 0.50% 0.00%
within noise set/ns/64 4735 4735 +0.00% 0.50% 0.00%
within noise set/ns/1024 4885 4885 +0.00% 0.50% 0.00%
within noise set/ns/65536 70301 70301 +0.00% 0.50% 0.00%
within noise set/nsenc/40 7843 7843 +0.00% 0.50% 0.00%
within noise set/nsenc/64 7941 7941 +0.00% 0.50% 0.00%
within noise set/nsenc/1024 11005 11005 +0.00% 0.50% 0.00%
within noise set/nsenc/65536 306123 306123 +0.00% 0.50% 0.00%
within noise delete/plain/40 3761 3766 +0.14% 2.00% 1.16%
within noise delete/plain/64 3757 3765 +0.20% 3.16% 0.80%
within noise delete/plain/1024 3763 3745 -0.50% 5.14% 1.86%
within noise delete/plain/65536 3976 3967 -0.23% 3.32% 0.82%
within noise delete/rel/40 4382 4388 +0.13% 2.16% 1.21%
within noise delete/rel/64 4391 4393 +0.04% 2.01% 0.41%
within noise delete/rel/1024 4421 4396 -0.58% 5.23% 1.84%
within noise delete/rel/65536 4597 4593 -0.09% 2.00% 0.46%
within noise delete/enc/40 3911 3914 +0.06% 4.10% 1.79%
within noise delete/enc/64 3717 3726 +0.25% 5.58% 2.06%
within noise delete/enc/1024 3711 3699 -0.31% 3.67% 0.93%
within noise delete/enc/65536 3969 3956 -0.33% 2.02% 0.61%
within noise delete/parked256/64 3822 3822 +0.01% 2.00% 0.12%
within noise delete/parked1024/64 3828 3828 -0.01% 2.00% 0.03%
within noise exists/plain/40 722 722 +0.00% 0.50% 0.00%
within noise exists/plain/64 722 722 +0.00% 0.50% 0.00%
within noise exists/plain/1024 722 722 +0.00% 0.50% 0.00%
within noise exists/plain/65536 728 728 +0.00% 0.50% 0.00%
within noise exists/rel/40 722 722 +0.00% 0.50% 0.00%
within noise exists/rel/64 722 722 +0.00% 0.50% 0.00%
within noise exists/rel/1024 722 722 +0.00% 0.50% 0.00%
within noise exists/rel/65536 734 734 +0.00% 0.50% 0.00%
within noise exists/enc/40 740 740 +0.00% 0.50% 0.00%
within noise exists/enc/64 740 740 +0.00% 0.50% 0.00%
within noise exists/enc/1024 740 740 +0.00% 0.50% 0.00%
within noise exists/enc/65536 746 746 +0.00% 0.50% 0.00%
within noise oneshot/enc/40 69443 69443 +0.00% 0.50% 0.00%
within noise oneshot/enc/64 69557 69557 +0.00% 0.50% 0.00%
within noise oneshot/enc/1024 73209 73209 -0.00% 0.50% 0.00%
within noise oneshot/enc/65536 462599 462599 +0.00% 0.50% 0.00%
within noise oneshot/prev/40 101760 101760 +0.00% 0.50% 0.00%
within noise oneshot/prev/64 101948 101948 -0.00% 0.50% 0.00%
within noise oneshot/prev/1024 108484 108484 -0.00% 0.50% 0.00%
within noise oneshot/prev/65536 793051 793051 +0.00% 0.50% 0.00%
within noise macro_hit/plain/40 5203 5203 +0.00% 0.50% 0.00%
within noise macro_hit/plain/64 5250 5250 +0.00% 0.50% 0.00%
within noise macro_hit/plain/1024 5779 5779 +0.00% 0.50% 0.00%
within noise macro_hit/plain/65536 99658 99658 +0.00% 0.50% 0.00%
within noise macro_hit/rel/40 5203 5203 +0.00% 0.50% 0.00%
within noise macro_hit/rel/64 5250 5250 +0.00% 0.50% 0.00%
within noise macro_hit/rel/1024 5779 5779 +0.00% 0.50% 0.00%
within noise macro_hit/rel/65536 99610 99610 +0.00% 0.50% 0.00%
within noise macro_hit/enc/40 9224 9224 +0.00% 0.50% 0.00%
within noise macro_hit/enc/64 9338 9338 +0.00% 0.50% 0.00%
within noise macro_hit/enc/1024 12678 12678 +0.00% 0.50% 0.00%
within noise macro_hit/enc/65536 336258 336258 +0.00% 0.50% 0.00%

PR head dc458da784d6738fe16d4dadcc83a98e4784a6c7 merged into its base, measured against 07068a613b8d858a79b9716d704a8129abf114b8 on the same runner. Workflow run

This branch has not been deployed

No deployments
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