Skip to content

chore: restore Rust fmt and clippy cleanliness#463

Merged
willwashburn merged 1 commit into
mainfrom
codex/wave1-rust-hygiene
May 26, 2026
Merged

chore: restore Rust fmt and clippy cleanliness#463
willwashburn merged 1 commit into
mainfrom
codex/wave1-rust-hygiene

Conversation

@willwashburn

Copy link
Copy Markdown
Member

Summary

  • Apply rustfmt across the Rust workspace.
  • Resolve clippy warnings with mechanical, behavior-preserving cleanup.
  • Leave the pre-existing .gitignore local edit unstaged.

Verification

  • cargo fmt --all -- --check: pass
  • cargo clippy --workspace --all-targets -- -D warnings: pass
  • cargo test --workspace: pass

Closes #457

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 57cd2ac1-5b21-4f14-a74d-1d1e3d57d476

📥 Commits

Reviewing files that changed from the base of the PR and between def9c50 and 271fccd.

📒 Files selected for processing (63)
  • crates/relayburn-cli/src/commands/compare.rs
  • crates/relayburn-cli/src/commands/flow.rs
  • crates/relayburn-cli/src/commands/hotspots.rs
  • crates/relayburn-cli/src/commands/ingest.rs
  • crates/relayburn-cli/src/commands/mcp_server.rs
  • crates/relayburn-cli/src/commands/overhead.rs
  • crates/relayburn-cli/src/commands/state.rs
  • crates/relayburn-cli/src/commands/summary.rs
  • crates/relayburn-cli/src/harnesses/claude.rs
  • crates/relayburn-cli/src/harnesses/opencode.rs
  • crates/relayburn-cli/src/harnesses/pending_stamp.rs
  • crates/relayburn-cli/src/harnesses/registry.rs
  • crates/relayburn-cli/tests/golden.rs
  • crates/relayburn-sdk-node/src/lib.rs
  • crates/relayburn-sdk/src/analyze.rs
  • crates/relayburn-sdk/src/analyze/claude_md.rs
  • crates/relayburn-sdk/src/analyze/compare.rs
  • crates/relayburn-sdk/src/analyze/context_delta.rs
  • crates/relayburn-sdk/src/analyze/fidelity.rs
  • crates/relayburn-sdk/src/analyze/flow_graph.rs
  • crates/relayburn-sdk/src/analyze/ghost_surface.rs
  • crates/relayburn-sdk/src/analyze/hotspots.rs
  • crates/relayburn-sdk/src/analyze/overhead.rs
  • crates/relayburn-sdk/src/analyze/patterns.rs
  • crates/relayburn-sdk/src/analyze/patterns_tests.rs
  • crates/relayburn-sdk/src/analyze/replacement_savings.rs
  • crates/relayburn-sdk/src/analyze/span_tree.rs
  • crates/relayburn-sdk/src/analyze/subagent_tree.rs
  • crates/relayburn-sdk/src/analyze/tool_call_patterns.rs
  • crates/relayburn-sdk/src/analyze/tool_output_bloat.rs
  • crates/relayburn-sdk/src/export_verbs.rs
  • crates/relayburn-sdk/src/ingest.rs
  • crates/relayburn-sdk/src/ingest/fs_events.rs
  • crates/relayburn-sdk/src/ingest/gap.rs
  • crates/relayburn-sdk/src/ingest/gap_warning_tests.rs
  • crates/relayburn-sdk/src/ingest/ingest.rs
  • crates/relayburn-sdk/src/ingest/pending_stamps.rs
  • crates/relayburn-sdk/src/ingest_verb.rs
  • crates/relayburn-sdk/src/ledger.rs
  • crates/relayburn-sdk/src/ledger/bootstrap.rs
  • crates/relayburn-sdk/src/ledger/config.rs
  • crates/relayburn-sdk/src/ledger/db.rs
  • crates/relayburn-sdk/src/ledger/paths.rs
  • crates/relayburn-sdk/src/ledger/reader.rs
  • crates/relayburn-sdk/src/ledger/stamp.rs
  • crates/relayburn-sdk/src/ledger/tests.rs
  • crates/relayburn-sdk/src/ledger/writer.rs
  • crates/relayburn-sdk/src/lib.rs
  • crates/relayburn-sdk/src/query_verbs.rs
  • crates/relayburn-sdk/src/reader.rs
  • crates/relayburn-sdk/src/reader/claude.rs
  • crates/relayburn-sdk/src/reader/claude/parent_chain.rs
  • crates/relayburn-sdk/src/reader/claude/span_tree.rs
  • crates/relayburn-sdk/src/reader/claude/subagents.rs
  • crates/relayburn-sdk/src/reader/codex.rs
  • crates/relayburn-sdk/src/reader/codex/span_tree.rs
  • crates/relayburn-sdk/src/reader/hash.rs
  • crates/relayburn-sdk/src/reader/inference.rs
  • crates/relayburn-sdk/src/reader/opencode.rs
  • crates/relayburn-sdk/src/reader/opencode/tests.rs
  • crates/relayburn-sdk/src/reader/types.rs
  • crates/relayburn-sdk/src/stamp_verb.rs
  • crates/relayburn-sdk/src/util/time.rs

