From cd7e99cd15662001b7daacb3b99e7ea4095d725e Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 9 Jun 2026 16:47:25 +0000 Subject: [PATCH] test(vertex passthrough): surface unparseable spend log startTime A row that matches the model and spend > 0 but whose startTime can't be parsed was silently skipped, so a future /spend/logs format change would time out with the "cost-tracking write was lost" message instead of pointing at the timestamp. Print the offending value when that happens; matching behaviour is unchanged --- tests/pass_through_tests/test_vertex_ai.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/pass_through_tests/test_vertex_ai.py b/tests/pass_through_tests/test_vertex_ai.py index 747cc2723d2..7cef6dc31ca 100644 --- a/tests/pass_through_tests/test_vertex_ai.py +++ b/tests/pass_through_tests/test_vertex_ai.py @@ -163,7 +163,13 @@ async def get_request_spend_log( if float(row.get("spend") or 0.0) <= 0: continue row_start = _parse_spend_log_start_time(row.get("startTime")) - if row_start is not None and row_start >= after_time: + if row_start is None: + print( + f"matching row has unparseable startTime {row.get('startTime')!r}", + row, + ) + continue + if row_start >= after_time: print(f"found spend log (elapsed={elapsed}s)", row) return row return None