Skip to content

chore(atlas-core): clear the pre-existing clippy warnings recorded in #13056 - #13097

Open
dezren39 wants to merge 1 commit into
mainfrom
xaltha/13056-atlas-clippy
Open

dezren39 wants to merge 1 commit into
mainfrom
xaltha/13056-atlas-clippy

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes #13056

Clears every warning the #12919 verdict run recorded for atlas-core (plus a few of the same classes that drifted in since: sort_by_key in c8_fingerprint.rs, a complex tuple type in eval.rs tests, a lone-clone slice in trace_ingest.rs tests).

Before → after (cargo clippy -p atlas-core --all-targets, local rustup 1.99.0 toolchain, fresh target dir):

  • Before: 37 distinct warning sites — lib 23, 2 more in lib test modules, 12 across the integration tests (citation_conformance 2, diagnostic_fixture 5, placement_model 2, boundary_wiring 1, permission_model 1, row_detection 1).
  • After: 0 warnings, exit 0. cargo fmt -p atlas-core -- --check clean.

Mechanical fixes (via cargo clippy --fix, then reviewed per file): 16 collapsible ifs → let-chains, % checks → is_multiple_of, chunks_exact(4) → as_chunks::<4>(), sort_by → sort_by_key, useless into_iter removed, single-pattern match → if let (search.rs), map_or → is_none_or, redundant closure removed, elidable lifetimes dropped, &[line.clone()] → slice::from_ref(&line), clone-on-reference removed, let-binding return inlined.

Hand fixes (the ones the issue flagged as needing a human look):

  • github_comments.rs: CommentKind::from_str → renamed to parse, the crate's existing convention for exactly this shape (GateStage::parse, BatchState::parse, SearchMode::parse all return Option<Self>); its one caller updated.
  • shingles.rs: rescore_fused now takes &mut [FusedEntry] instead of &mut Vec<FusedEntry>; the body only ever used slice operations and callers coerce unchanged.
  • trace_stats.rs: hot_trace_files returns Vec<HotTraceFile> (new documented alias for (PathBuf, (i64, u32, u32))).
  • eval.rs tests: the 5-tuple case annotation is now the DupKeyCase alias.
  • diagnostic_fixture.rs tests: Stage::StageError → Stage::Error (enum_variant_names); the deterministic-replay golden transcript spells the variant via {:?} and was updated to match. RNG seed literal regrouped 0x8525_6020_F01 → 0x0852_5602_0F01 (identical value).

No #[allow] added anywhere; no behaviour changes.

Tests: cargo test -p atlas-core — 361 passed, 0 failed (lib 166, all integration binaries), run locally on the same toolchain. Clippy was verified locally with a real clippy-driver (rustup 1.99.0), not CI-only; the crate pins 1.99.1 for nix builds, and CI remains the nix-side check.


Run Proof on this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…13056

Mechanical pass (cargo clippy --fix, reviewed per file): collapsible
ifs as let-chains, is_multiple_of, chunks_exact -> as_chunks,
sort_by_key, if-let for the single-pattern match in search.rs,
useless into_iter, redundant closure, map_or -> is_none_or,
elidable lifetimes, slice::from_ref over a lone clone.

Hand fixes for the non-auto-fixable ones:
- github_comments: CommentKind::from_str renamed to parse, matching
  the crate's existing parse convention (gate.rs, search.rs); the
  one caller updated.
- shingles: rescore_fused takes &mut [FusedEntry] instead of
  &mut Vec<FusedEntry>; callers coerce unchanged.
- trace_stats: hot_trace_files returns Vec<HotTraceFile> (new alias).
- eval tests: the generated duplicate-key case tuple is now the
  DupKeyCase alias.
- diagnostic_fixture tests: Stage::StageError renamed to
  Stage::Error (golden transcript updated to match), and the RNG
  seed literal regrouped to 0x0852_5602_0F01 (same value).

No #[allow] added anywhere. Before: 37 distinct warning sites
(25 in src, 12 in the integration tests). After: cargo clippy
-p atlas-core --all-targets reports zero warnings; cargo test
-p atlas-core 361 passed, 0 failed; cargo fmt clean.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 52 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bc5f0167-d275-425c-9330-f929c5b82975
Commits

Reviewing files that changed from the base of the PR and between f69abc3 and af7f7ef.

Files selected for processing: 21

  • pkgs/atlas-search/crates/atlas-core/src/aggregate.rs
  • pkgs/atlas-search/crates/atlas-core/src/c8_fingerprint.rs
  • pkgs/atlas-search/crates/atlas-core/src/embed_cache.rs
  • pkgs/atlas-search/crates/atlas-core/src/eval.rs
  • pkgs/atlas-search/crates/atlas-core/src/github_comments.rs
  • pkgs/atlas-search/crates/atlas-core/src/join.rs
  • pkgs/atlas-search/crates/atlas-core/src/local.rs
  • pkgs/atlas-search/crates/atlas-core/src/search.rs
  • pkgs/atlas-search/crates/atlas-core/src/shards/local.rs
  • pkgs/atlas-search/crates/atlas-core/src/shingles.rs
  • pkgs/atlas-search/crates/atlas-core/src/stage.rs
  • pkgs/atlas-search/crates/atlas-core/src/sweep.rs
  • pkgs/atlas-search/crates/atlas-core/src/trace.rs
  • pkgs/atlas-search/crates/atlas-core/src/trace_ingest.rs
  • pkgs/atlas-search/crates/atlas-core/src/trace_stats.rs
  • pkgs/atlas-search/crates/atlas-core/tests/boundary_wiring.rs
  • pkgs/atlas-search/crates/atlas-core/tests/citation_conformance.rs
  • pkgs/atlas-search/crates/atlas-core/tests/diagnostic_fixture.rs
  • pkgs/atlas-search/crates/atlas-core/tests/permission_model.rs
  • pkgs/atlas-search/crates/atlas-core/tests/placement_model.rs
  • pkgs/atlas-search/crates/atlas-core/tests/row_detection.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T08:09:14.330911Z af7f7ef PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

atlas-core: pre-existing clippy warnings outside c8_profile (verdict run for #12919)

1 participant