You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lifecycle): replay full create payload on finalize upsert
The real-Opik E2E caught an NA-trace regression: the finalize upsert
re-sent only id+output+end_time. But client.trace(id=...) builds a full
CreateTraceMessage — the omitted name/thread_id/input went as null and the
backend's last-write-wins merge clobbered the create, landing an NA trace
(name=None/thread_id=None). start_time also drifted to a fresh now().
The SDK's own Trace.update() docstring documents the fix: re-send the FULL
payload with the same id. So capture the create kwargs on TraceState
(pinning start_time) and replay them + output/end_time on both the finish
and eviction re-sends.
Also made the mock-Opik journal assertion faithful to real Opik
(last-write-wins including nulls) so the cheaper per-PR E2E now reproduces
and catches this NA regression, and added unit guards asserting the
finalize re-send carries name/thread_id/input and the create's start_time.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments