Skip to content

fix(cli): preserve chat-local provider flags - #86

Merged
OmarB97 merged 1 commit into
mainfrom
codex/fix-chat-provider-hoist
Jun 4, 2026
Merged

OmarB97 merged 1 commit into
mainfrom
codex/fix-chat-provider-hoist

Conversation

@OmarB97

@OmarB97 OmarB97 commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • make post-subcommand global flag hoisting aware of each subparser's native options
  • preserve hermes chat --provider ... and other chat-local duplicate flags instead of hoisting them to the parent parser
  • add regression coverage for chat --provider gmi while keeping the dashboard trailing --tui/--skills fix covered

Why

After PR #85 merged, CI exposed a fork-only parser regression: hermes chat --provider gmi reached cmd_chat with args.provider is None. The hoist helper was moving --provider before chat, 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 -q
  • python3 -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 -q
  • python3 -m py_compile hermes_cli/main.py

@OmarB97
OmarB97 merged commit c0c1bcd into main Jun 4, 2026
18 checks passed
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

🔎 Lint report: codex/fix-chat-provider-hoist vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9845 on HEAD, 9845 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5108 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant