You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
knowledge-turso: approximate (libsql_vector_idx) search for large sources, chosen by size, never on a multi-organization store #37975
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3
Premise re-read on main 0b539b6: the store creates no DiskANN index because vector_top_k ranks before the organization filter (packages/plugins/knowledge-turso/README.md:49, turso-adapter.ts:189). On hosted, one organization per database (cloud ADR-0114), so that filter is moot there.
Per source, above a passage threshold (default 20k, an option), build a libsql_vector_idx and search via vector_top_k(k × factor), then the metadata filter and the per-hit re-check.
Triage: lands in area:ai · domain:server · Feature · p3 · pm:queue · size M; rationale: maintainer-directed knowledge-topic child (#37000): approximate vector search for large Turso sources, chosen by size and never on a multi-organization store. A scale feature, so p3 as filed. Recorded 2026-11-27T14:16Z.
Claim: PM loop round 9 · area o1-C (epic #37000; area concurrency 8 by the maintainer 2026-11-27T11:26Z) · 2026-11-27T19:52Z
Session: session_016WV4cwPhGV4g9p1BGQaZbP
Account: os-elon-musk
Branch: claude/area-o1C-37975
Worktree: objectstack-issue-37975
Domain: domain:server
Area: o1-C
Seat: repo:objectstack#1
File surface: packages/plugins/knowledge-turso/src/turso-adapter.ts + sql.ts (a per-source passage-count threshold option, a libsql_vector_idx built above it, the vector leg via vector_top_k(k × factor) then the in-scope WHERE and the per-hit re-check; the keyword leg and RRF merge unchanged), knowledge-turso tests (threshold switch, multi-organization store never ANN, recall@10 sample against the exact scan, a latency measurement), packages/plugins/knowledge-turso/README.md (the Search paragraph), content/docs/ai/knowledge-rag.mdx if it names the exact scan, a changeset.
Container & model: M, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: M; an index whose ranking precedes the filter, so the organization rule and the over-fetch factor carry correctness, plus a measured latency and recall)
Clause-②: no
Metadata-protocol: none
Responsibility: objectstack's own code, packages/plugins/knowledge-turso/src/turso-adapter.ts | a search over a source with hundreds of thousands of passages reads every vector on each call | a hosted organization with a large knowledge source
Thread-read: 7220587871
Premise: holds, read on origin/main c151c49 (after #38037) — README.md:49 and turso-adapter.ts:189 / :205 / :217: the vector leg is an exact cosine scan and the store creates no DiskANN index because vector_top_k ranks before the organization filter.
Serial constraints cleared: probe overlap-check (turso-adapter.ts, sql.ts, README.md) against origin/main and every open PR: VERDICT clean exit 0, no PR shares a file. #38037 (hybrid, same search SQL) merged at c151c49, so this card's wait is over. F3 #37957 (visible-ids cap) is not started; the card's "callers whose visible ids fit the F3 cap keep the exact path" lands with whichever of the two lands second, and the PR says so.
Pre-claim lane: packages/plugins/knowledge-*/** ⇒ domain:server.
Pre-claim deps: none open; triage 7220587871 sized it M.
Prior rulings read: card thread 0 rulings (triage 7220587871).
Fold-or-serial: not folded with #37957 (different surface: search options in the service; serial by the rule above).
{
"issue": 37975,
"status": "needs_decision",
"branch": "claude/area-o1C-37975",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38056",
"head": "19841efaf2",
"session": "session_016WV4cwPhGV4g9p1BGQaZbP",
"premise_still_valid": true,
"summary": "A complete build on a generation of vectorIndexThreshold passages or more (default 20,000), all of one organization, now gives that generation an approximate index. The vector leg takes topK x vectorIndexOverfetch (default 40) candidates, runs the unchanged in-scope WHERE over them, re-ranks by float32, and falls back to the exact scan when it comes up short; the keyword leg and RRF are unchanged. The index is a one-bit side table, not the card's libsql_vector_idx: measured at 200k, DiskANN reached recall@10 0.39 after a 24-minute, 2.2 GB build, against 0.998 for the one-bit index after 3 s and 54 MB. The vector leg's p95 is 81 ms where the exact scan's is 1,054 ms. A store with more than one organization in the passage table never takes the ANN path: decided at build and at every search, and pinned by tests.",
"tests": "Lock-held pre-merge (DiskANN design): knowledge-turso typecheck + vitest, Test Files 4 passed (4), Tests 216 passed (216), VERDICT command-exit 0. One-bit design, unlocked and targeted: approximate-index describe Tests 14 passed; recall/options 15 passed. Ablations 1a/1b (organization checks), 2a (post-filter), 2b (over-fetch 1) and 3 (threshold Infinity) were all red as intended (2, 2, 2, 2 and 10 failures), each restored to the HEAD blob. NOT MEASURED on head 19841efaf2: the full knowledge-turso vitest run and typecheck. Reason: four os-verify-lock queue-timeouts (exit 99) at position 2 behind holder pid 28441 (a sibling's verify.sh, 36 min).",
"gates": "overlap-check VERDICT clean exit 0 against origin/main 8d34c4404f plus PRs 38043, 38013, 37982 and 37963. dispatch-gates --commands derived 100 commands at 19841efaf2. NOT MEASURED: the lock never acquired in four attempts, and an unlocked run was refused by the session's permission classifier, so it was not run. PR check-runs: in_progress at report time.",
"dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
"mcp_calls": "0",
"api_writes": "2 — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/38056/assignees), this report comment (POST issues/37975/comments)",
"open_questions": [
{
"question": "Accept the one-bit side-table index in place of the card's libsql_vector_idx/vector_top_k?",
"options": [
"A accept the one-bit index: recall 0.998, 3 s build, p95 81 ms at 200k",
"B revert to DiskANN: recall 0.39 at 200k fails the 0.95 bar, 24 min build",
"C keep the one-bit index but default vectorIndexThreshold to Infinity (opt-in)"
],
"recommendation": "A, because it is the only option measured to meet both acceptance bars (recall at least 0.95 and p95 at 200k) and it keeps the build off the request path at 3 s"
},
{
"question": "Is the organization rule per passage table enough, or must it be store-wide?",
"options": [
"A per passage table, as built: a generation table holds one source",
"B store-wide: count organizations across every source table"
],
"recommendation": "A, because the ANN leak is bounded to the table being ranked, and the cloud store is one organization per database"
}
],
"security_findings": "none",
"out_of_scope_findings": [
"class: none (observation) · reach: bench only · the keyword leg's LIKE for terms under 3 characters and its trigram match for common trigrams cost about 600 ms at 200k passages · carrier: none · dedupe words: knowledge-turso keyword leg LIKE short term trigram latency",
"class: none (unproven) · reach: bench only · native memory grew during bulk upsert until GC ran · carrier: none · dedupe words: libsql native memory upsert growth"
],
"deviations": [
"The card's libsql_vector_idx/vector_top_k mechanism was replaced by a measured one-bit side-table scan (open question 1)",
"Clause-②: the claim says no; declared yes (widening) because two optional public options were added",
"Benchmarks, ablations and the targeted one-bit test runs ran outside os-verify-lock",
"The post-merge lock-held rebuild, typecheck, tests and derived gates are NOT MEASURED (lock saturated)"
]
}
Ruled: A — maintainer Elon (os-elon-musk), decision card in this project's F6 decision thread, tapped at 2026-11-28T00:40:10Z, option text verbatim 「A 采用新索引,默认开启」. Fork: dev report 7229320124 on this card (DiskANN libsql_vector_idx / vector_top_k measured recall@10 0.387 at 200k, capped by the 200-row limit, against the card's 0.95 bar; one-bit side table + float32 re-rank measured 0.998).
Premise corrected: the card named DiskANN as the mechanism. Measured, it cannot meet the card's own recall bar. The ruling keeps the card's outcomes and flow (over-fetch → in-scope WHERE → re-check → RRF, a short leg re-runs exact) and changes the mechanism only.
One-bit index on by default above the existing threshold.
Scoped-recall floor: when the in-scope candidate pool is under 8 × topK, the leg runs exact. Pin a scoped-recall test, and record real-store rows at 10% and 20% in scope in the PR body.
Hosted DDL guard: a refused index or backfill keeps the exact scan, and the build completes; pinned.
The vectorIndexOverfetch minimum follows the floor. The option is unreleased, and the contract review settles it.
The never-over-two-organizations rule is read per passage table (ADR-0114: one organization per cloud database), as the PR body states.
Not in scope: a second approximate attempt for narrowly scoped searches (callers who see about a fifth of the records or less get no speed-up) goes to its own follow-up card, filed by area o1-C.
State: stays pm:dispatched with area o1-C. The cloud seat is notified on objectstack#37457 and asked for one hosted check, non-blocking.
Delivered by PR #38056 (merged e3bdc74 at 2026-11-28T06:46Z), under the maintainer's ruling A (record 7231124445): the new index ships on by default. The one deferred item of that ruling is follow-up #38066 (pm:blocked by PR #38056, which has now merged). Nothing else remains on this card for the area. pm:dispatched removed with this comment.
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3
Activity
objectstack-fleet commentedon Nov 27, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in area:ai · domain:server · Feature · p3 · pm:queue · size M; rationale: maintainer-directed knowledge-topic child (#37000): approximate vector search for large Turso sources, chosen by size and never on a multi-organization store. A scale feature, so p3 as filed. Recorded 2026-11-27T14:16Z.
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
Claim: PM loop round 9 · area o1-C (epic #37000; area concurrency 8 by the maintainer 2026-11-27T11:26Z) · 2026-11-27T19:52Z
Session:
session_016WV4cwPhGV4g9p1BGQaZbPAccount:
os-elon-muskBranch:
claude/area-o1C-37975Worktree:
objectstack-issue-37975Domain:
domain:serverArea: o1-C
Seat:
repo:objectstack#1File surface:
packages/plugins/knowledge-turso/src/turso-adapter.ts+sql.ts(a per-source passage-count threshold option, alibsql_vector_idxbuilt above it, the vector leg viavector_top_k(k × factor)then the in-scope WHERE and the per-hit re-check; the keyword leg and RRF merge unchanged), knowledge-turso tests (threshold switch, multi-organization store never ANN, recall@10 sample against the exact scan, a latency measurement),packages/plugins/knowledge-turso/README.md(the Search paragraph),content/docs/ai/knowledge-rag.mdxif it names the exact scan, a changeset.Container & model: M,
mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: M; an index whose ranking precedes the filter, so the organization rule and the over-fetch factor carry correctness, plus a measured latency and recall)Clause-②: no
Metadata-protocol: none
Responsibility: objectstack's own code,
packages/plugins/knowledge-turso/src/turso-adapter.ts| a search over a source with hundreds of thousands of passages reads every vector on each call | a hosted organization with a large knowledge sourceThread-read: 7220587871
Premise: holds, read on origin/main c151c49 (after #38037) —
README.md:49andturso-adapter.ts:189/:205/:217: the vector leg is an exact cosine scan and the store creates no DiskANN index becausevector_top_kranks before the organization filter.Serial constraints cleared: probe overlap-check (turso-adapter.ts, sql.ts, README.md) against origin/main and every open PR: VERDICT clean exit 0, no PR shares a file. #38037 (hybrid, same search SQL) merged at c151c49, so this card's wait is over. F3 #37957 (visible-ids cap) is not started; the card's "callers whose visible ids fit the F3 cap keep the exact path" lands with whichever of the two lands second, and the PR says so.
Pre-claim lane:
packages/plugins/knowledge-*/**⇒domain:server.Pre-claim deps: none open; triage 7220587871 sized it M.
Prior rulings read: card thread 0 rulings (triage 7220587871).
Fold-or-serial: not folded with #37957 (different surface: search options in the service; serial by the rule above).
objectstack-fleet commentedon Nov 27, 2026
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
os-dev-report
{ "issue": 37975, "status": "needs_decision", "branch": "claude/area-o1C-37975", "pr": "https://github.com/objectstack-ai/objectstack/pull/38056", "head": "19841efaf2", "session": "session_016WV4cwPhGV4g9p1BGQaZbP", "premise_still_valid": true, "summary": "A complete build on a generation of vectorIndexThreshold passages or more (default 20,000), all of one organization, now gives that generation an approximate index. The vector leg takes topK x vectorIndexOverfetch (default 40) candidates, runs the unchanged in-scope WHERE over them, re-ranks by float32, and falls back to the exact scan when it comes up short; the keyword leg and RRF are unchanged. The index is a one-bit side table, not the card's libsql_vector_idx: measured at 200k, DiskANN reached recall@10 0.39 after a 24-minute, 2.2 GB build, against 0.998 for the one-bit index after 3 s and 54 MB. The vector leg's p95 is 81 ms where the exact scan's is 1,054 ms. A store with more than one organization in the passage table never takes the ANN path: decided at build and at every search, and pinned by tests.", "tests": "Lock-held pre-merge (DiskANN design): knowledge-turso typecheck + vitest, Test Files 4 passed (4), Tests 216 passed (216), VERDICT command-exit 0. One-bit design, unlocked and targeted: approximate-index describe Tests 14 passed; recall/options 15 passed. Ablations 1a/1b (organization checks), 2a (post-filter), 2b (over-fetch 1) and 3 (threshold Infinity) were all red as intended (2, 2, 2, 2 and 10 failures), each restored to the HEAD blob. NOT MEASURED on head 19841efaf2: the full knowledge-turso vitest run and typecheck. Reason: four os-verify-lock queue-timeouts (exit 99) at position 2 behind holder pid 28441 (a sibling's verify.sh, 36 min).", "gates": "overlap-check VERDICT clean exit 0 against origin/main 8d34c4404f plus PRs 38043, 38013, 37982 and 37963. dispatch-gates --commands derived 100 commands at 19841efaf2. NOT MEASURED: the lock never acquired in four attempts, and an unlocked run was refused by the session's permission classifier, so it was not run. PR check-runs: in_progress at report time.", "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/38056/assignees), this report comment (POST issues/37975/comments)", "open_questions": [ { "question": "Accept the one-bit side-table index in place of the card's libsql_vector_idx/vector_top_k?", "options": [ "A accept the one-bit index: recall 0.998, 3 s build, p95 81 ms at 200k", "B revert to DiskANN: recall 0.39 at 200k fails the 0.95 bar, 24 min build", "C keep the one-bit index but default vectorIndexThreshold to Infinity (opt-in)" ], "recommendation": "A, because it is the only option measured to meet both acceptance bars (recall at least 0.95 and p95 at 200k) and it keeps the build off the request path at 3 s" }, { "question": "Is the organization rule per passage table enough, or must it be store-wide?", "options": [ "A per passage table, as built: a generation table holds one source", "B store-wide: count organizations across every source table" ], "recommendation": "A, because the ANN leak is bounded to the table being ranked, and the cloud store is one organization per database" } ], "security_findings": "none", "out_of_scope_findings": [ "class: none (observation) · reach: bench only · the keyword leg's LIKE for terms under 3 characters and its trigram match for common trigrams cost about 600 ms at 200k passages · carrier: none · dedupe words: knowledge-turso keyword leg LIKE short term trigram latency", "class: none (unproven) · reach: bench only · native memory grew during bulk upsert until GC ran · carrier: none · dedupe words: libsql native memory upsert growth" ], "deviations": [ "The card's libsql_vector_idx/vector_top_k mechanism was replaced by a measured one-bit side-table scan (open question 1)", "Clause-②: the claim says no; declared yes (widening) because two optional public options were added", "Benchmarks, ablations and the targeted one-bit test runs ran outside os-verify-lock", "The post-merge lock-held rebuild, typecheck, tests and derived gates are NOT MEASURED (lock saturated)" ] }Generated by Claude Code
objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs
维护者速读
Ruled: A — maintainer Elon (os-elon-musk), decision card in this project's F6 decision thread, tapped at 2026-11-28T00:40:10Z, option text verbatim 「A 采用新索引,默认开启」. Fork: dev report 7229320124 on this card (DiskANN
libsql_vector_idx/vector_top_kmeasured recall@10 0.387 at 200k, capped by the 200-row limit, against the card's 0.95 bar; one-bit side table + float32 re-rank measured 0.998).Premise corrected: the card named DiskANN as the mechanism. Measured, it cannot meet the card's own recall bar. The ruling keeps the card's outcomes and flow (over-fetch → in-scope WHERE → re-check → RRF, a short leg re-runs exact) and changes the mechanism only.
Execution (PR #38056):
vectorIndexOverfetchminimum follows the floor. The option is unreleased, and the contract review settles it.o1-C.State: stays
pm:dispatchedwith areao1-C. The cloud seat is notified on objectstack#37457 and asked for one hosted check, non-blocking.objectstack-fleet commentedon Nov 28, 2026
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
Close-out · area o1-C · 2026-11-28T06:46Z
Delivered by PR #38056 (merged e3bdc74 at 2026-11-28T06:46Z), under the maintainer's ruling A (record 7231124445): the new index ships on by default. The one deferred item of that ruling is follow-up #38066 (pm:blocked by PR #38056, which has now merged). Nothing else remains on this card for the area.
pm:dispatchedremoved with this comment.