Skip to content

test: base_agent フォールバックパスのカバレッジ向上#87

Closed
fukukei23 wants to merge 2 commits into
mainfrom
test/issue-86-base-agent-coverage
Closed

test: base_agent フォールバックパスのカバレッジ向上#87
fukukei23 wants to merge 2 commits into
mainfrom
test/issue-86-base-agent-coverage

Conversation

@fukukei23
Copy link
Copy Markdown
Owner

Summary

  • base_agent.py のフォールバックパス(83.96%)をカバーするテスト8件を追加
  • dotenv/LLMRouter/retry_utils のインポート失敗時の挙動を検証

追加テスト

テスト 対象行
dotenv_load_fallback L19-20
llm_router_none_fallback L25-26
has_retry_false_fallback L40-48
invalid_json_fallback_with_retry L141→147→175
convert_http_error_on_execute L147
no_llm_client_returns_empty_json フォールバック
no_llm_client_returns_empty_string フォールバック
execute_error_no_retry_fallback L180-183

Test plan

  • python -m pytest tests/ -q → 5450 passed, 0 failed (+8テスト)
  • 回帰なし

Closes #86

🤖 Generated with Claude Code

Codex CLI and others added 2 commits April 27, 2026 14:29
リファクタリング(1be87e1, 005726b)でモジュールが移動されたが、
テストファイルとソースファイル内のインポートパスが更新されていなかった。

主な修正:
- agents → analyzer/config/guard/services/utils への移動に対応
- gradio_app/modules/ui/ventures → archive/ への移動に対応
- mock.patch()内のパスも含め全て更新

テスト結果: 5441 passed, 0 failed(修正前: 48 collection errors)

Closes #84

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
未カバー行のフォールバックパスをテスト:
- L19-20: dotenv load_dotenv 例外時のフォールバック
- L25-26: LLMRouter import 失敗時のフォールバック
- L40-48: retry_utils import 失敗時の HAS_RETRY=False パス
- L141: InvalidModelOutputError 発生時のフォールバック
- L147: convert_http_error_to_nexus_error 呼び出しパス

テスト結果: 5450 passed, 0 failed(+8テスト、回帰なし)

Closes #86

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@fukukei23
Copy link
Copy Markdown
Owner Author

Closing: main has diverged significantly (92+ commits of refactoring). Merge conflicts in most files. Will re-implement needed tests on current main when NexusCore becomes active again.

@fukukei23 fukukei23 closed this May 21, 2026
@fukukei23 fukukei23 deleted the test/issue-86-base-agent-coverage branch May 21, 2026 20:14
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.

test: base_agent.py カバレッジ向上(83.96%→90%+)

1 participant