Repository navigation
Handle corrupt LanceDB reads during resume - #1882
RaghavChamadiya merged 4 commits into
Conversation
|
Additional validation completed: uv run pytest tests/unit/persistence/test_vector_evidence_snippet.py tests/unit/persistence/test_vector_store_batching.py -v 21 passed. Combined with the targeted vector store tests: 49 relevant tests passing. |
|
Thanks @siddheshbhurke. Returning an empty set rather than propagating is the right call for Your CI red is real but it is not your fix, and you cannot reproduce it the way you ran it. All three Pythons fail on one assertion, your new one: The The cause is process-wide state that an earlier test leaves behind. for _name in ("repowise.core", "repowise.server"):
logging.getLogger(_name).setLevel(logging.ERROR)Your logger is
There is no equivalent for stdlib logging, which is the gap you have walked into. The fix on your side is one line at the top of the test: caplog.set_level(logging.WARNING, logger="repowise.core.persistence.vector_store.lancedb_store")Setting the level on the logger itself stops the lookup before it reaches the poisoned ancestor, so it holds regardless of what ran first. Please avoid The wider problem is ours, not yours. That helper mutating global logger levels with no restore is going to keep catching people, and the conftest fixture should cover stdlib levels the way it covers structlog. I will open an issue for it and link this thread. One small thing while you are pushing, non-blocking: there is a single blank line between Add the |
|
Filed the wider problem as #1976, which covers both the missing test-isolation fixture and giving Nothing changes for this PR: the one-line |
d20b923 to
4d5da9f
Compare
|
@siddheshbhurke, an update and an apology for the long gap. Two things changed in your favour. It is no longer conflicting — whatever was colliding on main has since moved, and GitHub now reports this as mergeable. And CI had never actually run on your latest head: the run was sitting at More importantly, the red you saw before was not your code, and the underlying cause now has a fix in flight. The failure was the cross-test logging interaction filed as #1976: @Aman-goel-04's #2011 fixes that properly, with an autouse fixture in So you have two ways forward and I am happy with either:
The guard itself I have no further notes on. Let me know which you would rather do, or just push and I will pick it up. |
|
Thanks @siddheshbhurke for adding the logger-specific The only branch-owned failure left is Ruff I001 in |
|
@siddheshbhurke I approved the workflow run on your That guard compares a committed TypeScript file against the live FastAPI schema. Your branch touches A rebase is all it needs: I verified that guard passes on current main, all 18 cases, so a rebased run should be clean. Two things I confirmed on your branch while I was there, both of which were in doubt in the earlier thread and both of which are fine: the ruff import ordering is fixed in So the guard itself, returning an empty set so resume degrades to regenerating everything, is reviewed and right. Push the rebase and I will merge it on green with no further review. Sorry this has dragged since August. |
# Conflicts: # packages/core/src/repowise/core/persistence/vector_store/lancedb_store.py # tests/unit/persistence/test_vector_store.py
RaghavChamadiya
left a comment
There was a problem hiding this comment.
Thanks @siddheshbhurke, and sorry this waited after the review. Catching the read failure in list_page_ids and telling the user to run repowise reindex, instead of letting resume crash, is the right degradation. To save you a round trip, I merged main into your branch and resolved the two conflicts (the new import and constants block in lancedb_store.py, and the appended tests); your change is untouched apart from putting back a ``IN`` in a comment. Ruff and the 34 vector store tests pass on top of current main. Nothing needed from you, merging.
Summary
Handle corrupted or incomplete LanceDB vector-store reads during resume generation instead of crashing.
Changes
LanceDBVectorStore.list_page_ids()against LanceDB read failures.repowise reindex.Verification
uv run pytest tests/unit/persistence/test_vector_store.py -vCloses #1765