Flaky system test: test_embedding_and_rerank_calls_are_in_request_history raises StopIteration
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start in hindsight-system-tests/tests/test_95_model_call_traces.py, at test_embedding_and_rerank_calls_are_in_request_history, and read the polling condition alongside the assertions below it. Update the loop to wait for the recall query row, retain document row, and rerank row associated with the recall trace, then run that system test; it is done when those rows are checked without an intermittent StopIteration.
Written by the indexing model from the issue text.
Description
What happens
hindsight-system-tests/tests/test_95_model_call_traces.py::test_embedding_and_rerank_calls_are_in_request_history fails now and then in CI with RuntimeError: coroutine raised StopIteration (seen on CI run 47121438293, job test-system (blackbox)). It passes locally.
Why
The poll loop stops as soon as any embedding_query trace exists and there is at least one rerank row:
if {"embedding_document", "embedding_query"} <= {r.scope for r in embedding} and rerank:
break
An embedding_query row from another operation (e.g. consolidation) can satisfy that before the recall's own row is flushed (rows are written in batches). The next line then finds no recall row:
query = next(r for r in embedding if r.scope == "embedding_query" and r.operation == "recall")
and next() raises StopIteration inside the coroutine.
What should happen
The loop should wait for the rows it asserts on: an embedding_query row with operation == "recall", an embedding_document row with operation == "retain", and a rerank row with the recall's trace_id.
- Dominant language
- Python
- Stars
- 45.2k
- Forks
- 5.9k
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vectorize-io/hindsight
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#7254 ·
-
Control Plane shows different calendar dates for the same occurrence in Constellation and TimelineOpencore
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
vectorize-io/hindsight#7240 · 1 comment ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vectorize-io/hindsight#7233 ·
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
vectorize-io/hindsight#7231 ·
-
test-embed-windows: test_ui_that_never_answers_hits_the_cap_and_is_terminated fails on WindowsMay be free again A pull request for this issue was closed without being merged. Opencore
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vectorize-io/hindsight#7196 ·
All issues in vectorize-io/hindsight
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day