kshitijk4poor
b4356135f2
test(langfuse): add end-to-end turn-isolation regression
...
The PR added helper-level tests for _trace_key but nothing exercised the
keys through the real hooks. This adds TestTurnTraceIsolation, which drives
on_pre_llm_request / on_post_llm_call across two turns of one gateway
session (task_id == session_id, unique turn_id, api_call_count reset per
turn) and asserts each turn opens its own root trace when the first turn
fails to finalize (tool-only final step). This test fails on the pre-fix
code (only one trace opened, turn 2 absorbed into turn 1) and passes with
the scoping fix.
Also pins the turn_id-over-api_request_id key precedence: the turn-scoped
post_llm_call carries no api_request_id, so it must still resolve to the
same key as the request-scoped hooks or finalization breaks.
2026-06-18 12:38:44 +05:30
..
2026-06-16 15:49:59 -07:00
2026-05-18 10:14:38 -07:00
2026-06-17 17:33:32 -07:00
2026-06-13 05:40:18 -07:00
2026-06-15 06:29:00 -07:00
2026-06-18 09:09:21 +10:00
2026-06-14 04:51:50 -07:00
2026-06-02 12:37:40 -04:00
2026-06-18 15:25:29 +10:00
2026-06-18 11:34:11 +05:30
2026-06-11 12:31:10 +05:30
2026-06-11 15:06:07 -04:00
2026-06-06 11:46:24 -07:00
2026-06-17 23:59:24 +05:30
2026-06-18 12:38:44 +05:30
2026-06-16 13:09:40 -07:00
2026-06-18 11:28:51 +05:30
2026-06-08 15:21:28 -07:00
2026-06-05 13:30:02 +10:00
2026-05-28 22:26:25 -07:00
2026-06-18 14:14:41 +10:00
2026-06-16 14:30:11 -04:00
2026-06-01 19:52:28 -07:00
2026-06-12 13:42:42 -04:00
2026-06-15 11:55:02 -04:00
2026-06-13 14:50:05 -07:00
2026-05-28 22:26:25 -07:00
2026-06-06 18:33:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-18 21:43:59 -07:00
2026-05-28 22:26:25 -07:00
2026-06-15 12:50:19 -04:00
2026-06-17 18:48:35 -05:00
2026-06-03 07:32:00 +07:00
2026-06-14 00:27:59 -04:00
2026-06-10 15:32:34 +10:00
2026-06-01 16:06:44 +10:00
2026-06-01 13:32:55 +10:00
2026-06-05 02:54:34 -07:00
2026-06-10 17:37:34 -07:00
2026-05-25 15:18:55 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 06:32:42 -07:00
2026-05-28 22:26:25 -07:00
2026-06-17 12:11:31 +10:00
2026-06-17 15:39:04 -05:00
2026-05-28 21:40:39 -07:00
2026-05-27 14:31:55 -07:00
2026-06-16 15:49:59 -07:00
2026-06-08 09:35:22 -07:00
2026-05-29 22:29:48 -07:00
2026-05-27 10:49:33 -07:00
2026-06-01 20:13:42 -07:00
2026-06-08 02:18:21 -07:00
2026-06-18 14:14:41 +10:00
2026-06-14 17:34:11 +07:00
2026-05-27 13:55:51 -07:00
2026-05-28 22:26:25 -07:00
2026-06-13 05:19:44 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 23:22:10 -07:00
2026-05-28 22:26:25 -07:00
2026-06-04 18:04:47 -07:00
2026-06-03 11:22:06 -07:00
2026-05-28 22:26:25 -07:00
2026-06-09 03:17:12 -07:00
2026-06-09 14:03:20 -04:00
2026-05-28 22:26:25 -07:00
2026-06-08 09:35:22 -07:00
2026-05-28 22:26:25 -07:00
2026-06-08 12:11:54 -07:00
2026-06-12 13:42:42 -04:00
2026-06-08 07:03:12 -07:00
2026-06-09 18:49:08 -05:00
2026-06-14 03:20:21 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 05:01:27 -07:00
2026-06-03 06:36:46 -07:00
2026-06-17 16:46:21 -04:00
2026-06-12 08:30:06 -05:00
2026-06-12 14:02:19 -04:00
2026-06-03 12:00:27 -07:00
2026-05-28 22:26:25 -07:00
2026-06-12 02:06:47 -07:00
2026-05-28 22:26:25 -07:00
2026-06-07 17:49:38 -07:00