fix: preserve update parent language option - #547
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
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.
Motivation
yonerai update --lang en check --prettyのように親パーサーで--langを渡した場合にサブコマンドの既定値で上書きされ日本語表示になる回帰が確認されたため、親で指定した言語を保持する修正が必要でした。Description
--langと--colorの既定値をargparse.SUPPRESSに変更して親パーサーのオプションがサブコマンド実行時に上書きされないようにしました(clients/cli/yonerai_cli/commands/update.pyのplan/check/stable/beta/apply等)。test_cli_update_parent_language_reaches_check_subcommandをtests/test_installer_update_plan.pyに追加し、yonerai update --lang en ... check --prettyが英語出力になることを検証しました。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.pyやreference_clawdbot、シークレットや本番境界は変更していません。Testing
PYTHONPATH=clients/cli pytest -q tests/test_installer_update_plan.py -qを実行して該当テストを含む全テストが通過しました(成功)。python -m compileall clients/cli/yonerai_cli/commands/update.pyとpython -m ruff check clients/cli/yonerai_cli/commands/update.py tests/test_installer_update_plan.pyを実行して構文チェックとスタイルチェックが成功しました(成功)。git diff --check、シークレット/ローカルパススキャン、及び mojibake/hidden-Unicode スキャンを実施して問題がないことを確認しました(成功)。Codex Task