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
test(eval): address PR review feedback on the span-flush race repro
Addresses three points from the Copilot review on this PR:
- Encode input.value as a JSON string in the repro test, matching real
span attribute constraints (a raw dict is not a valid OTel attribute
value and would be silently dropped).
- Add test_get_and_clear_execution_data_flushes_before_reading, which
exercises the real production method through a fake self carrying the
same trace_manager/span_exporter/span_collector/logs_exporter wiring
UiPathEvalRuntime.__init__ sets up - unlike the earlier tests, this one
fails if flush_spans() were removed from _get_and_clear_execution_data.
- Document, in both the test module docstring and the fix's own comment,
that the flush is a snapshot barrier: it closes the race for a span that
has already ended by read time, but not for one belonging to a task
that is still running at that point - there is no handle to await such
a task, and closing that fully is a separate, larger change.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
0 commit comments