Skip to content

fix(comm+schedule): SQL pushdown for thread, indexes, read filter (#535)#615

Merged
ohdearquant merged 1 commit into
stagingfrom
show/issue-resolve-v2/comm-pushdown
May 31, 2026
Merged

fix(comm+schedule): SQL pushdown for thread, indexes, read filter (#535)#615
ohdearquant merged 1 commit into
stagingfrom
show/issue-resolve-v2/comm-pushdown

Conversation

@ohdearquant
Copy link
Copy Markdown
Owner

Summary

  • Thread pushdown: comm.thread now pushes $.thread_id predicate into SQL instead of scanning all messages and filtering in Rust (~30 lines of post-filter code removed)
  • Dead index fix: Pack indexes changed from literal WHERE kind = 'message' to WHERE deleted_at IS NULL with kind as indexed column — SQLite can now use them with parameterized queries
  • Read filter fix: New FilterOp::JsonTypeEq / JsonTypeNeMissing variants handle malformed legacy boolean values consistently via json_type() instead of extracted truthiness

Closes #535

Test plan

  • 198 new integration test lines across comm and schedule packs
  • Thread retrieval test verifies only thread messages returned
  • Read filter handles missing, true, false, "true" (string), 1 (numeric)
  • cargo test --workspace (all pass)
  • cargo clippy --workspace --all-targets -- -D warnings (clean)

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ohdearquant ohdearquant changed the base branch from main to staging May 31, 2026 18:21
@ohdearquant ohdearquant merged commit a5d31d2 into staging May 31, 2026
3 checks passed
@ohdearquant ohdearquant deleted the show/issue-resolve-v2/comm-pushdown branch May 31, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

comm/schedule SQL pushdown completeness: thread pushdown, index predicates, read equivalence

1 participant