test(integration): expect signed empty thinking blocks to survive /v1/messages replay after #41362 (#46686)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Mateo Wang 2026-10-15 09:07:36 -07:00 • committed by GitHub
parent 08b8bb7896
commit 8fb6fee8c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -443,10 +443,23 @@ def _tool_loop(assistant_content: list[JsonValue]) -> dict[str, JsonValue]:
{"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}},
],
[
{"type": "thinking", "thinking": "", "signature": "EqQBCkgIBRABGAIiQM"},
{"type": "redacted_thinking", "data": "EmwKAhgBEgy3va3pzix"},
{"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}},
],
id="empty-thinking-stripped-redacted-thinking-kept",
id="signed-empty-thinking-and-redacted-thinking-kept",
),
pytest.param(
[
{"type": "thinking", "thinking": ""},
{"type": "redacted_thinking", "data": "EmwKAhgBEgy3va3pzix"},
{"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}},
],
[
{"type": "redacted_thinking", "data": "EmwKAhgBEgy3va3pzix"},
{"type": "tool_use", "id": "toolu_01", "name": "Read", "input": {"file_path": "/repo/config.yaml"}},
],
id="unsigned-empty-thinking-stripped-redacted-thinking-kept",
),
),
)