refactor(cli): group aggregator flags into AggregatorOpts#478
refactor(cli): group aggregator flags into AggregatorOpts#478MegaRedHand wants to merge 1 commit into
Conversation
Extract --is-aggregator and --aggregate-subnet-ids into a flattened clap::Args struct so the aggregation knobs live together. The flags stay top-level on the command line and the requires cross-reference still resolves within the parent command; access moves to options.aggregator.*.
🤖 Kimi Code ReviewThe diff is a clean refactoring that improves code organization without changing the CLI interface. Correctness & Best Practices
Suggestions
Consensus/Security Impact None—this is purely a CLI parsing layer refactor with no changes to consensus logic, state transition functions, or cryptography. Verdict: LGTM. Clean separation of concerns that makes the CLI structure more maintainable. Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code ReviewNo findings. The change in bin/ethlambda/src/cli.rs and bin/ethlambda/src/main.rs is a mechanical CLI refactor: the aggregator flags are grouped under a flattened Residual risk: I could not run Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
Greptile SummaryThis PR groups the
Confidence Score: 5/5This looks safe to merge.
|
| Filename | Overview |
|---|---|
| bin/ethlambda/src/cli.rs | Moves the existing aggregator flags into a flattened AggregatorOpts struct without changing their clap attributes. |
| bin/ethlambda/src/main.rs | Updates aggregator option reads to use the new nested options.aggregator path. |
Reviews (1): Last reviewed commit: "refactor(cli): group aggregator flags in..." | Re-trigger Greptile
🤖 Claude Code ReviewPR #478 —
|
Why
--is-aggregatorand--aggregate-subnet-idsare two halves of the same concern (committee aggregation). Grouping them into a dedicated struct keeps the aggregation knobs together and shrinks the flatCliOptionsfield list.What
pub(crate) struct AggregatorOpts(clap::Args) incli.rsholdingis_aggregator+aggregate_subnet_ids.CliOptionsnests it via#[command(flatten)], so the flags stay top-level on the command line (--is-aggregator,--aggregate-subnet-ids) — no--aggregator.*prefix.requires = "is_aggregator"cross-reference still resolves: flattened arg IDs share the parent command's namespace.options.aggregator.is_aggregator/options.aggregator.aggregate_subnet_ids.No change to the parsed CLI surface.
Verification
cargo build -p ethlambda✅cargo clippy -p ethlambda --all-targets -- -D warnings✅cargo fmt✅--helpconfirms--is-aggregator/--aggregate-subnet-idsremain top-level flags; clap validates therequiresarg-graph at startup without panicking.