refactor: decompose main.rs into 15 focused modules#9
Merged
Conversation
Break a monolithic 13,241-line main.rs into cohesive modules: - cli.rs: Clap CLI struct definitions (1173 lines) - types.rs: all shared type definitions (978 lines) - config.rs: config loading and resolution (107 lines) - search.rs: BM25, SimHash, MinHash primitives (317 lines) - util.rs: shared utilities and index loaders (579 lines) - index.rs: index building (639 lines) - assemble.rs: assembly engine and cross-refs (1570 lines) - mcp.rs: MCP protocol handlers (767 lines) - commands_query.rs: query, similar, dupes, diff (1243 lines) - commands_text.rs: stats, repl, vocabulary, eval (840 lines) - commands_links.rs: check-links, policy, fix-links (1377 lines) - commands_graph.rs: mv, paths, graph, stale, health (877 lines) - commands_audit.rs: orphans, canonicality, suggest (498 lines) - tests_main.rs: unit tests via #[path] (1939 lines) main.rs is now 495 lines (module wiring + dispatch). All 125 tests pass, zero clippy warnings.
Commit squash-scope reviewRange: Heuristic candidatesNo clear squash candidates found from overlap or message-prefix heuristics. SQUASH_SCOPE_NEEDS_REWRITE=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/main.rs(13,241 lines) into 15 focused modulesmain.rsreduced from 13,241 to 495 lines (module wiring + dispatch)Module Breakdown
yore build)#[path])Test plan
cargo clippy -- -D warningscleancargo fmt --checkclean