Skip to content

test: restore unit tests without default features - #349

Open
Mike-Animal-Counseling wants to merge 1 commit into
fjall-rs:mainfrom
Mike-Animal-Counseling:codex/fix-no-default-feature-tests
Open

Mike-Animal-Counseling wants to merge 1 commit into
fjall-rs:mainfrom
Mike-Animal-Counseling:codex/fix-no-default-feature-tests

Conversation

@Mike-Animal-Counseling

@Mike-Animal-Counseling Mike-Animal-Counseling commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

With lz4 disabled, keyspace_opts_compression_none passes KvSeparationOptions to with_kv_separation, which expects Option<KvSeparationOptions>. As a result, cargo test --no-default-features --lib fails with E0308 before running any tests.

Wrap the options in Some, as the default-feature test already does. Add the no-default-features unit-test command to the existing stable/MSRV and OS test matrix: feature-combination builds do not compile this cfg(test) branch.

Validation on Windows:

  • Before: the command fails at src/keyspace/options.rs:709 with E0308.
  • After: 73 tests pass, 1 existing test ignored, on both Rust 1.98 and 1.90. The same suite also passes with bytes_1 enabled.
  • Default-feature unit tests: 75 pass, 1 ignored; doctests: 86 pass.
  • cargo fmt --all -- --check, cargo clippy, git diff --check pass. Clippy retains existing warnings.

Linux/macOS CI execution has not been verified locally. This changes tests and CI only; runtime behavior, public APIs, dependencies and disk format are unchanged.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected key-value separation setup in compression tests for builds without LZ4 support.
  • Tests

    • Added library test runs with default features disabled, helping verify behavior across feature configurations.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The test workflow now runs library tests without default features. A keyspace options test passes its default separation options through the method’s optional argument.

Changes: Library test coverage

Layer / File(s) Summary
Run library tests without default features
.github/workflows/test.yml, src/keyspace/options.rs
The workflow adds cargo test --no-default-features --lib. The keyspace options test passes Some(KvSeparationOptions::default()) to with_kv_separation.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: marvin-j97

Merge Risk: Minimal · up to d79d0

No merge-blocking correctness, security, or availability risk remains in the reviewed changes.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "test: restore unit tests without default features" matches the main change. The PR wraps the KvSeparationOptions argument in Some(...) so the lz4-disabled cfg(test) branch compiles, and it …
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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 "test: restore unit tests without default features" matches the main change. The PR wraps the KvSeparationOptions argument in Some(...) so the lz4-disabled cfg(test) branch compiles, and it adds a CI step running cargo test --no-default-features --lib so these unit tests run in the test matrix. The title is specific and short, and it describes the primary intent stated in the PR objectives. It does not name the Some(...) fix or the CI change, but the changeset does not need every detail covered.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

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

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5663dd8e-698c-4a2b-baf6-bdecbc2daa6e
Commits

Reviewing files that changed from the base of the PR and between 8700604 and d79d05f.

Files selected for processing: 2

  • .github/workflows/test.yml
  • src/keyspace/options.rs

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

@codecov

codecov Bot commented Nov 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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