feat(harness): phi4-mini harness layer — self-healing watcher + availability-first orchestrator#134
Open
celstnblacc wants to merge 2 commits into
Open
feat(harness): phi4-mini harness layer — self-healing watcher + availability-first orchestrator#134celstnblacc wants to merge 2 commits into
celstnblacc wants to merge 2 commits into
Conversation
… intelligence Adds a local phi4-mini (Ollama) harness layer that makes the watcher self-healing and the orchestrator availability-aware. The harness layer never touches task content — owners (claude-cli, codex-cli, gemini-cli, vLLM) retain full control over task execution and decomposition. New module: src/superharness/harness/ - OllamaHarnessClient: phi4-mini HTTP client (ping, decide, route) - RuleBasedFallback: deterministic decisions when Ollama is unavailable - WatcherHealthAdvisor: per-cycle health assessment (restart/break_lock/escalate) - OrchestratorDispatchAdvisor: availability-first routing, round-robin fallback - OwnerRegistry: owner availability via CLI/endpoint checks, no skill assumptions - ReviewStore: sqlite outcomes store for future data-driven routing - HarnessConfig: harness.yaml loader with safe defaults Watcher integration: _run_health_check() called each cycle in _run_scripts() Dispatch integration: _resolve_owner() advisory routing before adapter selection Model router: harness-local entry added (phi4-mini for all tiers) Launchd: install-launchd-ollama.sh + install-launchd-orchestrator.sh Startup order: ollama → orchestrator → watcher 56 new tests, all passing. Pre-existing test_delegate failure unrelated. Version: 1.34.3 → 1.35.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a task has failed FAILOVER_RETRY_THRESHOLD (2) times on its assigned owner, the OrchestratorDispatchAdvisor automatically excludes that owner and routes to the next available alternative. Falls back to the original owner when no alternatives exist. - OrchestratorDispatchAdvisor.advise_failover(task_id, failing_owner) - _resolve_owner() now accepts retry_count; triggers failover at >= 2 - Call site passes item_retry_count from inbox item - 9 new tests covering failover scenarios This addresses the gemini-cli auth-block scenario: after 2 failures, the task automatically reassigns to claude-code or codex-cli without manual shux recover. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/superharness/harness/module: phi4-mini (Ollama) intelligence for the watcher and orchestratorWatcherHealthAdvisor— per-cycle health decisions (restart/break_lock/escalate/continue) via phi4-mini or rule-based fallbackOrchestratorDispatchAdvisor— availability-first routing, round-robin when model unavailableOwnerRegistrytracks all owners (claude-cli, codex-cli, gemini-cli, vLLM) with zero skill assumptions — outcomes feedReviewStore(sqlite) for future data-driven routinginstall-launchd-ollama.shandinstall-launchd-orchestrator.sh— startup order: ollama → orchestrator → watcherArchitecture
Test plan
tests/unit/harness/,test_inbox_watch_harness.py,test_inbox_dispatch_harness.py)test_delegate_no_auto_model_uses_fallback) unrelated to this PR🤖 Generated with Claude Code