Repository navigation
RAL-196: serve's wiring in its own file, so src/main.rs is the client's - #283
Merged
Merged
Conversation
src/main.rs held every command, serve among them, so the brief's builds read "can't tell" for each story that touched it. Serve's flags, their checks and the service's start move to src/serve.rs, and how --db and --head-file name the ledger moves to the store, with no change to what rally serve accepts or does. main only passes the command on, and a test keeps it so. src/serve.rs is placed with the service's files and src/main.rs with the client's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
From the watchman's read: --db, --head-file and --db-password-file reach the service, so main.rs mustn't declare them and still read as the client's. They move to store::LedgerFlags, flattened into the CLI, and the test that main only passes serve on now also refuses those declarations in main.rs. rally --help and rally serve --help are unchanged. Co-Authored-By: Claude Fable 5.2 <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.
Follow-up to RAL-195, agreed with the watchman.
Why
src/main.rsheld every command,serveamong them, so the brief's builds section read "can't tell" for each story that touched it (three of eight on 2026-11-15).What
src/serve.rs(new, the service's):serve's flags asserve::Args, their checks, and the service's start. Moved as they were, along withrun_service,parse_rally_openers,read_github_tokenandparse_window.Location::namedinsrc/store.rs: how--db,--head-fileand--db-password-filename the ledger, moved frommain.src/main.rskeepsServe(rally::serve::Args)and one arm that passes it on.builds:servejoinsSERVICE_MODULES;mainmoves from shared toCLIENT_MODULES.No change to what
rally serveaccepts or does:rally serve --helpis byte-identical to the installed CLI's.What still reaches the service from main.rs
The declarations of the global flags (
--db,--head-file,--db-password-file) and the call that passes them toLocation::named. Their meaning is in the store now. A change to those declarations alone would read as the client's.Tests
main_only_passes_serve_on:mainholds the one delegating arm and names nothing ofserver,RateLimitorevidence::Settings.src/web.rsas the shared file where they usedsrc/main.rs.cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo testpass locally, including the service tests that startrally serve.docs/roadmap.mdwill conflict with #282; I'll merge main in once that lands.🤖 Generated with Claude Code