Skip to content

fix(clippy): chunks_exact_to_as_chunks + result_large_err from a newer stable clippy - #574

Merged
getappz merged 1 commit into
masterfrom
task/521-fix-clippy-chunks-exact-to-as-chunks-res
Aug 21, 2026
Merged

fix(clippy): chunks_exact_to_as_chunks + result_large_err from a newer stable clippy#574
getappz merged 1 commit into
masterfrom
task/521-fix-clippy-chunks-exact-to-as-chunks-res

Conversation

@getappz

@getappz getappz commented Aug 20, 2026

Copy link
Copy Markdown
Owner

CI's clippy job pins dtolnay/rust-toolchain # stable, which floats. A newer stable Rust/clippy (1.98.0, per the lint doc URLs) started blocking CI on every open PR (#572, #573) on pre-existing code -- confirmed unrelated to either PR's own diff by reproducing the exact same failure against a clean master checkout.

  • documents.rs (x2) / embed.rs: chunks_exact(4) -> as_chunks::<4>().0, clippy's own suggested fix (chunks_exact_to_as_chunks); same remainder-dropping behavior as before.
  • forward.rs: check_status's Err(Response) boxed (clippy::result_large_err -- axum::http::Response is >=128 bytes), updating its three match-arm callers to deref.

Test plan

  • cargo test -p agentflare-store -p flare-proxy (190/190)
  • cargo clippy -p agentflare-store -p flare-proxy --all-targets --all-features -- -D warnings -A unsafe_code -A clippy::pedantic (clean)
  • cargo fmt -p agentflare-store -p flare-proxy -- --check (clean)

Summary by CodeRabbit

  • Bug Fixes
    • Improved proxy error handling so upstream failures consistently preserve their original status codes and response format.
    • Improved reliability when decoding stored and generated vector embeddings without changing search behavior or validation.
  • Compatibility
    • Existing successful requests and vector search results remain unchanged.

…r stable clippy

CI's clippy job pins dtolnay/rust-toolchain # stable, which floats. A
newer stable Rust/clippy (1.98.0, per the lint doc URLs) started
blocking CI on every PR on pre-existing code, confirmed unrelated to
any in-flight PR's own diff (repros identically against clean master).

- documents.rs (x2) / embed.rs: chunks_exact(4) -> as_chunks::<4>().0,
  clippy's own suggested fix (chunks_exact_to_as_chunks); same
  remainder-dropping behavior as before.
- forward.rs: check_status's Err(Response) boxed
  (clippy::result_large_err -- axum::http::Response is >=128 bytes),
  updating its three match-arm callers to deref.

Agentflare-Agent: claude-code_2-1-237_agent
Agentflare-Branch: task/521-fix-clippy-chunks-exact-to-as-chunks-res
Agentflare-Item: 521
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1aef8a93-2f1b-4078-acdd-b161a9a00f47

📥 Commits

Reviewing files that changed from the base of the PR and between 24803b0 and 17182cc.

📒 Files selected for processing (3)
  • crates/agentflare-store/src/documents.rs
  • crates/agentflare-store/src/embed.rs
  • crates/flare-proxy/src/forward.rs

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


📝 Walkthrough

Walkthrough

The change updates embedding byte decoding to use fixed-size chunks and changes proxy upstream error handling to return boxed responses while preserving status and error-body formatting.

Changes

Embedding decoding

Layer / File(s) Summary
Fixed-size embedding decoding
crates/agentflare-store/src/documents.rs, crates/agentflare-store/src/embed.rs
Embedding bytes are decoded with as_chunks::<4>() and converted from little-endian bytes to f32 values.

Proxy error handling

Layer / File(s) Summary
Boxed upstream status responses
crates/flare-proxy/src/forward.rs
check_status returns boxed non-success responses. The Anthropic, Gemini, and OpenAI-compatible paths dereference these responses before returning them. Status codes, JSON content type, and Anthropic-formatted error bodies remain unchanged.

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

Merge Risk: ⚪ Minimal · up to 17182

This PR makes localized lint-driven code updates and reports passing tests, clippy, and formatting checks; no actionable merge-blocking risk remains beyond normal review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the changes, motivation, affected files, and test results, but it omits the Notes for reviewers section.
Title check ✅ Passed The title clearly identifies the Clippy-related fixes and the two main lint changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ 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 task/521-fix-clippy-chunks-exact-to-as-chunks-res

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

@getappz
getappz merged commit 3ab85cd into master Aug 21, 2026
18 checks passed
@getappz
getappz deleted the task/521-fix-clippy-chunks-exact-to-as-chunks-res branch August 21, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant