Skip to content

Remove unjustified dead-code expectation (#322) - #323

Merged
leynos merged 2 commits into
mainfrom
issue-322-remove-unjustified-dead-code-expectation-from-no-std-fs-operations-stub
Aug 22, 2026
Merged

Remove unjustified dead-code expectation (#322)#323
leynos merged 2 commits into
mainfrom
issue-322-remove-unjustified-dead-code-expectation-from-no-std-fs-operations-stub

Conversation

@lodyai

@lodyai lodyai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This branch removes the private, unused non-driver stub from the
no_std_fs_operations lint crate. The crate remains a valid empty library when
the dylint-driver feature is disabled, so retaining a dead-code expectation
would hide an implementation artefact rather than preserve a compatibility
surface.

Closes #322.

Review walkthrough

Validation

  • cargo check -p no_std_fs_operations --no-default-features: passed.
  • make check-fmt: passed.
  • make lint: passed.
  • make test: passed, with 1,624 tests passed and 5 skipped.

References

Summary by Sourcery

Remove the unjustified dead-code workaround and guard the feature-disabled library build with a regression test.

Enhancements:

  • Remove the unused no-driver stub from the no_std_fs_operations library while preserving its feature-disabled build behavior.

Tests:

  • Add a regression test that verifies the library builds without the dylint-driver feature and emits no compiler diagnostics with warnings denied.

@sourcery-ai

sourcery-ai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes an unused, feature-disabled stub module from the no_std_fs_operations lint crate while leaving the public API and feature-gated driver exports unchanged.

File-Level Changes

Change Details Files
Remove the private stub module that only existed when the dylint-driver feature was disabled, along with its dead-code expectation.
  • Delete the non-driver stub module compiled under cfg(not(feature = "dylint-driver"))
  • Remove the placeholder function that was only present in non-driver builds
  • Eliminate the #[expect(dead_code)] attribute and associated rationale tied to the stub
crates/no_std_fs_operations/src/lib.rs

Assessment against linked issues

Issue Objective Addressed Explanation
#322 Remove the unused non-driver stub function no_std_fs_operations_disabled_stub and its #[expect(dead_code)] annotation from crates/no_std_fs_operations/src/lib.rs.
#322 Maintain a valid feature-gated non-driver configuration for the no_std_fs_operations crate (it should still build successfully without the dylint-driver feature).
#322 Ensure validation/verification for the non-driver configuration is in place in line with the project’s existing test structure.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 792cfd2e-1f52-41ce-b150-1d734f543cd7

📥 Commits

Reviewing files that changed from the base of the PR and between d005d65 and 6f00006.

📒 Files selected for processing (1)
  • crates/no_std_fs_operations/src/lib.rs
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • leynos/rstest-bdd (auto-detected)
💤 Files with no reviewable changes (1)
  • crates/no_std_fs_operations/src/lib.rs

Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Summary

  • Remove the unused non-driver stub and its unjustified #[expect(dead_code)] annotation.
  • Preserve the feature-gated driver modules and valid empty-library configuration when dylint-driver is disabled.
  • Pass formatting, linting, tests, and the no-default-features check.
  • Validate 1,624 tests passed and 5 tests skipped.

Walkthrough

Remove the unused non-dylint-driver stub module and its disabled-operation function from no_std_fs_operations.

Changes

Cohort / File(s) Summary
Filesystem stub cleanup
crates/no_std_fs_operations/src/lib.rs
Remove the unused stub function and its #[expect(dead_code)] annotation. Preserve the required feature-gated structure.

Poem

A silent stub now fades away,
No dead-code mask remains today.
The feature gates still hold their course,
With fewer lines and cleaner force.


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 warning, 2 inconclusive)

Check name Status Explanation Resolution
Testing (Compile-Time / Ui) ⚠️ Warning Add compile-time coverage: the diff changes the feature-disabled Rust build, but the crate has no trybuild test and its existing UI tests run only with dylint-driver. Add a focused trybuild or equivalent test that builds no_std_fs_operations with --no-default-features and verifies the empty library configuration.
User-Facing Documentation ❓ Inconclusive Investigation has not yet established whether the pull request changes user-facing behaviour or whether the required diff is available. Inspect the pull request diff and the affected crate's user-facing documentation before deciding.
Module-Level Documentation ❓ Inconclusive Evidence gathering is in progress; no final assessment has been made. Inspect the pull-request diff and all remaining module declarations before deciding whether the documentation rule is met.
✅ Passed checks (17 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes remove the unused stub and suppression while preserving valid non-driver builds, satisfying issue #322.
Out of Scope Changes check ✅ Passed The changes are limited to removing the unused non-driver stub and its dead-code suppression, which matches issue #322.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Testing (Overall) ✅ Passed Accept this check: the PR deletes only an unreferenced private stub; it adds no functionality or behavioural change, and existing driver-gated tests remain unchanged.
Developer Documentation ✅ Passed Pass this check: HEAD^..HEAD removes only the unreferenced private stub; feature cfgs, Cargo features, docs, roadmap and execplans are unchanged.
Testing (Unit And Behavioural) ✅ Passed Accept the change: the diff only removes an unreferenced private stub, so it adds no local behaviour or external workflow that requires unit, behavioural, or end-to-end tests.
Testing (Property / Proof) ✅ Passed Mark this check as passed: the diff only removes an unused stub; it introduces no input, state, ordering, transition invariant, lemma, or proof assumption requiring property tests or exhaustive proof.
Unit Architecture ✅ Passed Keep this change: the diff only removes an unreachable private stub and its dead-code expectation; feature-gated modules and public exports remain unchanged.
Domain Architecture ✅ Passed Accept the change: HEAD only deletes a private non-driver stub; feature-gated lint modules and exports remain unchanged, so no domain or adapter-boundary concern is introduced.
Observability ✅ Passed Accept this change: the diff only removes a private disabled-feature stub; feature wiring and driver exports remain unchanged, so no operational behaviour or observability requirement is introduced.
Security And Privacy ✅ Passed The diff only removes a private feature-disabled stub and its dead-code expectation; it adds no secrets, inputs, permissions, trust-boundary logic, or sensitive-data exposure.
Performance And Resource Use ✅ Passed The pull request only removes a private unused stub; it adds no loops, I/O, allocations, collections, retries, or blocking work.
Concurrency And State ✅ Passed The diff only removes a private non-driver stub; it introduces no shared state, async work, locks, ordering logic, task lifetime, or concurrency behaviour.
Architectural Complexity And Maintainability ✅ Passed Pass this check: the diff removes only the private stub and its dead-code expectation; it adds no abstraction, dependency, layer, or architectural indirection.
Rust Compiler Lint Integrity ✅ Passed The only diff removes the private stub and its #[expect(dead_code)]; remaining modules are feature-gated, with no new broad suppressions or clone changes.
Title check ✅ Passed The title accurately describes removal of the unjustified dead-code expectation and references issue #322 from the pull request description.
Description check ✅ Passed The description directly explains the removed stub, preserved feature-disabled build, validation results, and linked issue.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-322-remove-unjustified-dead-code-expectation-from-no-std-fs-operations-stub

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

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

Remove the private non-driver stub and its dead-code expectation. An empty
library remains valid when the `dylint-driver` feature is disabled, so the
stub provides no compatibility surface.
@leynos
leynos force-pushed the issue-322-remove-unjustified-dead-code-expectation-from-no-std-fs-operations-stub branch from 0d6c882 to 6f00006 Compare August 19, 2026 23:41
@leynos
leynos marked this pull request as ready for review August 19, 2026 23:41
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

codescene-access[bot]

This comment was marked as outdated.

codescene-access[bot]

This comment was marked as outdated.

The no_std_fs_operations crate builds as an empty library when the
dylint-driver feature is disabled, but that configuration is never
exercised by the existing suite: the UI tests run only under
dylint-driver and the workspace test invocation uses --all-features.
The removed stub was the only guard that the feature-disabled build
stayed warning-free.

Add an integration test that runs a nested cargo check with
--no-default-features --lib against an isolated target directory,
asserting the build succeeds with warnings denied and emits no
compiler diagnostics. This locks in the empty-library configuration
so the dead-code-expectation removal cannot regress unverified.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Your free Security trial is over. An organization admin can activate billing to continue.

codescene-access[bot]

This comment was marked as outdated.

@codescene-access codescene-access 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.

No quality gates enabled for this code.

@leynos

leynos commented Aug 22, 2026

Copy link
Copy Markdown
Owner

@coderabbitai Have the following failed checks now been resolved?

If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures.

Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. (Treat o11y, code safety, documentation and validation coverage as in scope).

❌ Failed check (1 warning)

Check name Status Explanation Resolution
Testing (Compile-Time / Ui) ⚠️ Warning Add compile-time coverage: the diff changes the feature-disabled Rust build, but the crate has no trybuild test and its existing UI tests run only with dylint-driver. Add a focused trybuild or equivalent test that builds no_std_fs_operations with --no-default-features and verifies the empty library configuration.

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- PR metadata and changed files ---'
gh pr view 323 --repo leynos/whitaker --json headRefName,baseRefName,statusCheckRollup,files \
  --jq '{headRefName, baseRefName, files: [.files[].path], checks: [.statusCheckRollup[] | {name, conclusion, status}]}'

echo
echo '--- Changed-file patch ---'
gh pr diff 323 --repo leynos/whitaker --patch

echo
echo '--- Relevant manifests, CI, and test configuration ---'
fd -a '^(Cargo\.toml|.*\.ya?ml|.*\.yml|.*\.rs)$' . \
  | rg '(no_std_fs_operations|github/workflows|Cargo\.toml$)' \
  | sort

echo
echo '--- no_std_fs_operations references and no-default-features commands ---'
rg -n -i -C 3 \
  '(no_std_fs_operations|no-default-features|trybuild|dylint-driver)' \
  -g 'Cargo.toml' -g '*.rs' -g '*.yml' -g '*.yaml' -g 'Justfile' -g 'Makefile' . || true

Length of output: 132227


@leynos Mark this warning as resolved.

PR #323 now adds focused feature-disabled compile-time coverage in crates/no_std_fs_operations/tests/no_default_features_build.rs.

The new test runs:

cargo check --package no_std_fs_operations --no-default-features --lib --message-format=json

The test uses an isolated target directory. It fails if the command fails. It also fails if Cargo reports compiler diagnostics. This validates the empty-library configuration after removal of the non-driver stub.

The PR checks are successful, including linux-full and windows-compat.

Do not create a follow-up issue. Do not perform further work for this warning.

You are interacting with an AI system.

@leynos
leynos merged commit de8d94f into main Aug 22, 2026
9 checks passed
@leynos
leynos deleted the issue-322-remove-unjustified-dead-code-expectation-from-no-std-fs-operations-stub branch August 22, 2026 03:12
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.

Remove unjustified dead-code expectation from no_std_fs_operations stub

1 participant