[claude] Fix 10 vassal tests flaky under xdist parallel execution (#1243) #1245

Merged
claude merged 1 commits from claude/issue-1243 into main 2026-03-23 23:29:26 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
c74a0dd04e fix: isolate vassal tests from real network calls under xdist parallel execution
Some checks failed
Tests / lint (pull_request) Failing after 12s
Tests / test (pull_request) Has been skipped
10 tests in test_vassal_agent_health.py and test_vassal_orchestration_loop.py
were timing out at 30s when run in parallel via tox -e unit (pytest-xdist).

Root cause: tests called check_agent_health(), get_full_health_report(), and
run_cycle() without mocking config.settings, causing live HTTP requests to
Gitea (15s timeout) and Ollama (5s timeout). Under xdist with N workers all
making simultaneous network calls, the 30s test timeout was exceeded.

Fix: add proper mock patches to each affected test so no real network calls
are made:
- patch config.settings with gitea_enabled=False / gitea_token="" → makes
  fetch_open_issues() and check_agent_health() bail out immediately
- patch timmy.vassal.house_health.get_system_snapshot → avoids Ollama probe
  (urllib.request.urlopen with 5s timeout) in run_cycle tests
- add _disabled_settings() and _fast_snapshot() helpers in orchestration_loop
  tests for DRY patching

Fixes #1243

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 19:28:41 -04:00