Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Chrome can commit new history rows to its SQLite write-ahead log before checkpointing them into the main
Historyfile.ChromeHistoryReadercopied only that main file, so indexing a live profile could silently omit recent pages.This replaces the main-file copy with SQLite's online backup API. The reader now snapshots a consistent view of both the main database and committed WAL content into memory, keeps the browser database read-only, and closes both connections on every path.
Regression evidence
uv run --no-project --offline --with pytest pytest tests/test_chrome_history_reader.py -qexited1; the reader returned zero documents while the committed recent row remained in the WAL.0and returned the recent page.Verification
uv run --no-project --offline --with pytest pytest tests/test_chrome_history_reader.py -quvx --from 'ruff==0.12.7' ruff check packages/leann-core/src/leann/readers.py tests/test_chrome_history_reader.pyuvx --from 'ruff==0.12.7' ruff format --check packages/leann-core/src/leann/readers.py tests/test_chrome_history_reader.pypython3 -m py_compile packages/leann-core/src/leann/readers.py tests/test_chrome_history_reader.pygit diff --cached --checkThe full dependency environment could not be synchronized locally because repeated PyPI downloads timed out; the deterministic reader regression and all changed-file checks above completed successfully.
Related Issues
No existing issue or pull request matched this failure after searches for
ChromeHistoryReader, the legacy temporary filename, browser-history WAL handling, and SQLite backup behavior.Checklist
ruff format --check)ruff check)pre-commit run --all-files) — dependency downloads timed out; equivalent changed-file Ruff and diff checks pass