Create rstest helper fixture lint crate (8.2.1)#231
Conversation
Add the pre-implementation ExecPlan for roadmap item 8.2.1. The plan captures the scope, experimental wiring decision, validation steps, review requirements, and approval gate for creating the `rstest_helper_should_be_fixture` lint crate.
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughIntroduce an experimental Dylint lint crate ChangesExperimental rstest_helper_should_be_fixture lint crate bootstrap
Sequence Diagram(s)sequenceDiagram
participant Installer as whitaker-installer
participant Resolution as installer/src/resolution.rs
participant SuiteCargo as suite/Cargo.toml
participant SuiteDriver as suite/src/driver.rs
participant RstestCrate as crates/rstest_helper_should_be_fixture
Installer->>Resolution: validate_crate_names(names, options)
Resolution->>Resolution: check EXPERIMENTAL_LINT_CRATES / is_experimental_crate
Resolution-->>Installer: validation result (error if no --experimental)
Installer->>SuiteCargo: enable feature experimental-rstest-helper-should-be-fixture
SuiteCargo->>SuiteDriver: include optional rstest_helper_should_be_fixture dep
SuiteDriver->>RstestCrate: activate dylint-driver feature
RstestCrate->>RstestCrate: load Config and normalized() -> detection options
SuiteDriver->>SuiteDriver: include RstestHelperShouldBeFixture in suite pass
Possibly related PRs
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (2 errors)
✅ Passed checks (18 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Update the ExecPlan progress section after opening the draft pull request. This keeps the living plan aligned with the branch state without changing the implementation scope.
Create the experimental `rstest_helper_should_be_fixture` Dylint crate and wire it into the installer and suite behind the experimental feature. Add configuration defaults and unit coverage for the bootstrap policy, update registration behaviour coverage, and document the experimental user-facing behaviour for roadmap item 8.2.1.
Update the ExecPlan status after pushing the implementation and refreshing the draft PR for roadmap item 8.2.1.
Update the ExecPlan with the final post-push CodeRabbit confirmation attempt, which remained blocked by a recoverable service rate limit.
Validate explicit `--lint` requests with the experimental option context so experimental crates cannot bypass the documented `--experimental` gate. Add core and CLI behaviour coverage for accepted opt-in requests and rejected non-opt-in requests, and document the user-facing installer contract.
Fix the still-valid inline review comments for the experimental rstest helper lint bootstrap. Add module documentation for the disabled-driver stub, derive the suite experimental feature expectation from `EXPERIMENTAL_LINT_CRATES`, and fill in the users-guide and design-document documentation gaps. Record the verification outcome in the ExecPlan, including the stale historical test-count comment that was intentionally left unchanged.
|
@coderabbitai Please suggest a fix for this issue and supply a prompt for an AI coding agent to enable it to apply the fix. Include the file and symbol names indicated in the issue at the head of your response. Large Methodinstaller/src/error.rs: Clone.clone What lead to degradation?Clone.clone increases from 85 to 88 lines of code, threshold = 70 Why does this problem occur?Overly long functions make the code harder to read. The recommended maximum function length for the Rust language is 70 lines of code. Severity: Brain Method - Complex Method - Long Method. How to fix it?We recommend to be careful here -- just splitting long functions don't necessarily make the code easier to read. Instead, look for natural chunks inside the functions that expresses a specific task or concern. Often, such concerns are indicated by a Code Comment followed by an if-statement. Use the EXTRACT FUNCTION refactoring to encapsulate that concern. |
Update the ExecPlan validation summary so the plan milestone uses the same 1428 passed test count as the surrounding recorded validation notes.
Reviewer's GuideIntroduces the experimental Sequence diagram for experimental rstest_helper_should_be_fixture lint opt-in and wiringsequenceDiagram
actor User
participant InstallerCLI as installer_main
participant Resolver as resolve_requested_crates
participant Validator as validate_crate_names
participant CrateResolver as resolve_crates
participant Builder as features_for_crate
participant Suite as whitaker_suite
User->>InstallerCLI: run whitaker-installer --lint rstest_helper_should_be_fixture [--experimental]
InstallerCLI->>Resolver: resolve_requested_crates(args)
Resolver->>Validator: validate_crate_names(lint_crates, options)
alt experimental flag missing
Validator-->>Resolver: Err(ExperimentalLintRequiresFlag)
Resolver-->>InstallerCLI: Err(InstallerError)
InstallerCLI-->>User: fail: experimental lint requires --experimental
else experimental flag present
Validator-->>Resolver: Ok
Resolver->>CrateResolver: resolve_crates(lint_crates, options)
CrateResolver-->>Resolver: ["rstest_helper_should_be_fixture"]
Resolver-->>InstallerCLI: Ok(crates)
InstallerCLI->>Builder: features_for_crate("whitaker_suite") with experimental = true
Builder-->>InstallerCLI: "dylint-driver,experimental-rstest-helper-should-be-fixture"
InstallerCLI->>Suite: build whitaker_suite with feature experimental-rstest-helper-should-be-fixture
Suite-->>User: suite cdylib including RSTEST_HELPER_SHOULD_BE_FIXTURE
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This comment was marked as resolved.
This comment was marked as resolved.
Add CLI behaviour coverage for explicitly requesting the experimental rstest helper lint with `--experimental` enabled. The suite macro redefinition comment was already addressed by complementary cfg gates, so record that verification in the ExecPlan without changing the suite driver.
Extract toolchain-specific clone handling and shared I/O error cloning from `InstallerError::clone` so the implementation satisfies the local method length threshold without changing clone behaviour.
Add focused tests around `rstest_helper_should_be_fixture` configuration loading, pass initialisation, and normalisation idempotence. Clarify the README lint count and experimental opt-in signpost so the public summary matches the current lint set.
|
@coderabbitai Have the following now been resolved? Annul any requirements that violate the en-GB-oxendict spelling (-ize / -yse / -our) conventions (for example a request to replace "normalize" with "normalise" or "artefact" with "artifact"), or where the requirement unnecessarily increases cyclomatic complexity. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 27599
Comment 1 — Comment 2 — Successful-path experimental lint CLI scenario
|
Keep a single `define_suite_pass!` macro and pass the experimental rstest helper lint entry only from the feature-gated call site. This avoids duplicate macro definitions while preserving the existing feature-gated suite contents.
Move the rstest helper proptest dependency to the workspace table, tidy the README project status wording, and fix the rstest helper documentation order and grammar noted in review.
|
@coderabbitai Have the following now been resolved? Annul any requirements that violate the en-GB-oxendict spelling (-ize / -yse / -our) conventions (for example a request to replace "normalize" with "normalise" or "artefact" with "artifact"), or where the requirement unnecessarily increases cyclomatic complexity. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 26466
Comment 1 — Comment 2 — Successful-path experimental lint CLI scenario
|
Return a `Result` from the rstest helper lint configuration boundary so parse failures are visible before the driver falls back to defaults. Document the driver unit-test module now that it covers configuration loading and `rstest` detection option construction.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Route `SharedConfig::load` through a private helper so the Dylint driver has an explicit boundary for shared configuration loading. Document that the current shared loader is treated as infallible at this call site until a follow-up makes I/O failures visible.
|
@coderabbitai Have the following now been resolved? crates/rstest_helper_should_be_fixture/Cargo.toml (1)
🤖 Detailed instructionsVerify each finding against current code. Fix only still-valid issues, skip the In |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 1327
|
This comment was marked as resolved.
This comment was marked as resolved.
Replace the placeholder follow-up reference in the shared configuration boundary notes with the tracked GitHub issue.
Summary
This branch implements roadmap task (8.2.1) by adding the experimental
rstest_helper_should_be_fixtureDylint crate and registeringRSTEST_HELPER_SHOULD_BE_FIXTUREwithout yet implementing call-site diagnostics.ExecPlan: docs/execplans/8-2-1-create-the-rstest-helper-lint-crate.md
What changed
crates/rstest_helper_should_be_fixturewith configuration defaults and unit coverage for TOML loading, normalization, provider attributes, and detection options.experimental-rstest-helper-should-be-fixture.--experimentalfor explicit experimental lint builds such as--lint rstest_helper_should_be_fixture.Validation
cargo check -p rstest_helper_should_be_fixture --all-targets --all-features: passedcargo check -p whitaker_suite --all-targets --all-features: passedcargo nextest run -p rstest_helper_should_be_fixture --all-targets --all-features: passed, 9 testscargo nextest run -p whitaker_suite -p whitaker-installer --all-targets --all-features: passed, 527 testscargo nextest run -p whitaker-installer --all-targets --all-features -E 'binary(behaviour_core)': passed, 12 testscargo nextest run -p whitaker-installer --all-targets --all-features --profile ci -E 'test(scenario_dry_run_rejects_experimental_lint_without_opt_in)': passed, 1 testcargo nextest run -p rstest_helper_should_be_fixture -p whitaker-installer --all-targets --all-features builder::tests::features_for_crate_handles_suite_experimental_mode: passed, 1 testmake check-fmt: passedmake markdownlint: passed with 0 errorsmake lint: passedmake test: passed, 1431 tests passed and 2 skipped under the default nextest profileReview notes
CodeRabbit was run after the crate/bootstrap milestone and again before final validation. Reported concerns were fixed: threshold normalization now preserves repeated-call semantics by clamping to at least 2, provider defaults no longer allocate a whole default config for fallback, and the private
Configboundary is documented. CodeRabbit also reviewed the explicit experimental lint opt-in fix and the inline-review follow-up; both completed with 0 findings.Inline comments were verified with Wyvern and Scribe agents before changes were made. The historical ExecPlan
1418count was left unchanged because it records the earlier plan milestone; later implementation validation in the same document records the authoritative1428and final1431counts.References
Summary by Sourcery
Add an experimental
rstest_helper_should_be_fixturelint crate, wire it into the suite and installer as a feature-gated experimental lint, and document its configuration and opt-in behaviour.New Features:
rstest_helper_should_be_fixtureDylint crate with configuration defaults and bootstrap driver for future rstest helper-to-fixture recommendations.Bug Fixes:
--lint) are rejected unless--experimentalis provided, matching documented opt-in requirements.Enhancements:
--experimental.Documentation:
rstest_helper_should_be_fixturelint, its purpose, configuration options, and experimental status in the user and design guides.Tests:
--experimentalflag.