fix(контракт): пустой DB_PATH, каталог вместо файла и точный разбор [DONE] (R-05, R-06)
Проверка среды отвергает пустой DB_PATH и DATA_DIR-файл; в проверке шлюза конец потока определяется телом data, а не подстрокой в тексте. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -128,7 +128,7 @@ def test_client_stream_carries_tool_calls(env, monkeypatch):
|
||||
assert "[DONE]" in body
|
||||
import json as _json
|
||||
chunks = [_json.loads(l[5:]) for l in body.splitlines()
|
||||
if l.startswith("data:") and "[DONE]" not in l]
|
||||
if l.startswith("data:") and l[5:].strip() != "[DONE]"]
|
||||
calls = [c["choices"][0]["delta"]["tool_calls"] for c in chunks
|
||||
if (c["choices"][0].get("delta") or {}).get("tool_calls")]
|
||||
first, fragments = calls[0][0], [call[0] for call in calls[1:]]
|
||||
|
||||
Reference in New Issue
Block a user