Skip to content

Allow no_expect_outside_tests pending whitaker#311 - #156

Open
leynos wants to merge 1 commit into
mainfrom
allow-no-expect-outside-tests
Open

Allow no_expect_outside_tests pending whitaker#311#156
leynos wants to merge 1 commit into
mainfrom
allow-no-expect-outside-tests

Conversation

@leynos

@leynos leynos commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Temporarily allows the no_expect_outside_tests Whitaker lint in the lint
gate, pending leynos/whitaker#311.

Rolling suite build 4e8a8ab (from leynos/whitaker commit 4e8a8ab6,
PR leynos/whitaker#238) regressed the #[cfg(test)] companion-module
exemption: expect() calls inside helper and fixture functions under
src/**/tests/ are now flagged as "outside test-only code" even though the
enclosing module is declared #[cfg(test)]. Suite build 2bc0c3f (v0.2.7)
linted the same code clean, and the rolling release no longer serves older
artefacts, so every CI run fails the lint gate with 22 false positives
(see run 30115224258).

Review walkthrough

One-line change to the lint target in the Makefile, appending
-A no_expect_outside_tests to RUSTFLAGS for the Whitaker invocation
only. Clippy and the rest of the suite keep denying warnings. A TODO
records the revert condition (leynos/whitaker#311).

Validation

CI on this pull request exercises the lint gate with the allowance in
place.

Whitaker rolling suite build 4e8a8ab (from leynos/whitaker commit
4e8a8ab6, PR #238) regressed the #[cfg(test)] companion-module
exemption in no_expect_outside_tests: expect() calls inside helper
and fixture functions under src/**/tests/ are now flagged as
"outside test-only code" even though the enclosing module is
declared #[cfg(test)]. The previous suite build (2bc0c3f, v0.2.7)
linted the same code clean, and the rolling release no longer
serves older artefacts, so every CI run now fails the lint gate
with 22 false positives.

Allow the single affected lint in the Whitaker invocation until
leynos/whitaker#311 is fixed, keeping the rest of the suite and
Clippy denying warnings as before. A TODO beside the flag records
the revert condition.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @leynos, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@leynos
leynos enabled auto-merge (squash) July 24, 2026 18:13
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 7 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: edf48c32-4a75-4554-bb23-a256b5f45f50

📥 Commits

Reviewing files that changed from the base of the PR and between 97c434f and e85e5a3.

📒 Files selected for processing (1)
  • Makefile
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch allow-no-expect-outside-tests

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e85e5a3d31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Makefile
# rolling suite build 4e8a8ab regressed the #[cfg(test)] companion-module
# exemption and flags expect() calls in test-only helper functions under
# src/**/tests/.
RUSTFLAGS="$(RUST_FLAGS) -A no_expect_outside_tests" $(WHITAKER) --all -- $(CARGO_FLAGS)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the expect lint enabled outside tests

This command-line allowance applies to every target Whitaker checks, not only the #[cfg(test)] companion modules producing false positives. Consequently, newly introduced expect() calls in production code or shared fixtures can pass this part of the lint gate as well. Keep the lint strict by pinning the last working Whitaker suite or narrowly exempting only the affected test modules rather than disabling the lint for the whole invocation.

AGENTS.md reference: AGENTS.md:L273-L275

Useful? React with 👍 / 👎.

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