Uh oh!
There was an error while loading. Please reload this page.
fix: CachedSpanFetcher no longer caches empty results permanently - #79
Conversation
Abhijeet Prasad (AbhiPrasad)
left a comment
There was a problem hiding this comment.
If there are a bunch of scorers running, this will mean that get_spans will keep hitting the network, but I guess that is fine.
| assert result[0].span_id == "span-1" | ||
| @pytest.mark.asyncio | ||
| async def test_empty_then_populated_refetches(self): |
There was a problem hiding this comment.
This is pretty similar to test_handle_empty_results. Can we consolidate?
Removing the approve because of slack convo. Trace scorers should always return results here.
Alex Z (CLowbrow)
left a comment
There was a problem hiding this comment.
seems fine but Abhijeet Prasad (@AbhiPrasad) should approve as well.
Abhijeet Prasad (AbhiPrasad)
commented
Apr 6, 2026
You'll need to rebase to be able to merge, we changed CI to be required to |
Abhijeet Prasad (AbhiPrasad)
commented
Apr 14, 2026
I pushed up some changes to get this in a good state. Will merge in! |
Summary
CachedSpanFetcher.get_spans()was setting_all_fetched = Trueeven when the fetch returned no spans, permanently caching the empty result and preventing future re-fetchesTest plan
test_handle_empty_resultsto verify re-fetch occurs when first call returned emptytest_empty_then_populated_refetchesto confirm spans are returned on retrytest_empty_results_with_type_filterto confirm type-filtered path also handles empty results