Index sender evidence lookups in schema v12 #139

Merged
Collaborator

Add messages_sender (from_addr, account, message_id) and preserve table scans for account-less people queries. Keep evidence SQL unchanged. Add migration, query-plan and output-parity tests, update schema assertions, and document the migration and new evidence benchmark.

Validation: native package and image builds succeeded; filtered suite passed 551 tests; make check passed with 839 tests, 8 skipped, clean lint, typing and audit.

SQLite 3.40.1 image benchmark: base/head/base/head in one container, 150000 inbox rows plus 30000 Sent rows, five samples per median. Base → head milliseconds, first pair / second pair:

  • Unscoped heavy evidence: 229.330 → 84.207 / 240.250 → 81.959
  • Unscoped typical evidence: 176.249 → 16.009 / 179.882 → 15.652
  • Unscoped people: 557.690 → 591.923 / 592.220 → 601.178
  • Scoped heavy evidence: 296.468 → 159.297 / 309.049 → 171.520
  • Scoped typical evidence: 231.836 → 99.257 / 241.328 → 108.738
  • Scoped people: 574.765 → 601.194 / 615.642 → 616.346

Both head runs printed SEARCH m USING INDEX messages_sender (from_addr=?).

Closes #136
Co-Authored-By: gpt-6.1-sol noreply@openai.com

Add messages_sender (from_addr, account, message_id) and preserve table scans for account-less people queries. Keep evidence SQL unchanged. Add migration, query-plan and output-parity tests, update schema assertions, and document the migration and new evidence benchmark. Validation: native package and image builds succeeded; filtered suite passed 551 tests; make check passed with 839 tests, 8 skipped, clean lint, typing and audit. SQLite 3.40.1 image benchmark: base/head/base/head in one container, 150000 inbox rows plus 30000 Sent rows, five samples per median. Base → head milliseconds, first pair / second pair: - Unscoped heavy evidence: 229.330 → 84.207 / 240.250 → 81.959 - Unscoped typical evidence: 176.249 → 16.009 / 179.882 → 15.652 - Unscoped people: 557.690 → 591.923 / 592.220 → 601.178 - Scoped heavy evidence: 296.468 → 159.297 / 309.049 → 171.520 - Scoped typical evidence: 231.836 → 99.257 / 241.328 → 108.738 - Scoped people: 574.765 → 601.194 / 615.642 → 616.346 Both head runs printed SEARCH m USING INDEX messages_sender (from_addr=?). Closes #136 Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
Add messages_sender (from_addr, account, message_id) and preserve table scans for account-less people queries. Keep evidence SQL unchanged. Add migration, query-plan and output-parity tests, update schema assertions, and document the migration and new evidence benchmark.

Validation: native package and image builds succeeded; filtered suite passed 551 tests; make check passed with 839 tests, 8 skipped, clean lint, typing and audit.

SQLite 3.40.1 image benchmark: base/head/base/head in one container, 150000 inbox rows plus 30000 Sent rows, five samples per median. Base → head milliseconds, first pair / second pair:
- Unscoped heavy evidence: 229.330 → 84.207 / 240.250 → 81.959
- Unscoped typical evidence: 176.249 → 16.009 / 179.882 → 15.652
- Unscoped people: 557.690 → 591.923 / 592.220 → 601.178
- Scoped heavy evidence: 296.468 → 159.297 / 309.049 → 171.520
- Scoped typical evidence: 231.836 → 99.257 / 241.328 → 108.738
- Scoped people: 574.765 → 601.194 / 615.642 → 616.346

Both head runs printed SEARCH m USING INDEX messages_sender (from_addr=?).

Closes #136
Co-Authored-By: gpt-6.1-sol <noreply@openai.com>
svc-agent-writer deleted branch feat/svd-dev-mail-mind-mcp-136-mail-evidence-costs-about-2-s-dc251286 2026-11-02 08:33:20 +00:00
Sign in to join this conversation.
No description provided.