Skip to content

fix: avoid SQLite variable limit in thread lookups - #255

Merged
steipete merged 1 commit into
mainfrom
fix/round12-triage
Oct 16, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/round12-triage

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Large neighbors --limit requests fail while hydrating results because ThreadsByIDs binds one SQL parameter per ID plus the repository. More than 32,765 result IDs exceed the bundled SQLite limit.

Pass the IDs through one JSON array parameter using SQLite's existing json_each support. This preserves repository scoping, duplicate and missing-ID behavior, and result ordering in callers, and also fixes the shared lookup used by search and cluster views. No schema or CLI changes are needed.

The regression reproduces the previous too many SQL variables error with 32,768 IDs and now passes, including duplicate IDs, missing IDs, and an ID from another repository. Updated the neighbor documentation and Unreleased changelog. Thanks @masatohoshino for reporting this in #238.

This fixes the SQL-limit portion of #238. The proposed temporal filters and metadata in #239 remain open under their existing product-decision hold.

Validation: focused store regression tests; full make check on AWS Crabbox; independent Codex review through P3 with no findings. PR CI covers Linux, macOS, Windows, and documentation.

@clawsweeper

clawsweeper Bot commented Oct 16, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T21:23:54.908434Z 2a9fee9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@steipete
steipete merged commit 30f625e into main Oct 16, 2026
13 checks passed
@steipete
steipete deleted the fix/round12-triage branch October 16, 2026 21:27
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.

1 participant