test(python): accept standalone live smoke acknowledgements
The installed-wheel smoke checks real model tool use and externally verifies the created file, a fresh host-only challenge, the copied receipt, and the unchanged source. DeepSeek can return the requested acknowledgement before a file-details paragraph; requiring it to be the last line makes correct SDK execution fail according to the placement of explanatory prose. Accept the exact acknowledgement on any standalone line, retaining completed turns, model-requested tool calls, exact file bytes, and session-log checks. Replay the observed response through both turns and keep negative coverage for absent or embedded acknowledgements and incorrect files.
This commit is contained in:
1 parent
a523d8ec58
commit
8c32bcf97d
5 files changed
+23
-10
No files matched your search
@@ -1083,7 +1083,7 @@ def smoke_sdk_live() -> None:
|
||||
|
||||
|
||||
def assert_live_turn(label: str, result: RunResult) -> None:
|
||||
"""Require completed model tool use and the smoke sentinel on the final answer line."""
|
||||
"""Require completed model tool use and a standalone smoke acknowledgement."""
|
||||
if result.finish_reason != "completed":
|
||||
event_types = [event.get("type") for event in result.events]
|
||||
turn_end_data = next(
|
||||
@@ -1100,8 +1100,7 @@ def assert_live_turn(label: str, result: RunResult) -> None:
|
||||
f"{label} turn made no model-requested tool call; "
|
||||
f"final={result.final_response!r}"
|
||||
)
|
||||
answer_lines = result.final_response.strip().splitlines()
|
||||
if not answer_lines or answer_lines[-1].strip() != LIVE_API_SENTINEL:
|
||||
if not any(line.strip() == LIVE_API_SENTINEL for line in result.final_response.splitlines()):
|
||||
raise AssertionError(f"{label} turn returned {result.final_response!r}")
|
||||
|
||||
def safe_turn_end(value: object) -> object:
|
||||
|
||||
Reference in new issue
Block a user