Keep semantic vector scans on their keyset ranges #107
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!107
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/svd-dev-imap-mailmind-mcp-102-keep-the-semantic-vector-s-3057ed21"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Exclude account terms from index selection only in vector keyset scans. Select copy representatives once per scan through copy_key, bound scans by their initial maximum ID, and skip hidden copies without yielding empty chunks.
Add query-plan, scan-stream and byte-for-byte tool-output equivalence tests, plus an opt-in semantic benchmark and README usage note.
Validation: focused suite 382 passed, 5 skipped; make check 754 passed, 8 skipped, with lint, types and audit green. Host benchmarks show a 22.09% reduction in unfiltered scan time with Part 2.
Closes #102
Co-Authored-By: gpt-6.1-sol noreply@openai.com
Architect gate (2026-11-02): Part 2 dropped
Gate ruling R3 makes the image numbers binding. The image is built from
0003f3e(linux/arm64, SQLite 3.40.1). One container alternated three trees five times, each runningscripts/bench_search.py --semanticfrom this PR. The three trees: base170127c, Part 1 alone (170127cplus thekeysetaccount term), and0003f3e(Parts 1 and 2). Medians, ms:vector account=acosts 1.04xvector none(paired 0.89 0.97 1.05 1.02 0.85). On base it costs 20.85x.vector nonecosts 0.97x Part 1 alone (paired 1.76 1.04 0.91 0.77 1.07). The gate asks for 0.8x or less. The host measured a 22% cut, but the host is advisory under R3.Commit
e1a8304removes Part 2 fromstore.py:_vector_copies, the copy maps, thehighbound and the kept-row filter. The per-row copy probes stay. Thekeysetaccount term, the bench and all 96 tests intests/test_vector_scans.pystay. The tests pass on Part 1 alone.Part 2 also cut
vector account=aby about 29% andvector since=by about 12%. These cases are outside the gate as ruled.Checks on
e1a8304:make check: ruff, mypy and pip-audit clean; 762 passed, 18 deselected (the model tests ran).make test-integration: 18 passed against GreenMail and Stalwart.🤖 Generated with Claude Code