Skip to content

fix: preserve update parent language option - #547

Open
YoneRai12 wants to merge 1 commit into
mainfrom
codex/fix-language-argument-handling-in-cli
Open

fix: preserve update parent language option#547
YoneRai12 wants to merge 1 commit into
mainfrom
codex/fix-language-argument-handling-in-cli

Conversation

@YoneRai12

Copy link
Copy Markdown
Owner

Motivation

  • Aardvark による検出で、yonerai update --lang en check --pretty のように親パーサーで --lang を渡した場合にサブコマンドの既定値で上書きされ日本語表示になる回帰が確認されたため、親で指定した言語を保持する修正が必要でした。

Description

  • サブパーサー側の --lang--color の既定値を argparse.SUPPRESS に変更して親パーサーのオプションがサブコマンド実行時に上書きされないようにしました(clients/cli/yonerai_cli/commands/update.pyplan/check/stable/beta/apply 等)。
  • 回帰検出用のテスト test_cli_update_parent_language_reaches_check_subcommandtests/test_installer_update_plan.py に追加し、yonerai update --lang en ... check --pretty が英語出力になることを検証しました。
  • テストファイル先頭の BOM を除去して文字コードスキャンの警告を解消しました(変更ファイル: clients/cli/yonerai_cli/commands/update.py, tests/test_installer_update_plan.py)。
  • 変更コミットは ae64760 で PR タイトルは fix: preserve update parent language option です; 本修正は CLI の引数処理とテストだけを触り、src/cogs/ora.pyreference_clawdbot、シークレットや本番境界は変更していません。

Testing

  • PYTHONPATH=clients/cli pytest -q tests/test_installer_update_plan.py -q を実行して該当テストを含む全テストが通過しました(成功)。
  • python -m compileall clients/cli/yonerai_cli/commands/update.pypython -m ruff check clients/cli/yonerai_cli/commands/update.py tests/test_installer_update_plan.py を実行して構文チェックとスタイルチェックが成功しました(成功)。
  • git diff --check、シークレット/ローカルパススキャン、及び mojibake/hidden-Unicode スキャンを実施して問題がないことを確認しました(成功)。

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the CLI parser configuration in update.py by changing the default values of the --lang and --color arguments to argparse.SUPPRESS across several subcommands. This ensures that parent-level arguments propagate correctly to subcommands without being overridden by subcommand-level defaults. Additionally, a test case has been added to verify this behavior, and a Byte Order Mark (BOM) was removed from test_installer_update_plan.py. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant