test(cli): the finite-chat receipt retry re-sends the CLI's per-turn fields by their wire names

ee8bd1160f made the classic CLI commit `clarify_batch` with each admission, so a `-q` turn's
stored payload now carries a `cli_turn_v1` block. check_receipt rebuilt the retry by splatting
the stored payload into prompt.submit, which sent `cli_turn_v1` as a wire param and got
invalid_params instead of the terminal receipt (KeyError 'result' on all four arms, release run
38367110151). The retry now sends the payload's own fields plus the `cli_turn_v1` fields under
their wire names, which is what the CLI submitted; the terminal / admission_conflict /
invalid_params assertions are unchanged.
This commit is contained in:
Teknium
2026-10-13 03:08:06 -07:00
parent 27a4c4f9f1
commit 15337dbf7f

View File

@@ -149,7 +149,10 @@ def test_finite_chat_joins_parallel_children_before_final_response(tmp_path, mod
assert payload["finite"] is True
async with websocket(home, desc) as ws:
assert "result" in await rpc(ws, "session.resume", session_id=sid)
retry = dict(session_id=sid, input_id=request_id, **payload)
# The row stores the committed admission; its ``cli_turn_v1`` block holds the per-turn CLI
# fields under their wire names, so the retry re-sends exactly what the CLI submitted.
wire = {key: value for key, value in payload.items() if key != "cli_turn_v1"}
retry = dict(session_id=sid, input_id=request_id, **wire, **payload.get("cli_turn_v1", {}))
assert (await rpc(ws, "prompt.submit", **retry))["result"]["status"] == "terminal"
conflict = await rpc(ws, "prompt.submit", **{**retry, "finite": False})
assert conflict["error"]["message"] == "admission_conflict"