fix: tests authentication, clippy warnings, fmt, and update readme #1

Closed
Jairodaniel-17 wants to merge 4 commits from fix/tests-clippy-fmt-readme-6974431928732619030 into main
Jairodaniel-17 commented 2026-02-15 17:24:45 +00:00 (Migrated from github.com)

This PR addresses several maintenance tasks for Luma:

  1. Fix Failing Tests:

    • Modified integration tests (tests/auth_ttl_sse_gap.rs, tests/http_state_vector.rs, tests/sqlite_api.rs, tests/sse.rs) to properly authenticate requests by appending ?api_key=test. Previously, these tests were failing with 401 Unauthorized (causing assertion failures on resp.status().is_success()).
    • Removed unused PathBuf imports in test files.
  2. Fix Clippy Warnings:

    • Resolved redundant_field_names in src/api/routes_vector.rs.
    • Added #[allow(dead_code)] to the unused search field in MetaEngine (src/engine/meta.rs), as it is intended for future use.
    • Optimized loops (while let -> for) and matches (match -> matches!) in src/config.rs and src/search/engine.rs.
    • Replaced manual string slicing with strip_prefix in src/search/engine.rs.
    • Implemented canonical Ord and PartialOrd for structs containing floats (ScoredDoc, ScoredOffset, VisitState) to satisfy clippy::non_canonical_partial_ord_impl.
    • Used or_default() instead of or_insert_with(BinaryHeap::new) in src/search/grouping.rs.
    • Fixed needless borrows in src/sqlite/mod.rs.
    • Refactored load_collection in src/vector/persist.rs to return a CollectionData struct instead of a complex tuple, resolving clippy::type_complexity. Updated call sites in src/vector/mod.rs.
    • Simplified let...else to ? operator in src/vector/mod.rs.
  3. Code Formatting:

    • Ran cargo fmt to enforce standard Rust formatting.
  4. Update Documentation:

    • Rewrote README.md (in Spanish) to accurately reflect the current "Convergent Data Engine" architecture, detailing the Vector Engine, Full-Text Search, KV Store, Event Bus, and SQLite integration. Added instructions for running the server and tests.

Verification:

  • cargo test passes (all tests).
  • cargo clippy is clean.
  • cargo fmt --check passes.

PR created automatically by Jules for task 6974431928732619030 started by @Jairodaniel-17

This PR addresses several maintenance tasks for Luma: 1. **Fix Failing Tests:** * Modified integration tests (`tests/auth_ttl_sse_gap.rs`, `tests/http_state_vector.rs`, `tests/sqlite_api.rs`, `tests/sse.rs`) to properly authenticate requests by appending `?api_key=test`. Previously, these tests were failing with 401 Unauthorized (causing assertion failures on `resp.status().is_success()`). * Removed unused `PathBuf` imports in test files. 2. **Fix Clippy Warnings:** * Resolved `redundant_field_names` in `src/api/routes_vector.rs`. * Added `#[allow(dead_code)]` to the unused `search` field in `MetaEngine` (`src/engine/meta.rs`), as it is intended for future use. * Optimized loops (`while let` -> `for`) and matches (`match` -> `matches!`) in `src/config.rs` and `src/search/engine.rs`. * Replaced manual string slicing with `strip_prefix` in `src/search/engine.rs`. * Implemented canonical `Ord` and `PartialOrd` for structs containing floats (`ScoredDoc`, `ScoredOffset`, `VisitState`) to satisfy `clippy::non_canonical_partial_ord_impl`. * Used `or_default()` instead of `or_insert_with(BinaryHeap::new)` in `src/search/grouping.rs`. * Fixed needless borrows in `src/sqlite/mod.rs`. * Refactored `load_collection` in `src/vector/persist.rs` to return a `CollectionData` struct instead of a complex tuple, resolving `clippy::type_complexity`. Updated call sites in `src/vector/mod.rs`. * Simplified `let...else` to `?` operator in `src/vector/mod.rs`. 3. **Code Formatting:** * Ran `cargo fmt` to enforce standard Rust formatting. 4. **Update Documentation:** * Rewrote `README.md` (in Spanish) to accurately reflect the current "Convergent Data Engine" architecture, detailing the Vector Engine, Full-Text Search, KV Store, Event Bus, and SQLite integration. Added instructions for running the server and tests. **Verification:** * `cargo test` passes (all tests). * `cargo clippy` is clean. * `cargo fmt --check` passes. --- *PR created automatically by Jules for task [6974431928732619030](https://jules.google.com/task/6974431928732619030) started by @Jairodaniel-17*
google-labs-jules[bot] commented 2026-02-15 17:24:46 +00:00 (Migrated from github.com)

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to **Reactive Mode**. When this mode is on, I will only act on comments where you specifically mention me with `@jules`. You can find this option in the **Pull Request** section of your [global Jules UI settings](https://jules.google.com/settings). You can always switch back! New to Jules? Learn more at [jules.google/docs](https://jules.google/docs). --- *_For security, I will only act on instructions from the user who triggered this task._*

Pull request closed

Sign in to join this conversation.
No description provided.