📝 Walkthrough

Walkthrough

This PR restores rustfmt and clippy cleanliness across the workspace by applying formatting, derive trait additions, lint suppressions, and minor semantic improvements. Changes are predominantly whitespace/line-wrapping normalization, import reordering, and clippy cleanup, with targeted logic improvements in error handling, pattern validation, and type refinement.

Changes

Formatting & Lint Cleanup

Layer / File(s) Summary
CLI command formatting & refactors
crates/relayburn-cli/src/commands/{compare,flow,hotspots,ingest,mcp_server,overhead,state,summary}.rs, crates/relayburn-cli/src/harnesses/{claude,opencode,pending_stamp,registry}.rs, crates/relayburn-cli/tests/golden.rs
CLI command implementations and harness adapters updated with rustfmt line-wrapping and whitespace normalization. Minor logic improvements: --patterns validation now uses contains() helper instead of any() predicate; error handling switches from map_err to inspect_err for progress cleanup; sort helpers remove lifetime generics and use sort_by_key(Reverse(...)) for descending byte ordering.
SDK analyze module formatting
crates/relayburn-sdk/src/analyze/{*.rs,*_tests.rs}
Analyze submodules (claude_md, compare, context_delta, flow_graph, hotspots, overhead, patterns, span_tree, subagent_tree, tool_call_patterns, tool_output_bloat) reformatted for rustfmt compliance. Added clippy lint attributes (#[allow(clippy::too_many_arguments)], #[allow(clippy::enum_variant_names)]) and refactored logic: matches! macro used instead of match expressions; direct u64 subtraction for token computation instead of casting; test fixtures reformatted without assertion changes.
SDK ingest, export, & ledger formatting
crates/relayburn-sdk/src/{ingest.rs,export_verbs.rs,query_verbs.rs}, crates/relayburn-sdk/src/ingest/{*.rs}, crates/relayburn-sdk/src/ledger/{*.rs}
Ingest and ledger modules updated with rustfmt line-wrapping and lint cleanup. SearchQueryOptions derives Default instead of manual implementation; #[allow(clippy::module_inception)] added to ingest module. Function signatures and SQL call sites reformatted without behavior changes.
SDK reader module type refinements & formatting
crates/relayburn-sdk/src/reader.rs, crates/relayburn-sdk/src/reader/{claude.rs,codex.rs,hash.rs,inference.rs,opencode.rs,types.rs} and submodules
Reader module formatting plus semantically meaningful improvements: byte-length computation standardized to s.len() for both string and JSON-serialized outputs; InferenceRef::Synthetic now wraps synthesized inferences in Box<Inference> for lifetime correctness; RelationshipKey type alias introduced for dedup-key typing; subagent resolution refactored to use while let loop with consolidated parent-tool-use matching; prescan system-line handling reformatted with equivalent logic.
Query verbs & SDK re-export formatting
crates/relayburn-sdk/src/query_verbs.rs, crates/relayburn-sdk/src/lib.rs
SummaryReportOptions now derives Default instead of manual implementation. Added #[allow(clippy::large_enum_variant)] to SummaryReport enum. Session span-tree bucketing and Claude span-tree input wiring reformatted for clarity without behavior changes. Top-level SDK re-exports reorganized into grouped multi-line pub use blocks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • AgentWorkforce/burn#457: The linked issue describing the rustfmt and clippy cleanliness goals addressed by this PR.
  • AgentWorkforce/burn#386: Prior refactoring of burn summary command implementation that this PR's formatting updates build upon.
  • AgentWorkforce/burn#445: Added stopReasons field to summary JSON that this PR reformats for clippy compliance.

Poem

🐰 The code was messy, lines too long,
With clippy warnings all along—
We've wrapped and sorted, traits derived,
Now rustfmt and clippy thrive!
Hygiene restored, the workspace is clean. 🧹

✨ 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 codex/wave1-rust-hygiene

@cubic-dev-ai cubic-dev-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.

No issues found across 63 files

You’re at about 95% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Re-trigger cubic

@willwashburn willwashburn merged commit 85ff227 into main May 26, 2026
12 checks passed
@willwashburn willwashburn deleted the codex/wave1-rust-hygiene branch May 26, 2026 22:54
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.

Restore rustfmt and clippy cleanliness

1 participant