refactor(cli): modularize main.rs and the test monolith — pure code movement#193
Merged
Conversation
Verbatim moves: the clap surface (every command/subcommand/arg struct) to cli.rs, resolution helpers (config/actor/graph/branch/query, remote HTTP, env/token, scaffolding) to helpers.rs, human/JSON formatting to output.rs, the in-source test mod to main_tests.rs via #[path]. main.rs (1,184 lines) keeps main() and the dispatch match. Visibility bumps only; 22 binary tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tests/cli.rs (4,548 lines, 112 tests) becomes five area files — cli_cluster (24), cli_cluster_e2e (10, the spawned-binary lifecycle compositions), cli_data (49), cli_schema_config (16), cli_queries (13) — with the file-local helpers joining the existing tests/support harness. Verbatim moves + visibility bumps; 161 crate tests green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
aaltshuler has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
aaltshuler
added a commit
that referenced
this pull request
Jun 12, 2026
Lands an orphaned-but-accurate working-tree edit (the engine table rows for forbidden_apis.rs, lance_surface_guards.rs, traversal_indexed, proptest_equivalence, ordering, literal_filters, policy_engine_chassis — all real files; 21 -> 28 count) and replaces the stale pre-modularization crate rows: the CLI and server entries now describe the per-area suites (#192/#193 splits) plus this cycle's additions (RFC-008 deprecation coverage, keyed-credential auth, hermetic OMNIGRAPH_HOME harness, the bucket-gated s3 suites). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Third modularization PR (pattern of #188/#192): verbatim moves + visibility bumps, zero behavior change, suite green per commit.
src/main.rs (4,197) → main 1,184 + helpers 1,085 + output 830 + cli 650 + main_tests 416
cli.rs: the entire clap surface (every command/subcommand/arg struct).helpers.rs: resolution (config/actor/graph/branch/query), remote HTTP, env/token handling, scaffolding.output.rs: all human/JSON formatting (print_*/finish_*/render_*).main.rskeepsmain()and the dispatch match. The in-source test mod moved tomain_tests.rsvia#[path].tests/cli.rs (4,548 lines, 112 tests) → five area suites
cli_data.rscli_cluster.rscli_schema_config.rscli_queries.rscli_cluster_e2e.rsFile-local helpers joined the existing
tests/supportharness.Guarantees
161 crate tests green; full
cargo test --workspace --lockedgreen (50 suites). One-timegit blamediscontinuity, as before.🤖 Generated with Claude Code