mirror of
https://github.com/open-jarvis/OpenJarvis.git
synced 2026-07-30 19:02:16 +00:00
- Eval config: TOML-based suite configs defining models x benchmarks matrix, loaded via --config flag. Includes load_eval_config(), expand_suite(), 7 config dataclasses, 3 example configs, and 61 new tests. - Pillar-aligned config: generation params in IntelligenceConfig, nested engine/learning configs, agent objective/system_prompt/context_from_memory, structured learning sub-policies, TOML migration layer. - Documentation: evaluations user guide, evals API reference, updated mkdocs.yml navigation, updated architecture docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
816 B
Python
24 lines
816 B
Python
"""Tests for heuristic policy registration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from openjarvis.core.registry import RouterPolicyRegistry
|
|
from openjarvis.learning.heuristic_policy import ensure_registered
|
|
from openjarvis.learning.router import HeuristicRouter
|
|
|
|
|
|
class TestHeuristicPolicy:
|
|
def test_registered_as_heuristic(self) -> None:
|
|
ensure_registered()
|
|
assert RouterPolicyRegistry.contains("heuristic")
|
|
|
|
def test_value_is_heuristic_router(self) -> None:
|
|
ensure_registered()
|
|
assert RouterPolicyRegistry.get("heuristic") is HeuristicRouter
|
|
|
|
def test_can_instantiate(self) -> None:
|
|
ensure_registered()
|
|
cls = RouterPolicyRegistry.get("heuristic")
|
|
router = cls(available_models=["model-a"])
|
|
assert router.available_models == ["model-a"]
|