fix(cli): preserve chat-local provider flags - #86
Merged
Merged
Conversation
🔎 Lint report:
|
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
hermes chat --provider ...and other chat-local duplicate flags instead of hoisting them to the parent parserchat --provider gmiwhile keeping the dashboard trailing--tui/--skillsfix coveredWhy
After PR #85 merged, CI exposed a fork-only parser regression:
hermes chat --provider gmireachedcmd_chatwithargs.provider is None. The hoist helper was moving--providerbeforechat, then the chat subparser default overwrote it. This keeps hoisting for subcommands that do not own the option, and leaves native subcommand flags in place.Verification
python3 -m pytest tests/hermes_cli/test_regression_16767.py::test_chat_provider_argparse_acceptance tests/hermes_cli/test_gmi_provider.py::TestGmiMainFlow::test_chat_parser_accepts_gmi_provider tests/hermes_cli/test_default_interface_resolution.py::TestPostSubcommandGlobalFlagHoisting -qpython3 -m pytest tests/run_agent/test_run_agent.py::TestRunConversation::test_preflight_token_usage_emits_before_api_response tests/run_agent/test_run_agent.py::TestRunConversation::test_stop_finish_reason_returns_response tests/hermes_cli/test_regression_16767.py::test_chat_provider_argparse_acceptance tests/hermes_cli/test_gmi_provider.py::TestGmiMainFlow::test_chat_parser_accepts_gmi_provider tests/hermes_cli/test_default_interface_resolution.py::TestPostSubcommandGlobalFlagHoisting -qpython3 -m py_compile hermes_cli/main.py