sync: to agentic-framework v1.1.191
This commit is contained in:
parent
f44b00f480
commit
6e9df3a7bb
4 changed files with 509 additions and 45 deletions
|
|
@ -1 +1 @@
|
|||
1.1.190
|
||||
1.1.191
|
||||
|
|
|
|||
|
|
@ -1,6 +1,220 @@
|
|||
{
|
||||
"schema_version": "1.0",
|
||||
"targets": {
|
||||
"pi-ornith-high": {
|
||||
"agent": "pi",
|
||||
"model": "ornith:35b",
|
||||
"execution_class": "local_model",
|
||||
"selfcheck_required": true,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"pi",
|
||||
"-p",
|
||||
"--mode",
|
||||
"json",
|
||||
"--approve",
|
||||
"--provider",
|
||||
"iop",
|
||||
"--model",
|
||||
"{model}",
|
||||
"--thinking",
|
||||
"high",
|
||||
"--session-id",
|
||||
"{session_id}",
|
||||
"--session-dir",
|
||||
"{attempt_dir}/pi-sessions",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"agy-gemini-low": {
|
||||
"agent": "agy",
|
||||
"model": "Gemini 3.6 Flash (Low)",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"agy",
|
||||
"--print",
|
||||
"{prompt}",
|
||||
"--print-timeout",
|
||||
"8h",
|
||||
"--model",
|
||||
"{model}",
|
||||
"--dangerously-skip-permissions",
|
||||
"--log-file",
|
||||
"{attempt_dir}/agy-cli.log"
|
||||
],
|
||||
"output_format": "text",
|
||||
"auxiliary_logs": ["{attempt_dir}/agy-cli.log"]
|
||||
}
|
||||
},
|
||||
"agy-gemini-medium": {
|
||||
"agent": "agy",
|
||||
"model": "Gemini 3.6 Flash (Medium)",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"agy",
|
||||
"--print",
|
||||
"{prompt}",
|
||||
"--print-timeout",
|
||||
"8h",
|
||||
"--model",
|
||||
"{model}",
|
||||
"--dangerously-skip-permissions",
|
||||
"--log-file",
|
||||
"{attempt_dir}/agy-cli.log"
|
||||
],
|
||||
"output_format": "text",
|
||||
"auxiliary_logs": ["{attempt_dir}/agy-cli.log"]
|
||||
}
|
||||
},
|
||||
"agy-gemini-high": {
|
||||
"agent": "agy",
|
||||
"model": "Gemini 3.6 Flash (High)",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"agy",
|
||||
"--print",
|
||||
"{prompt}",
|
||||
"--print-timeout",
|
||||
"8h",
|
||||
"--model",
|
||||
"{model}",
|
||||
"--dangerously-skip-permissions",
|
||||
"--log-file",
|
||||
"{attempt_dir}/agy-cli.log"
|
||||
],
|
||||
"output_format": "text",
|
||||
"auxiliary_logs": ["{attempt_dir}/agy-cli.log"]
|
||||
}
|
||||
},
|
||||
"opencode-glm-medium": {
|
||||
"agent": "opencode",
|
||||
"model": "glm-5.2",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"opencode",
|
||||
"run",
|
||||
"--format",
|
||||
"json",
|
||||
"--dir",
|
||||
"{workspace}",
|
||||
"--agent",
|
||||
"build",
|
||||
"--model",
|
||||
"iop-glm/glm-5.2",
|
||||
"--variant",
|
||||
"medium",
|
||||
"--auto",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"opencode-glm-high": {
|
||||
"agent": "opencode",
|
||||
"model": "glm-5.2",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"opencode",
|
||||
"run",
|
||||
"--format",
|
||||
"json",
|
||||
"--dir",
|
||||
"{workspace}",
|
||||
"--agent",
|
||||
"build",
|
||||
"--model",
|
||||
"iop-glm/glm-5.2",
|
||||
"--variant",
|
||||
"high",
|
||||
"--auto",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"opencode-glm-max": {
|
||||
"agent": "opencode",
|
||||
"model": "glm-5.2",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"opencode",
|
||||
"run",
|
||||
"--format",
|
||||
"json",
|
||||
"--dir",
|
||||
"{workspace}",
|
||||
"--agent",
|
||||
"build",
|
||||
"--model",
|
||||
"iop-glm/glm-5.2",
|
||||
"--variant",
|
||||
"max",
|
||||
"--auto",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"claude-opus-xhigh": {
|
||||
"agent": "claude",
|
||||
"model": "claude-opus-5",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"claude",
|
||||
"-p",
|
||||
"--output-format",
|
||||
"stream-json",
|
||||
"--verbose",
|
||||
"--session-id",
|
||||
"{session_id}",
|
||||
"--model",
|
||||
"{model}",
|
||||
"--effort",
|
||||
"xhigh",
|
||||
"--dangerously-skip-permissions",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"codex-spark-xhigh": {
|
||||
"agent": "codex",
|
||||
"model": "gpt-5.3-codex-spark",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"codex",
|
||||
"exec",
|
||||
"--json",
|
||||
"-C",
|
||||
"{workspace}",
|
||||
"-m",
|
||||
"{model}",
|
||||
"-c",
|
||||
"model_reasoning_effort=\"xhigh\"",
|
||||
"--dangerously-bypass-approvals-and-sandbox",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"codex-sol-xhigh": {
|
||||
"agent": "codex",
|
||||
"model": "gpt-5.6-sol",
|
||||
|
|
@ -22,52 +236,204 @@
|
|||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
},
|
||||
"codex-terra-high": {
|
||||
"agent": "codex",
|
||||
"model": "gpt-5.6-terra",
|
||||
"execution_class": "cloud_model",
|
||||
"selfcheck_required": false,
|
||||
"runtime": {
|
||||
"command": [
|
||||
"codex",
|
||||
"exec",
|
||||
"--json",
|
||||
"-C",
|
||||
"{workspace}",
|
||||
"-m",
|
||||
"{model}",
|
||||
"-c",
|
||||
"model_reasoning_effort=\"high\"",
|
||||
"--dangerously-bypass-approvals-and-sandbox",
|
||||
"{prompt}"
|
||||
],
|
||||
"output_format": "jsonl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"routes": {
|
||||
"worker": {
|
||||
"local-G01": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G02": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G03": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G04": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G05": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G06": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G07": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G08": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G09": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G10": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G01": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G02": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G03": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G04": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G05": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G06": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G07": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G08": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G09": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G10": {"candidates": ["codex-sol-xhigh"]}
|
||||
"local-G01": {
|
||||
"candidates": ["pi-ornith-high"],
|
||||
"rule_id": "worker-local-g01-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G02": {
|
||||
"candidates": ["pi-ornith-high"],
|
||||
"rule_id": "worker-local-g02-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G03": {
|
||||
"candidates": ["pi-ornith-high"],
|
||||
"rule_id": "worker-local-g03-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G04": {
|
||||
"candidates": ["pi-ornith-high"],
|
||||
"rule_id": "worker-local-g04-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G05": {
|
||||
"candidates": ["pi-ornith-high"],
|
||||
"rule_id": "worker-local-g05-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G06": {
|
||||
"candidates": ["pi-ornith-high"],
|
||||
"rule_id": "worker-local-g06-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G07": {
|
||||
"policy_priority": 20,
|
||||
"windows": [
|
||||
{
|
||||
"timezone": "Asia/Seoul",
|
||||
"start": "07:00",
|
||||
"end": "23:00",
|
||||
"candidates": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"rule_id": "worker-local-g07-kst-day-catalog",
|
||||
"reason_codes": ["worker_catalog_lane_kst_day"]
|
||||
},
|
||||
{
|
||||
"timezone": "Asia/Seoul",
|
||||
"start": "23:00",
|
||||
"end": "07:00",
|
||||
"candidates": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"rule_id": "worker-local-g07-kst-night-catalog",
|
||||
"reason_codes": ["worker_catalog_lane_kst_night"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"local-G08": {
|
||||
"policy_priority": 20,
|
||||
"windows": [
|
||||
{
|
||||
"timezone": "Asia/Seoul",
|
||||
"start": "07:00",
|
||||
"end": "23:00",
|
||||
"candidates": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"rule_id": "worker-local-g08-kst-day-catalog",
|
||||
"reason_codes": ["worker_catalog_lane_kst_day"]
|
||||
},
|
||||
{
|
||||
"timezone": "Asia/Seoul",
|
||||
"start": "23:00",
|
||||
"end": "07:00",
|
||||
"candidates": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"rule_id": "worker-local-g08-kst-night-catalog",
|
||||
"reason_codes": ["worker_catalog_lane_kst_night"]
|
||||
}
|
||||
]
|
||||
},
|
||||
"local-G09": {
|
||||
"candidates": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"rule_id": "worker-local-g09-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"local-G10": {
|
||||
"candidates": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"rule_id": "worker-local-g10-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G01": {
|
||||
"candidates": ["codex-spark-xhigh", "agy-gemini-low", "opencode-glm-medium", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g01-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G02": {
|
||||
"candidates": ["codex-spark-xhigh", "agy-gemini-low", "opencode-glm-medium", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g02-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G03": {
|
||||
"candidates": ["agy-gemini-medium", "opencode-glm-high", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g03-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G04": {
|
||||
"candidates": ["agy-gemini-medium", "opencode-glm-high", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g04-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G05": {
|
||||
"candidates": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g05-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G06": {
|
||||
"candidates": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g06-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G07": {
|
||||
"candidates": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g07-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G08": {
|
||||
"candidates": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"rule_id": "worker-cloud-g08-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G09": {
|
||||
"candidates": ["codex-sol-xhigh"],
|
||||
"rule_id": "worker-cloud-g09-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
},
|
||||
"cloud-G10": {
|
||||
"candidates": ["codex-sol-xhigh"],
|
||||
"rule_id": "worker-cloud-g10-catalog",
|
||||
"policy_priority": 30,
|
||||
"reason_codes": ["worker_catalog_lane"]
|
||||
}
|
||||
},
|
||||
"review": {
|
||||
"local-G01": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G02": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G03": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G04": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G05": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G06": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G07": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G08": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G09": {"candidates": ["codex-sol-xhigh"]},
|
||||
"local-G10": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G01": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G02": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G03": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G04": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G05": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G06": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G07": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G08": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G09": {"candidates": ["codex-sol-xhigh"]},
|
||||
"cloud-G10": {"candidates": ["codex-sol-xhigh"]}
|
||||
"local-G01": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g01-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G02": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g02-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G03": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g03-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G04": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g04-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G05": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g05-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G06": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g06-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G07": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g07-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G08": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g08-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G09": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g09-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"local-G10": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-local-g10-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G01": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g01-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G02": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g02-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G03": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g03-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G04": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g04-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G05": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g05-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G06": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g06-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G07": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g07-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G08": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g08-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G09": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g09-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]},
|
||||
"cloud-G10": {"candidates": ["codex-sol-xhigh"], "rule_id": "review-cloud-g10-catalog", "policy_priority": 10, "reason_codes": ["review_catalog_lane"]}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -316,12 +316,19 @@ class GenericDispatcherContractTests(unittest.TestCase):
|
|||
def test_dry_run_uses_bundled_catalog_by_default(self):
|
||||
with TemporaryDirectory() as tmp:
|
||||
(Path(tmp) / "agent-task").mkdir()
|
||||
bin_dir = Path(tmp) / "bin"
|
||||
bin_dir.mkdir()
|
||||
for executable in ("agy", "claude", "codex", "opencode", "pi"):
|
||||
path = bin_dir / executable
|
||||
path.write_text("#!/bin/sh\nexit 0\n", encoding="utf-8")
|
||||
path.chmod(stat.S_IRWXU)
|
||||
env = {
|
||||
key: value
|
||||
for key, value in os.environ.items()
|
||||
if key != "AGENT_TASK_EXECUTION_CATALOG"
|
||||
}
|
||||
env["XDG_STATE_HOME"] = str(Path(tmp) / "state")
|
||||
env["PATH"] = f"{bin_dir}{os.pathsep}{env.get('PATH', '')}"
|
||||
completed = subprocess.run(
|
||||
[sys.executable, str(SCRIPT), "--workspace", tmp, "--dry-run"],
|
||||
capture_output=True,
|
||||
|
|
|
|||
|
|
@ -75,14 +75,105 @@ class SelectorTests(unittest.TestCase):
|
|||
with TemporaryDirectory() as tmp, mock.patch.dict(os.environ, {}, clear=True):
|
||||
task = write_task(Path(tmp))
|
||||
result = selector.select_execution_target(task)
|
||||
self.assertEqual(result["selected"]["target_id"], "codex-sol-xhigh")
|
||||
self.assertEqual(result["selected"]["agent"], "codex")
|
||||
self.assertEqual(result["selected"]["model"], "gpt-5.6-sol")
|
||||
self.assertEqual(result["selected"]["target_id"], "agy-gemini-high")
|
||||
self.assertEqual(result["selected"]["agent"], "agy")
|
||||
self.assertEqual(result["selected"]["model"], "Gemini 3.6 Flash (High)")
|
||||
self.assertEqual(
|
||||
result["catalog"]["source"],
|
||||
str(selector.DEFAULT_CATALOG_PATH.resolve()),
|
||||
)
|
||||
|
||||
def test_bundled_catalog_preserves_operator_route_matrix(self):
|
||||
expected_worker = {
|
||||
**{
|
||||
f"local-G{grade:02d}": ["pi-ornith-high"]
|
||||
for grade in range(1, 7)
|
||||
},
|
||||
"local-G07": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"local-G08": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"local-G09": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"local-G10": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"cloud-G01": ["codex-spark-xhigh", "agy-gemini-low", "opencode-glm-medium", "codex-terra-high"],
|
||||
"cloud-G02": ["codex-spark-xhigh", "agy-gemini-low", "opencode-glm-medium", "codex-terra-high"],
|
||||
"cloud-G03": ["agy-gemini-medium", "opencode-glm-high", "codex-terra-high"],
|
||||
"cloud-G04": ["agy-gemini-medium", "opencode-glm-high", "codex-terra-high"],
|
||||
"cloud-G05": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"cloud-G06": ["agy-gemini-high", "opencode-glm-max", "codex-terra-high"],
|
||||
"cloud-G07": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"cloud-G08": ["claude-opus-xhigh", "codex-terra-high"],
|
||||
"cloud-G09": ["codex-sol-xhigh"],
|
||||
"cloud-G10": ["codex-sol-xhigh"],
|
||||
}
|
||||
expected_targets = {
|
||||
"pi-ornith-high",
|
||||
"agy-gemini-low",
|
||||
"agy-gemini-medium",
|
||||
"agy-gemini-high",
|
||||
"opencode-glm-medium",
|
||||
"opencode-glm-high",
|
||||
"opencode-glm-max",
|
||||
"claude-opus-xhigh",
|
||||
"codex-spark-xhigh",
|
||||
"codex-sol-xhigh",
|
||||
"codex-terra-high",
|
||||
}
|
||||
with mock.patch.dict(os.environ, {}, clear=True):
|
||||
catalog = selector.load_runtime_catalog()
|
||||
self.assertEqual(set(catalog.targets), expected_targets)
|
||||
for route_id, expected in expected_worker.items():
|
||||
lane, raw_grade = route_id.split("-G")
|
||||
decision = selector.policy.select_policy(
|
||||
catalog=catalog,
|
||||
stage="worker",
|
||||
lane=lane,
|
||||
grade=int(raw_grade),
|
||||
evaluated_at=datetime(2026, 1, 1, tzinfo=timezone.utc),
|
||||
)
|
||||
self.assertEqual(
|
||||
[target.catalog_id for target in decision.candidates],
|
||||
expected,
|
||||
route_id,
|
||||
)
|
||||
for lane in ("local", "cloud"):
|
||||
for grade in range(1, 11):
|
||||
decision = selector.policy.select_policy(
|
||||
catalog=catalog,
|
||||
stage="review",
|
||||
lane=lane,
|
||||
grade=grade,
|
||||
evaluated_at=datetime(2026, 1, 1, tzinfo=timezone.utc),
|
||||
)
|
||||
self.assertEqual(
|
||||
[target.catalog_id for target in decision.candidates],
|
||||
["codex-sol-xhigh"],
|
||||
)
|
||||
night = selector.policy.select_policy(
|
||||
catalog=catalog,
|
||||
stage="worker",
|
||||
lane="local",
|
||||
grade=7,
|
||||
evaluated_at=datetime(2026, 1, 1, 16, tzinfo=timezone.utc),
|
||||
)
|
||||
self.assertEqual(night.rule_id, "worker-local-g07-kst-night-catalog")
|
||||
self.assertEqual(night.reason_codes, ("worker_catalog_lane_kst_night",))
|
||||
|
||||
def test_bundled_catalog_preserves_operator_runtime_contracts(self):
|
||||
with mock.patch.dict(os.environ, {}, clear=True):
|
||||
catalog = selector.load_runtime_catalog()
|
||||
pi = catalog.targets["pi-ornith-high"]
|
||||
self.assertEqual((pi.agent, pi.model), ("pi", "ornith:35b"))
|
||||
self.assertTrue(pi.selfcheck_required)
|
||||
self.assertIn("--thinking", pi.runtime["command"])
|
||||
agy = catalog.targets["agy-gemini-high"]
|
||||
self.assertEqual(agy.runtime["auxiliary_logs"], ["{attempt_dir}/agy-cli.log"])
|
||||
opencode = catalog.targets["opencode-glm-max"]
|
||||
self.assertIn("iop-glm/glm-5.2", opencode.runtime["command"])
|
||||
self.assertIn("max", opencode.runtime["command"])
|
||||
claude = catalog.targets["claude-opus-xhigh"]
|
||||
self.assertEqual((claude.agent, claude.model), ("claude", "claude-opus-5"))
|
||||
terra = catalog.targets["codex-terra-high"]
|
||||
self.assertIn('model_reasoning_effort="high"', terra.runtime["command"])
|
||||
|
||||
def test_initial_decision_contains_catalog_evidence_and_no_quota(self):
|
||||
with TemporaryDirectory() as tmp:
|
||||
root = Path(tmp)
|
||||
|
|
@ -214,7 +305,7 @@ class SelectorTests(unittest.TestCase):
|
|||
self.assertEqual(completed.stderr, "")
|
||||
self.assertEqual(
|
||||
json.loads(completed.stdout)["selected"]["target_id"],
|
||||
"codex-sol-xhigh",
|
||||
"agy-gemini-high",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue