Repository navigation
Index locked passages so context queries skip unpacking archives - #167
Merged
Merged
Conversation
Sync now writes a full-text index of the pinned artifact's passages to .docpull/search/<artifact-sha256>.sqlite. Queries still hash the archive so missing or tampered artifacts fail closed, then read the index read-only instead of unpacking, parsing, and splitting every record. A missing, corrupt, or stale index falls back to the scan path with identical results, and queries never write project files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
admin-raintree
enabled auto-merge (squash)
October 12, 2026 20:16
Bandit B608 flagged the f-string even though every value is bound. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into feat/query-index # Conflicts: # tests/test_context_query.py
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.
docpull querynow reads a full-text index built at sync time instead of unpacking and scanning the whole archive on every call. Results are identical either way.Changes
docpull syncwrites.docpull/search/<artifact-sha256>.sqlite, an SQLite FTS5 index of the passagesquery_contextalready produces. It is built from the same verified records, written to a temp file, and then moved into place. Building is best effort: a failure logs a warning and does not fail the sync.mode=ro&immutable=1, so queries never write project files.Benchmark (synthetic project, 3,000 documents, 120k passages)
1234)retry backoff)The common-term query is dominated by the existing budget loop, which re-serializes the whole payload for every candidate passage. That loop is not changed here.
Checks
tests/test_context_query.py:bun run validate:fullpasses: 1,054 Python tests pass and 18 are skipped. Lint, mypy, the JS SDK, and the reproducible build also pass.🤖 Generated with Claude Code