Repository navigation
Conversation
The README and the CLI's own usage header advertise `rustchain node status` and `rustchain epoch info`, but `node` and `epoch` were leaf commands with no positional arguments, so both documented forms exited 2 with "Got unexpected extra argument". Turn `node` and `epoch` into groups with invoke_without_command=True and a single `status` / `info` subcommand. Both the bare form (`rustchain node`, `rustchain epoch`) and the documented subcommand now parse and run the same code path, so existing scripts keep working. Fixes Scottcjn#8565 Test: test_cli_grammar.py::TestNodeAndEpochGrammar (bare + subcommand for both).
Contributor
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
This branch has not been deployed
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.
What Changed
The README (
sdk/python/README.md:72-76) and the CLI's own usage header advertiserustchain node statusandrustchain epoch info, butnodeandepochwere leaf commands with no positional arguments, so both documented forms exited 2 withGot unexpected extra argument.sdk/python/rustchain_sdk/cli.py: turnnodeandepochintoclick.group(invoke_without_command=True)with a singlestatus/infosubcommand.rustchain node,rustchain epoch) and the documented subcommand (rustchain node status,rustchain epoch info) now parse and run the same code path — existing scripts keep working, no compatibility shim needed.Testing / Evidence
New regression test
sdk/python/rustchain_sdk/tests/test_cli_grammar.py::TestNodeAndEpochGrammar(real CLI; only node/epoch seams are recording fakes).Verified against the live node:
rustchain node status→ version 2.2.1-rip200, ok True;rustchain epoch info→ epoch 305, enrolled_miners 14.Full SDK suite: 105 passed (was 101; +4 new, no regressions).
BCOS Checklist (Required For Non-Doc PRs)
BCOS-L1Fixes #8565
AI assistance disclosure: this fix, its regression test, and the report above were prepared with AI assistance; all claims were reproduced locally against the pinned source before submission.
Wallet:
RTC472c6fdc74ed1d43b5c80349c32d5399e7dca92f