feat(migration): свип 8 GLM-версий + write-path/xlsx кейсы; поправка — GLM таймауты = варианс z.ai
Свип verify по всем 8 моделям z.ai: все PASS по качеству, латентность 73–239с. Тот же glm-5.2 раньше таймаутил 240с, теперь 108с → таймауты не свойство модели, а варианс серверов. Прежний GLM-REJECT был noise. Вывод: DeepSeek лучший основной (стабильность), GLM рабочий fallback. + write-path кейс (DeepSeek создал fixed_totals.gge с корректным итогом) + xlsx-чтение. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,22 @@ def check(case: dict, tools: set[str], answer: str, raw: str) -> dict:
|
||||
}
|
||||
|
||||
|
||||
def output_check(case: dict, wd) -> dict:
|
||||
"""Write-path: создан ли ожидаемый выходной файл (glob) с нужным содержимым (output_markers)."""
|
||||
import glob
|
||||
if not case.get("expect_output_file"):
|
||||
return {"output_ok": True}
|
||||
matches = glob.glob(str(wd / case["expect_output_file"]))
|
||||
if not matches:
|
||||
return {"output_ok": False, "output_reason": f"нет файла {case['expect_output_file']}"}
|
||||
try:
|
||||
content = Path(matches[0]).read_text(encoding="utf-8", errors="ignore").lower()
|
||||
except Exception: # noqa: BLE001
|
||||
content = ""
|
||||
miss = [m for m in case.get("output_markers", []) if m.lower() not in content]
|
||||
return {"output_ok": not miss, "output_missing": miss, "output_file": Path(matches[0]).name}
|
||||
|
||||
|
||||
async def _collect(gen, out: list, timeout: float):
|
||||
async def _pump():
|
||||
async for ch in gen:
|
||||
@@ -83,6 +99,9 @@ def run_case(claude_bridge, case: dict, user: str, provider: str) -> dict:
|
||||
raw = "".join(out)
|
||||
tools, answer = extract(raw)
|
||||
res = check(case, tools, answer, raw)
|
||||
oc = output_check(case, wd) # write-path: проверка созданного файла
|
||||
res.update(oc)
|
||||
res["ok"] = res["ok"] and oc.get("output_ok", True)
|
||||
res["secs"] = round(time.time() - t0, 1)
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user