Skip to content

fix(bridge): run_tests / get_test_status / get_compilation_state の不整合修正 - #60

Merged
akiojin merged 3 commits into
developfrom
bugfix/issue-59
Mar 3, 2026
Merged

fix(bridge): run_tests / get_test_status / get_compilation_state の不整合修正#60
akiojin merged 3 commits into
developfrom
bugfix/issue-59

Conversation

@akiojin

@akiojin akiojin commented Mar 3, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #59

  • コンパイルエラー分離: CompilationHandler.GetErrorCounts() でモードビット 0x1000 (script compile error) のエントリのみを errorCount としてカウント。Debug.LogError() や Firebase/ADB 等の Console エラーは consoleErrorCount に分離。run_tests が誤ってブロックされる問題を修正
  • フィルタ振り分け: filter にドットが含まれる場合は testNames(FQN 正確一致)、含まれない場合は groupNames(クラス名マッチ)を使用
  • ウォッチドッグ改善: EditMode テスト用に 60 秒、汎用 120 秒のタイムアウトを追加。永続化された running 状態が 120 秒超で RUNNER_TIMEOUT を返してクリア
  • SaveRunState: lastUpdate を常に DateTime.UtcNow に設定し、スタレネス判定の精度を確保

Changed files

File Change
CompilationHandler.cs GetConsoleCounts()GetErrorCounts(), 新フィールド追加
TestExecutionHandler.cs フィルタ振り分け、ウォッチドッグ条件、スタレネスチェック
CompilationHandlerTests.cs +3 tests (consoleErrorCount, consoleWarningCount, subset invariant)
TestExecutionHandlerWatchdogTests.cs +3 tests (EditMode <60s, >60s, general >120s)
TestExecutionHandlerPersistenceTests.cs +3 tests (stale state, null lastUpdate, SaveRunState timestamp)

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --all-targets (132/132 passed) ✅
  • Unity Editor で Debug.LogError("test")get_compilation_stateerrorCount: 0, consoleErrorCount: 1 を確認
  • run_tests(filter="クラス名") でクラス単位のテスト実行を確認
  • EditMode テスト実行後 get_test_statuscompleted に遷移することを確認

🤖 Generated with Claude Code

…lter and watchdog (#59)

- CompilationHandler: errorCount now reflects only script-compile errors
  (mode bit 0x1000), not Debug.LogError/Firebase/ADB console noise.
  Added consoleErrorCount/consoleWarningCount for full console counts.
- TestExecutionHandler: filter routes to groupNames (class name) vs
  testNames (FQN) based on dot presence.
- Watchdog: mode-aware timeouts (PlayMode 10s, EditMode 60s, general 120s).
  Persisted running state exceeding 120s staleness returns RUNNER_TIMEOUT.
- SaveRunState: lastUpdate always set to DateTime.UtcNow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Mar 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/issue-59

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@akiojin
akiojin merged commit ad61d75 into develop Mar 3, 2026
11 checks passed
@akiojin
akiojin deleted the bugfix/issue-59 branch March 3, 2026 06:50
@akiojin
akiojin restored the bugfix/issue-59 branch March 3, 2026 08:18
akiojin added a commit that referenced this pull request Mar 3, 2026
fix(bridge): run_tests / get_test_status / get_compilation_state の不整合修正
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