Skip to content

feat(knowledge-turso): an approximate vector index for a large source of one organization - #38056

Merged
objectstack-fleet[bot] merged 19 commits into
mainfrom
claude/area-o1C-37975
Nov 28, 2026
Merged

objectstack-fleet[bot] merged 19 commits into
mainfrom
claude/area-o1C-37975

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Fixes #37975

Clause-②: yes (widening)
Metadata-protocol: none
Skills-docs: none — the diff adds two options of one plugin and changes no metadata an author writes; no published skill names the libSQL store's search.

维护者速读

  • 用户能看到什么变化:托管版上单个知识源超过两万段、且只属一个组织时,检索先用一位压缩索引挑候选再精排,20 万段时向量检索从约 1 秒降到约 0.08 秒;只看得到约两成以下记录的检索仍逐条扫描,速度不变。
  • 为什么做:知识中台要支撑工单、拜访记录、邮件这类几十万段的知识源;您已选定方案 A(采用新索引,默认开启),替大知识量的托管客户解决检索慢。
  • 出错会怎样:最坏是结果与逐条扫描略有出入(实测召回率 0.99 以上);数据库不支持这种索引时构建照常完成、退回逐条扫描并在健康检查里写明;多个组织的数据从不走这条路;阈值设为无穷大即可整体关掉。
  • 要你做的:无。

What changes

A libSQL store read every vector in scope on every search: at 1,536 dimensions, about 1.2 GB at 200,000 passages. Now, when a complete build finishes on a generation that holds vectorIndexThreshold passages or more (default 20,000), and all of them belong to one organization, the store gives that generation an approximate index. It is on by default, per the maintainer's ruling A on #37975 (「A 采用新索引,默认开启」, recorded in comment 7231124445).

  • The index. It is a side table, knowledge_SOURCE_gN-vec. It holds each passage's vector quantized to one bit per dimension (F1BIT_BLOB), a 32nd the size of the float32 column. Three triggers keep it in step with every write.

  • The vector leg. The leg takes the topK x vectorIndexOverfetch passages (default 40 per hit) nearest the query's one-bit vector. It runs the unchanged organization, record-scope and metadata WHERE over them (the pool), then ranks the pool by the stored float32 vector.

  • How it feeds RRF. Its ranks feed the reciprocal rank fusion with the keyword leg exactly as the exact scan's ranks did. The keyword leg and the merge are unchanged.

  • The scoped-recall floor. The search runs again as the exact scan in either of two cases:

    • fewer than 8 x topK of the candidates are in scope;
    • the leg is short of topK hits.

    The candidates are ranked before the filter, so a thin pool would re-rank the wrong neighbours. The second case exists because the service reads a short answer as "the source holds no more". The real-store rows are under Acceptance notes.

  • Never over two organizations. The candidates are ranked before the filter.

    • A generation that holds passages of more than one organization gets no index. Passages with no organization count as one more.
    • Every search also reads the -org index (min, max, and EXISTS ... IS NULL: three seeks). It takes the exact scan as soon as a second organization's passage is written.
    • This is decided per passage table: a generation table holds one source, and a cloud store is one organization per database (ADR-0114).
  • When the index is built. At the end of completeBuild, before the switch transaction, and never on a search.

    • It is filled 2,048 passages per transaction on the per-client queue, so a search waits behind at most one batch.
    • At 200,000 passages this took 2.6 to 3 s and 54 MB.
    • A source that grows past the threshold between builds keeps the exact scan until its next complete build: os knowledge rebuild, a fingerprint change, the boot build or the daily reconcile.
  • A database that refuses the index. The source keeps the exact scan, and the build completes.

    • A probe of vector1bit runs before any DDL. It has to come first: SQLite creates a trigger that names an unknown function without complaint, and that trigger would then fail every passage write.
    • A refused DDL transaction rolls back.
    • A refused copy batch ends the copy. The side table's count then differs from the passage table's, so it is never searched, and the next complete build resumes the copy.
  • The refusal is signalled through the existing healthCheck(). The service's health endpoint reads it, and the plugin logs it at boot.

    • A database without one-bit vectors is named from boot.
    • Each source whose build had its index refused is named with the reason, until a later build makes the index or the source is dropped.
    • So the healthCheck() line is how an operator tells whether a hosted database refused a source's index: a source it names runs the exact scan for that reason. A source it does not name may still run the exact scan for another reason above: two organizations, under the threshold at its last complete build, or a narrow scope.
    • ok stays true, and a store whose index works keeps the message libSQL vectors ready unchanged.
    • The record is kept by the process that ran the build, until it restarts.
  • What a search reads to choose the index.

    • The index memory is now keyed per generation instance.
    • A process reads the catalog for an instance's index once (two reads) and remembers the answer. A build remembers what it found in its own process, so a source under the threshold costs no catalog read there, and two reads once in any other process.
    • With vectorIndexThreshold: Infinity, a search never reads the catalog for an index; an index made earlier under a finite threshold stays in place and is not searched.
    • A failed approximate statement forgets that memory and is answered by the exact scan.
    • The one cost left: an index that another process completes inside the active generation is used here after this process's next complete build of the source, or a restart. A search that takes the index also reads the organization index (three seeks).
  • The candidate count is bound only where it is read, by the approximate statement. The exact statement binds exactly the values it reads, so a query without a keyword term leaves no surplus value.

  • Lifecycle and safety.

    • A generation swap and dropSource drop the side table, the -org index and the triggers together with the generation's passage table.
    • The shape checks run before any drop. An object under one of those names that the store did not make refuses the call SERVICE_UNAVAILABLE, names the object, and is never dropped.
  • Options. vectorIndexThreshold (Infinity turns the index off) and vectorIndexOverfetch, on both KnowledgeTursoPlugin and TursoKnowledgeAdapter. Exports VECTOR_INDEX_THRESHOLD and VECTOR_INDEX_OVERFETCH.

    • For the contract review: vectorIndexOverfetch must be a whole number of 8 or more, and the constructor throws RangeError below 8. The minimum follows the 8 x topK floor: a smaller over-fetch could never answer approximately and would only add a one-bit scan to every search.
    • The option is new in this PR and unreleased. Against main the PR only widens; the 8 is a narrowing of what this PR first offered (1 or more), and the ruling leaves it to the contract review.
  • Docs. The README Search section, and the two docs pages where they name the exact scan.

The mechanism is not libsql_vector_idx / vector_top_k; the ruling keeps the card's outcomes and changes only this. I built the card's mechanism first (commits 09b0571582 and earlier) and measured it at 200,000 passages:

Measure at 200,000 passages DiskANN (libsql_vector_idx) One-bit index (this PR)
Build time 1,439 s 3 s
Extra memory to build 2.2 GB 54 MB
recall@10, vector only 0.387 0.998
recall@10, hybrid 0.716 1.000
  • DiskANN never got past 0.46 at any k, since vector_top_k caps at 200 rows. At 20,000 passages the best setting I tried reached 0.845, at 13 ms per row and 1.27 GB.
  • The card's flow holds: over-fetch, then the in-scope WHERE, then the service's re-check, then RRF, and a short leg re-runs exactly.

Out of scope here:

Tests

New and changed tests in src/__tests__/acceptance.test.ts, run on each store kind (file, memory) with a threshold of 40:

  • Threshold. At the threshold, the vector leg is approximate. At 61, or at Infinity, it stays exact.

  • Organizations. Each of these takes the exact path: two organizations at build time; a second organization written after the build; a passage with no organization.

  • Filter, over-fetch and the floor.

    • A metadata filter that the candidates miss falls back to exact (over-fetch 8).
    • With over-fetch 10 and topK 2, a scope of all but the two best passages keeps 18 or more of the 20 candidates, at or above the floor of 16, and stays approximate.
    • With the same settings, a scope of 2 records is under the floor and goes exact.
  • Refused index. Three variants:

    • ann_no_1bit: the database creates the DDL, as SQLite does, and refuses each statement that computes vector1bit.
    • ann_no_ddl: the database refuses the F1BIT_BLOB column.
    • ann_no_copy: the database makes the index and refuses the copy batch.

    In all three, the build completes, later writes are found by the exact scan, and healthCheck() stays ok and names the source and the reason (plus the missing one-bit vectors for ann_no_1bit). No index objects are left for the first two. For ann_no_copy the index is there, short of its passage table, and is never searched. After dropSource the source is no longer named.

  • Catalog reads. A search under the threshold, or at Infinity, issues no catalog read for an index, on each store kind. On one file store, a second adapter reads the catalog of a source under the threshold once (two reads) over three searches.

  • Case timeouts. The two 2,000-passage recall cases carry a 30 s timeout: 1,017 ms and 1,384 ms locally, and 5,971 ms for the scoped case on CI, past the 5 s default.

  • A term-less query. It binds exactly the values each vector statement reads: an approximate answer, then an approximate statement and the exact one for a scope under the floor.

  • Two adapters on one file store.

    • The index memory is keyed per generation instance.
    • A failed approximate statement is answered by the exact scan, and its memory is forgotten.
  • Lifecycle.

    • The triggers keep the side table in step on insert, update and delete.
    • A generation swap leaves only the new generation's objects.
    • dropSource leaves nothing.
  • Growth. A source that grew past the threshold gets its index at its next build.

  • A foreign -vec table. It refuses completeBuild and dropSource with SERVICE_UNAVAILABLE and is kept.

  • Recall. recall@10 is at least 0.95 against the exact scan in two tests:

    • unscoped: 2,000 passages, 40 queries;
    • under a record scope keeping 10%, 5% and 3% of 2,000 passages: measured 1.000 at each share.
  • Options. RangeError for a threshold below 1 and for an over-fetch of 7 or 8.5; 8 is accepted.

plugin.test.ts checks that the plugin passes both options through.

Ablations: each an on-disk source edit run through vitest, each red as intended, each restored to a blob equal to HEAD with an empty git diff HEAD. Ablations 1a to 3 ran on the first design. Ablations 4 to 15 ran on b113f0830f under the verify lock; the later merge of main does not touch this package's files.

Ablation What I changed Result
1a Search-side organization check returns true Two-organization test red: approximate 1, exact 1
1b Build-side organization check removed Two-organization test red: 5 index objects found
2a Post-filter dropped Filter test red: published instead of draft
2b Over-fetch factor 1 Over-fetch test red
3 Threshold forced to Infinity Every approximate-path test red
4 The 8 x topK floor removed 2 failed: the over-fetch test on both store kinds ({approximate: 1, exact: 0} instead of exact: 1)
5 The vector1bit probe before the DDL disabled 2 failed: 5 index objects instead of none
6 The catch around the DDL transaction removed 2 failed: completeBuild rejects
7 The health check's one-bit probe disabled 2 failed: the message does not name the missing one-bit vectors
8 The health check's per-source refusal record ignored 2 failed: the message does not name the source
9 The index memory not keyed per generation instance 1 failed: the instance test, {approximate: 1, exact: 1} instead of {approximate: 0, exact: 1}
10 The catch around the approximate statement removed 1 failed: the failed-statement test throws no such table
11 The catch around a copy batch rethrows 2 failed: ann_no_copy on both store kinds, completeBuild rejects
12 The Infinity skip of the catalog read removed 2 failed: an adapter that did not build the source reads 2 catalog rows instead of 0
13 The build's own "no index" verdict not remembered 2 failed: 2 catalog reads under the threshold instead of 0
14 A search's "no index" answer not remembered 1 failed: another adapter reads the catalog 6 times instead of 2
15 The candidate count bound for both statements 2 failed: the exact statement binds 4 values and reads 3

The scoped-recall unit test stays green with ablation 4 (0.997, 0.993, 0.963). It guards recall; the over-fetch test is what pins the floor.

Local runs on the final head 73d2774 (origin/main 6e06729 merged)

On 73d2774 (test timeouts and wording only, on top of 50e245a), under the lock: typecheck exit 0, Tests 256 passed (256); the four derived gates that read the changeset and README exit 0 (check-changeset-no-major, check-empty-changeset, check:nul-bytes, check:published-readme-links). The 100-family union below is from 50e245a.

All under os-verify-lock, slot o1C-37975, VERDICT command-exit 0; the lock was held 1,544 s after a 201 s wait.

Acceptance notes

  • Measured, unscoped, at 200,000 passages of 1,536 dimensions. The vectors are clustered synthetic data (latent dimension 384, 200 clusters), all of one organization, topK 10. The box was shared, with a load of about 8 on 4 cores. The script is a scratch bench.mts, not committed.

    Search Exact scan, p50 / p95 One-bit index, p50 / p95
    Vector leg only (the keyword leg matches nothing) 958 / 1,054 ms 66 / 81 ms
    Hybrid 1,416 / 1,544 ms 550 / 666 ms
    • The slowest approximate vector-only search took 104 ms.
    • recall@10 against the exact scan, over 100 queries: 0.998 vector-only, 1.000 hybrid.
    • Building the index took 2.6 to 3.0 s, with the database file going from 1,714 to 1,768 MB.
  • Measured, scoped, on the same 200,000-passage store: 50 vector-only queries per share, a record scope, against the exact scan of that scope. The "old rule" answers whenever the pool fills topK, computed in SQL on the same store.

    In scope recall@10 (floor 8) Worst query Sent exact p50 / p95 Old rule: recall, worst
    10% 1.000 1.0 100% 952 / 993 ms 0.952, 0.7
    15% 1.000 1.0 100% 974 / 1,013 ms 0.980, 0.9
    20% 0.992 0.9 48% 395 / 1,052 ms 0.986, 0.9
    • Floor 4 against floor 8. With a floor of 4 x topK, the same bench gave 0.970 at 10% in scope, with a worst query of 0.7 and 44% of queries sent exact. With 5% and 3% in scope, floor 4 already sent every query exact (recall 1.000), where the old rule gave 0.914 and 0.878.
    • The simulation agrees. The reviewer's numpy simulation (scoped-recall-floor8-retry-sim.py, run under the verify lock) gives, at floor 8: 41% exact and 0.988 at 20%, 99% exact at 15%, 100% exact at 10% and below.
  • Caveats.

    • Synthetic vectors only. No real embeddings were tried. Real embedders put their vectors in a narrower cone, and one-bit quantization keeps the signs of the coordinates. So on real data the one-bit ranking's recall may be lower than measured here, and the right vectorIndexOverfetch may be higher.
    • The one-bit leg is still a linear scan. It is 13 to 15 times cheaper than the float32 scan. Extrapolated linearly, that is roughly 0.35 to 0.4 s at 1,000,000 passages of one source, with no structure that cuts the work below linear.
    • The hybrid p95 is the keyword leg's. 666 ms, against 81 ms for the vector leg alone. The cost is the keyword leg: LIKE for terms under 3 characters, and the trigram match for common trigrams, on an adversarial bench vocabulary where every word starts with term. This PR does not touch that leg, and no card covers it yet.
    • Only broad searches speed up. A search whose scope or filter keeps about 15% of a source's passages or less runs the exact scan. Its recall holds, and it costs what it cost before this PR (about 1 s at p95 at 200,000 passages).
    • One hosted check is asked for. On a hosted (Turso) database, after a complete build of a source of 20,000 passages or more, confirm that the knowledge_SOURCE_gN-vec side table exists. The one-bit vectors and the DDL have only run on local file: and :memory: stores here. If it is missing, the health check names the reason.
    • Nothing is logged at build time. The adapter has no logger, so a refusal shows only in the health check's message.
  • The organization rule is per passage table, not store-wide, as the ruling confirms. Pinned in both directions (ablations 1a and 1b).

  • Clause-②: yes (widening), re-judged on the final diff. Two optional adapter and plugin options and two exported constants are new. Nothing that was accepted before is refused, with one exception: an object the store did not make under one of its new hyphenated names (knowledge_SOURCE_gN-vec, -org, or a -vec-* trigger) now refuses completeBuild, dropSource and the opening of a generation with SERVICE_UNAVAILABLE. That is the rule main already applies to the keyword index's names, and the changeset states it. The claim's no is corrected here. Both options are code options, not stored metadata: Metadata-protocol: none.

  • Out-of-scope, noted and not filed:

    • The keyword leg's cost, as above.
    • Bulk upsert grew native memory under the bench until GC ran. Not shown in production.

Verification

Read first, by risk:

  1. turso-adapter.ts, buildVectorIndex: the probe, the guarded DDL transaction, the batched backfill against a generation being swapped away, and the refusal record.
  2. turso-adapter.ts, searchAttempt and approximateSearchable: the pool count, the 8 x topK floor, the per-search organization check, and the short-leg fallback.
  3. sql.ts, vectorIndexDdl and vectorIndexShape: the triggers and the shape check before a drop.

Two-minute check:

pnpm --filter @objectstack/knowledge-turso exec vitest run --maxWorkers=2 src/__tests__/acceptance.test.ts -t "approximate vector index"

Expected: every test passes, on both store kinds. Then edit searchAttempt: change pool >= VECTOR_MIN_POOL * topK && to nothing, and run it again. The over-fetch test turns red with { approximate: 1, exact: 0 }.


Generated by Claude Code

…owledge docs; plugin options

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
… of libSQL's DiskANN index

DiskANN measured a recall@10 of 0.39 at 200,000 clustered passages and took
24 minutes and 2.2 GB to build; a one-bit side table scanned whole and
re-ranked by the float32 vectors measured 0.99, 3 s and 54 MB.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
… index at 200,000 passages

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 27, 2026
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/knowledge-turso, touching 35 documentable anchor(s). ⚠️ 2 changed file(s) yielded no anchor (packages/plugins/knowledge-turso/README.md, packages/plugins/knowledge-turso/src/index.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/ai/knowledge-rag.mdx (via vectorIndexThreshold (symbol, a field of class TursoKnowledgeAdapter; a field of interface KnowledgeTursoPluginOptions; a field of interface TursoKnowledgeAdapterOptions))
  • content/docs/plugins/index.mdx (via healthCheck (symbol, a method of class TursoKnowledgeAdapter))
  • content/docs/protocol/kernel/lifecycle.mdx (via healthCheck (symbol, a method of class TursoKnowledgeAdapter))
  • content/docs/protocol/kernel/plugin-spec.mdx (via healthCheck (symbol, a method of class TursoKnowledgeAdapter))
  • content/docs/protocol/knowledge.mdx (via completeBuild (symbol, a method of class TursoKnowledgeAdapter), dropSource (symbol, a method of class TursoKnowledgeAdapter), healthCheck (symbol, a method of class TursoKnowledgeAdapter), vectorIndexOverfetch (symbol, a field of class TursoKnowledgeAdapter; a field of interface KnowledgeTursoPluginOptions; a field of interface TursoKnowledgeAdapterOptions), vectorIndexThreshold (symbol, a field of class TursoKnowledgeAdapter; a field of interface KnowledgeTursoPluginOptions; a field of interface TursoKnowledgeAdapterOptions))

⛔ 1 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-0.mdx (via healthCheck (symbol, a method of class TursoKnowledgeAdapter))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 2 changed file(s) yielded no anchor (packages/plugins/knowledge-turso/README.md, packages/plugins/knowledge-turso/src/index.ts) — pages documenting those are invisible to this run
  • 1 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 2 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from d6db67f4c5b1ae1e6ffed4f55fe4f24c6e8706e8 — the merge of head 73d277418b303a87e50e4fd79592b6035f37fed5 into base 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d6db67f4c5b1ae1e6ffed4f55fe4f24c6e8706e8 && git checkout d6db67f4c5b1ae1e6ffed4f55fe4f24c6e8706e8
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 73d277418b303a87e50e4fd79592b6035f37fed5 && git checkout -B drift-repro 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 && git merge --no-ff 73d277418b303a87e50e4fd79592b6035f37fed5

node scripts/docs-audit/affected-docs.mjs --json 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 33a0d4fa625cdfb69873a89a1e0f5d9f49fea744 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

…both keep the exact scan

The approximate vector leg now answers only when at least 4 x topK of
its candidates are in scope; a narrow record scope or filter runs the
exact scan instead of re-ranking a thin pool. vectorIndexOverfetch is
now a whole number of 4 or more to match.

A database that refuses vector1bit or the side table's DDL gets no
index: a probe runs before any DDL (a trigger naming an unknown
function is created without complaint and then fails every write), a
refused DDL transaction rolls back, a refused backfill batch ends the
copy, and the build completes on the exact scan.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
… and refuses each statement that computes one

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…ector index

A database without one-bit vectors is named by healthCheck's message at
boot (the plugin logs it), and each source whose complete build had its
index refused is named with the reason until a later build makes it or
the source is dropped. ok stays true: the index is a speed-up, and a
store whose index works keeps the message it had.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…dates in scope, and the over-fetch 8 or more

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · c77819e · 2026-11-28T01:21Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: TIER_DEFAULT
Head-sha: c77819e170c953e0c32048b7c8209d2e07673d2c
Local-runs: none

Read: card #37975 body and all four comments (triage 7220587871, claim 7226962676, dev report 7229320124, ruling A 7231124445); PR #38056 body, both comments, the ten-file net diff against the merge-base with main; the check-runs on the head. Nothing was built or run.

Check-runs as read on this head: every completed run is success or skipped, except one Check Changeset run cancelled beside two success runs of the same name. Still in_progress when read: Test Core shards 1 to 8 of 10, Lint · CI, release & engine gates, Type Check · consumer gates. This record does not judge green; the lane does.

① Derived judgments

Public surface the diff implies, each named:

  • Two new optional options, vectorIndexThreshold and vectorIndexOverfetch, on TursoKnowledgeAdapterOptions and KnowledgeTursoPluginOptions. Right, a widening. Neither name exists anywhere on origin/main (tree-wide grep, changesets and changelogs included), so neither is released.
  • Two new exports, VECTOR_INDEX_THRESHOLD (20000) and VECTOR_INDEX_OVERFETCH (40). Right, a widening.
  • RangeError for vectorIndexOverfetch that is not a whole number of 8 or more (ruling A, item 4). Right, and not a narrowing: the option is new in this PR and in no release, so no caller on main or on any published version can pass a value that is now refused. The minimum follows the floor correctly: the in-scope pool can never exceed topK × vectorIndexOverfetch, and the leg's answer stands only at a pool of 8 × topK or more, so a value under 8 could never answer approximately and would only add the one-bit scan to every search. At exactly 8 the approximate answer stands only when every candidate is in scope, which is coherent. Settled: 8 holds.
  • RangeError for vectorIndexThreshold that is NaN or under 1; Infinity accepted. Right, new option, same reasoning.
  • Default behavior change: above 20,000 passages of one organization, after the next complete build, the vector leg ranks through the one-bit index. Right, and stated plainly in the changeset (default named, recall 0.998 against the exact scan named, "keeps the exact scan until its next complete build"). Ruled on by the maintainer (ruling A, item 1). Not a narrowing of what a caller could rely on:
    • Score semantics are unchanged. The score is still the reciprocal rank fusion of the two legs' ranks 1 to topK, normalized into (0, 1]; KnowledgeHitSchema describes the score as adapter-specific, higher is better, normalised to [0, 1] when feasible. The approximate leg re-ranks by the stored float32 vector with the same order and the same cut at a cosine distance of 1, so a rank means what it meant.
    • Hit membership may differ from the exact scan (approximate by design). The published spec promises no exact nearest-neighbour membership; only this package's README did, and the README is rewritten in the same diff.
    • Hit count never drops: the approximate answer stands only when the vector leg ranks topK hits; otherwise the exact statement runs.
  • New refusal: an object the store did not make under knowledge_SOURCE_gN-vec, -org or a -vec-* trigger name now refuses completeBuild, dropSource and the opening of a generation with SERVICE_UNAVAILABLE. Judged right and not arm-changing: the names are hyphenated names beside the store's own passage table, which no source, generation or object name can hold, the same rule main already applies to the keyword-index names, and the changeset states it. nit: the PR body's sentence "nothing that was accepted before is refused" is not literally true for this one hand-made-object case; say so there.
  • healthCheck() message. ok stays true; the message is unchanged when the index works and gains notes otherwise. Right.

Tenancy (rule: the candidates are ranked before the filter, so an index is never used over more than one organization, per passage table):

  • Build: the organization count is read inside the same transaction that makes the index DDL; more than one organization (no organization counts as one more) commits the organization index alone and no side table. Holds.
  • A later write of a second organization's passage: the organization count is read from the passage table at every search that would take the index, never cached. Holds.
  • Search: both statements, approximate and exact, carry the identical in-scope WHERE (organization, record scope, metadata filter) with the same bound values, the keyword leg is unchanged, and the final join reads only chunk ids the legs produced. The exact fallback therefore cannot return a passage out of scope, and neither can the approximate statement, whatever the organization count is. Holds.
  • Scoped-recall floor and short-leg re-run: the approximate answer stands only when the in-scope pool is 8 × topK or more AND the vector leg ranks topK hits; an empty result reads as pool 0 and re-runs exactly. Holds, and the floor is pinned by the over-fetch test (ablation 4).
  • N1 (nit) — rule level: the per-search organization read and the search statement are two statements, not one transaction. Isolation does not depend on the pair being atomic (the WHERE enforces it) and recall is covered by the floor, so the rule "never used over two organizations" is held up to that window, not absolutely.
  • S1 (should-fix) — rule level: the "this table's index is complete" fact is remembered per process and is invalidated only by that process's own drops. The README sentence "a side table short of its passage table is never searched" and the fallback to the exact scan therefore hold within one process, not across the processes the README says may share a store. No out-of-scope passage can result; a failed or thin search can.

Hosted DDL guard (ruling A, item 3):

  • A database that does not compute one-bit vectors: probed before any DDL; no object is made; the build completes; the source keeps the exact scan. Holds, pinned (ann_no_1bit).
  • A refused DDL transaction rolls back whole; the build completes on the exact scan. Holds, pinned (ann_no_ddl, ablation 6).
  • A refused copy batch ends the copy; the side table's count differs from the passage table's, so it is not searched; the build completes. Holds by reading. S2 (should-fix) — this half is not pinned by a test of its own. Both pinned variants stop before the copy runs, and ruling A item 3 says "a refused index or backfill ... pinned". Add a variant that accepts the DDL and refuses the INSERT ... SELECT batch.
  • healthCheck() names the missing one-bit vectors for the whole store, and each refused source with its reason. Holds, pinned. N2 (nit) — the per-source record is process memory. It is lost on restart and is not seen by another process (for example a server whose index was refused during a CLI rebuild) until that process's own next complete build; the README's "until a later build makes the index" reads as durable.

Other findings:

  • S3 (should-fix) — every vector search of a passage table without a complete index now adds two catalog reads (sqlite_master and pragma_table_info) before the search statement, including for every source under the threshold and when vectorIndexThreshold is Infinity. On a hosted database that is two more round trips per search for deployments that get nothing from the index, and neither the changeset nor the README says so. Skip the read when the threshold is Infinity, and remember a negative answer for a bounded time or until this process's next complete build.
  • S4 (should-fix) — unverified on hosted: the candidate count is bound for both statements, but the exact statement does not use it. When the query yields no keyword term (punctuation only) it is a trailing unused positional value. The local stores accept that (the suite ran green locally per the PR body); whether a hosted server refuses a surplus positional value was not checked. Bind it only for the approximate statement, or have the requested hosted check include a term-less query.

Docs, README and changeset against the code: the thresholds, the 2,048-row batches, the topK × vectorIndexOverfetch candidates, the 8 × topK floor, the short-leg re-run, the per-search organization read, the object names, the drops by a switch and by dropSource, and the two options all match. Measured numbers are the dev's and were not re-measured. N3 (nit) — content/docs/protocol/knowledge.mdx still says "an exact scan by cosine distance" in the Search bullet of section 4.2 and "exact scan" in the knowledge-turso row of the adapter table near line 1306.

② Semver level

  • Changeset .changeset/knowledge-turso-approximate-index.md: @objectstack/knowledge-turso at patch. Correct: a non-protocol change ships patch (AGENTS.md, changeset rule), and the diff moves no other package.
  • Clause-②: yes (widening): true. Two options and two exports are added; no export, option or accepted value on main is removed or refused; the one new minimum is on an option this PR introduces. The line is identical in the PR body and the changeset.
  • Metadata-protocol: none: true. Both options are constructor options in code; nothing a metadata author writes changes, and no file under packages/spec is in the diff.
  • No BREAKING banner is owed.

③ Boundary flags

  • open_questions 1 (one-bit side table in place of libsql_vector_idx): answered by ruling A in 7231124445, option A, on by default.
  • open_questions 2 (organization rule per passage table or store-wide): answered by ruling A item 5, per passage table.
  • Deviation "Clause-② declared yes (widening), the claim said no": correct on the final diff, see ②.
  • Deviations "tests and gates not measured under the lock" (head 19841ef): superseded by the PR body's lock-held runs on c77819e; the head's check-runs are still in progress, see the top of this record.
  • Ruling item 2 (scoped-recall pin, real-store rows at 10% and 20% in the PR body): present (rows at 10%, 15% and 20%; the scoped-recall test and the over-fetch test).
  • Ruling item 6 (follow-up card for a second approximate attempt on narrow scopes): the PR body says it is to be filed; no card number is given in the body. The area reports it filed as knowledge-turso: a scoped vector search under the 8 x topK floor tries a second, wider approximate pass before the exact scan #38066; the body should name it.
  • The hosted check asked of the cloud seat is non-blocking by the ruling; not answered when read.
  • SQL push-down (Prime Directive 5): no finding. Candidate selection, the in-scope filter, the float32 re-rank, the pool count and the backfill (INSERT ... SELECT, keyset batches) all run in SQL; no id set is materialised in the application and no join is done in-app.

Open on this head: S1, S2, S3 and S4 (cross-process index-complete memory; a pin for a refused copy batch; the per-search catalog reads; the surplus bound value on a term-less exact search). Each earns a delta review of its fix. N4 (nit) — the PR body's "nothing that was accepted before is refused" is slightly too strong: a foreign object under one of the store's new hyphenated names is now refused, as the changeset states. Nits N1 to N4 are optional.

Implemented-by: claude/area-o1C-37975
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): REWORK at head c77819e170c953e0c32048b7c8209d2e07673d2c (Fixes #37975, ruling A 7231124445).

Review summary

Face. The face is declaration (TIER_DEFAULT): there is no packages/spec/src/** path, no governed rule text and no narrowing. Ruling item 4 is settled. vectorIndexOverfetch and vectorIndexThreshold are new in this PR: neither appears on main or in any released changeset or changelog. A minimum born with the option narrows nothing. The minimum of 8 follows the floor, because the in-scope pool can never exceed topK × overfetch and the approximate answer stands only at a pool of 8 × topK or more. Clause-②: yes (widening), patch and Metadata-protocol: none are right. Score semantics stay within KnowledgeHitSchema's description. The PR stays Tier S.

Contract review. Declaration record 7231688504 has no must-fix. It does have four graded should-fix findings, S1 to S4, so the queue guard reads them as open on this head. Each needs its fix and a delta read.

  • S1: the index-complete memory is per process and is not invalidated by another process's drop and rebuild, while the README says several processes may share a store. No passage out of scope can result, but a search in another process can fail or rank thin. The mechanism goes to the area privately.
  • S2: ruling item 3 asks for a pin on a refused backfill. Both pinned variants stop before the copy runs. Add a variant that accepts the DDL and refuses a copy batch.
  • S3: every vector search of a table without a complete index adds two catalog reads. That includes sources under the threshold and vectorIndexThreshold: Infinity, so a hosted store pays two more round trips for nothing. Skip the read in those cases, and either state the remaining cost or remember the answer.
  • S4: the candidate count is bound for the exact statement too, where a term-less query leaves it as a surplus positional value. Bind it only where used, or have the hosted check include a term-less query.

What holds. Tenancy holds on the build, on a later second-organization write and on the search. The approximate and exact statements share the identical in-scope WHERE and bound values, so neither returns a passage out of scope. The scoped-recall floor and the short-leg exact re-run hold. A refused index keeps the exact scan, and the build completes. healthCheck names the cause.

Nits, optional:

  • N1: the organization read and the search are two statements.
  • N2: the refusal record is process memory.
  • N3: two leftover "exact scan" sentences in knowledge.mdx.
  • N4: the body overstates "nothing accepted before is refused".

The body should also name follow-up #38066 for ruling item 6.

Gates. CI was still running at this reading. The next head needs every check green.

Next: fix S1 to S4. Then a delta declaration record and a delta L1 follow, and the area lands it.

…stance; reads and bound values only where used

The approximate-index memory is now keyed per generation instance, and a
failed approximate statement is answered by the exact scan. A search at
vectorIndexThreshold Infinity reads no catalog for an index, and a build
remembers what it found, so a source under the threshold costs no catalog
read in its own process and two reads once in another. The candidate
count is bound for the approximate statement alone. A refused copy batch
is pinned beside the refused probe and DDL. The protocol doc's two
leftover exact-scan sentences now name the approximate index.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 50e245a · 2026-11-28T04:42Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 50e245a081eaf109a3bc9e3d7f1717e2332f50e7
Local-runs: none

Delta round on the record in comment 7231688504 (head c77819e), which left S1 to S4 open. Face unchanged: declaration, plus the published option surface.

Read: the first-parent moves c77819e to 50e245a (f5d171e main merge, 98ffbe4, b113f08, 50e245a main merge); the author delta git diff 98ffbe4340^ b113f0830f (five files); the net diff against the merge-base with main at the head; PR body v3; the PR comments; card #37975 comments; issue #38066; the check-runs on the head. Nothing was built or run.

Check-runs on this head, read at 04:44Z: every completed run is success or skipped. Still in_progress: Test Core shards 1 to 10, Type Check · consumer gates, Lint · CI, release & engine gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · scoped · slot lookup & corpus. This record does not judge green; the lane does.

Not found when read: the area's announcement comment on the PR and a new dev report on #37975. The PR thread holds the docs-drift comment, the two review claims, the earlier record and the L1 verdict; the card still holds its four earlier comments. The PR body v3 was read in their place.

① Derived judgments

Closures of the earlier findings:

S1 (should-fix): closed

The index memory is keyed per generation instance, with a catch backstop on the approximate statement. Pinned by two acceptance tests. The backstop runs the exact statement, which carries the same in-scope WHERE.

S2 (should-fix): closed

A third refusal variant, ann_no_copy, accepts the index DDL and refuses the copy batch. It pins that the build completes, the index objects are there and short of the passage table, the search runs the exact scan, and the health check names the source with "the database refused its copy". Ruling A item 3 is now pinned in both halves.

S3 (should-fix): closed

At vectorIndexThreshold: Infinity a search reads no catalog for an index. Otherwise a process reads it once per generation instance and remembers the answer either way; a build records what it found for its own process. Pinned (under the threshold, at Infinity, a second adapter that did not build the source). The cost that remains is stated in the README and the PR body: an index another process completes inside the active generation is used after this process's next complete build of the source, or a restart.

S4 (should-fix): closed

The candidate count is bound for the approximate statement alone, after every other value; the exact statement binds exactly the values it reads. Pinned by a test of a query without a keyword term.

Earlier nits: N3 (the health check's refusal record is process memory) is closed by a README sentence and a PR-body line. N4 (the PR body's "nothing accepted before is refused") is closed: the Clause-② paragraph now names the one exception, the refusal of a hand-made object under a -vec, -org or -vec-* name, as the rule main already applies to the keyword-index names. The docs nit is closed: the Search bullet of section 4.2 and the knowledge-turso row of the adapter table now name the vector leg as an exact scan or the approximate index. The tenancy nit (the per-search organization read and the search statement are not one transaction) stands as a nit; isolation is held by the shared WHERE.

Public surface in the delta: none added, none removed. No export, option, default or accepted value moves. One behavior is now defined where it was not: at Infinity an index made earlier under a finite threshold is no longer searched. That agrees with the option's documented meaning (it turns the index off) and refuses nothing.

Tenancy, re-read on the delta: the organization count is still read from the passage table at every search that would take the index and is not part of the remembered answer; a remembered "complete" alone never admits the index. The backfill's still-here check now also matches the generation row's creation time. Holds.

The two main merges: f5d171e changes none of the PR's ten files. 50e245a changes two of them, content/docs/ai/knowledge-rag.mdx (one hunk near line 304) and content/docs/protocol/knowledge.mdx (hunks near lines 351, 926 and 1143), all outside the PR's own hunks. The net diff at the head shows the PR's hunks intact: one in knowledge-rag.mdx (the libSQL search bullet) and three in knowledge.mdx (the section 4.2 opening, the Search and Approximate index bullets, the adapter table row).

Changeset and docs, sentence by sentence against the code:

  • Changeset, new sentence "A process reads the catalog for a generation's index once (two reads) and remembers the answer; at vectorIndexThreshold: Infinity it never does." True for searches. nit: a complete build still reads the catalog at any threshold, Infinity included, to refuse a foreign object; the README says "a search never reads", which is the exact form.
  • Changeset, unchanged sentences: re-read, still match (threshold, one organization, topK × vectorIndexOverfetch, the 8 × topK floor and the short-leg re-run, the 2,048-row batches, the names, the drops, the two options, the minimum of 8).
  • README "A copy batch the database refuses ends the copy the same way ...": matches; the build forgets its memory when the copy ends or is refused, and the next search finds the counts differ.
  • README "The health check's record of a refusal is kept by the process that ran the build, until it restarts.": matches.
  • README "What a search reads to choose": each sentence matches (two catalog reads on first search of an instance; keyed by number and row creation time; a build remembers for its own process; Infinity; another process's index; three seeks of the organization index).
  • knowledge.mdx Search bullet and table row: match.
  • nit: no page says that at Infinity an index made earlier is left in place, kept in step by its triggers, and not searched.

PR body v3, the new lines: the S1 to S4 paragraphs match the code as closed above; the operator sentence on healthCheck() is now correct (a named source runs the exact scan for that refusal; an unnamed one may still run it for another reason); the measured runs are the dev's and were not re-measured.

② Semver level

Unchanged and still right: @objectstack/knowledge-turso at patch; Clause-②: yes (widening) and Metadata-protocol: none, identical in the PR body and the changeset. The delta adds no surface and narrows nothing.

③ Boundary flags

  • Ruling A item 6: answered. Follow-up knowledge-turso: a scoped vector search under the 8 x topK floor tries a second, wider approximate pass before the exact scan #38066 is open ("a scoped vector search under the 8 x topK floor tries a second, wider approximate pass before the exact scan"), labelled area:ai, priority:p3, pm:blocked, and the PR body names it.
  • Ruling A item 3: now pinned for the index and the backfill (S2).
  • The hosted check asked of the cloud seat is non-blocking by the ruling; not answered when read.
  • SQL push-down (Prime Directive 5): no finding in the delta. The remembered answer replaces repeated catalog reads; no id set is materialised and no join moves into the application.

Open after this round: three nits (the changeset's Infinity sentence, the unstated fate of an earlier index at Infinity, the two-statement organization read).

No must-fix, no should-fix.

Implemented-by: claude/area-o1C-37975
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

…timeout; the Infinity wording says what a search reads

The scoped recall case took 5,971 ms on CI against the 5 s default; both
2,000-passage cases now carry an explicit timeout citing the local and CI
readings. The changeset and README now say that at Infinity a search never
reads the catalog for an index, and an index made earlier stays in place
unsearched.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 73d2774 · 2026-11-28T05:01Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 73d277418b303a87e50e4fd79592b6035f37fed5
Local-runs: none
Scope: .changeset/knowledge-turso-approximate-index.md, packages/plugins/knowledge-turso/README.md, packages/plugins/knowledge-turso/src/tests/acceptance.test.ts (the delta's three files; every other path is unchanged from the head record 7234240432 judged)

This is the second delta of the declaration record 7231688504. It follows delta 7234240432, which passed at 50e245a081eaf109a3bc9e3d7f1717e2332f50e7 with no graded finding open, so it closes nothing. The new head is one commit on that head, a fast-forward, and no main merge is involved. Read for this record: git diff 50e245a081 73d277418b303a87e50e4fd79592b6035f37fed5 (3 files) and the PR body v4.

① Derived judgments

  • The two 2,000-passage recall cases in acceptance.test.ts. These are the scoped case that went red on Test Core 9/10 and its unscoped sibling. Each gains an explicit 30 s timeout and a comment giving its measured cost. The corpus, the 0.95 recall bar, the case bodies and the assertions are byte-identical. Only the runner's time limit moves, so no assertion is weakened. RIGHT.
  • The changeset, read sentence by sentence. "With vectorIndexThreshold: Infinity it never does" now reads "a search never reads the catalog for an index". This is the exact form that the earlier delta's nit asked for: a complete build still reads the catalog, and a search does not. RIGHT.
  • The README. The Infinity sentence gains "so an index made earlier under a finite threshold stays in place and is not searched". This is true of the code at this head: at Infinity the approximate path is never chosen, and nothing drops an existing side table. This closes the second nit of 7234240432. RIGHT.

② Semver level

The level is unchanged: patch on @objectstack/knowledge-turso. The delta adds no option, value or default, and narrows nothing. The changeset is still pending in the root .changeset.

③ Readings

CI on this head had only started at 05:00Z. The record names the head; the gate verdicts are the check-runs on it, read by the landing seat.

No must-fix, no should-fix.

Nits from 7234240432: both are closed by this delta. The two-statement organization nit stays as it was.

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3

L1 verdict (L1-a): ACCEPT (delta) at head 73d277418b303a87e50e4fd79592b6035f37fed5 (Fixes #37975). This follows REWORK 7231698496 at c77819e170.

Review summary

Records on this PR.

  • Declaration record 7231688504.
  • Delta 7234240432 at 50e245a081, which closed all four graded findings of 7231688504.
  • Delta 7234426325 at this head. All are PASS at TIER_DEFAULT, and nothing graded is open.

Delta read since the REWORK.

  • The index memory is keyed per generation instance, with a catch backstop on the approximate statement, and both are pinned.
  • The refused copy batch is pinned.
  • No catalog read happens under the threshold or at Infinity, and that is pinned on a second adapter too.
  • The candidate count is bound only on the approximate statement.
  • The last commit gives the two 2,000-passage recall cases an explicit 30 s timeout, with their measured cost in a comment. The corpus, the 0.95 bar and the assertions are byte-identical, so no assertion is weakened.
  • The changeset and README sentences about Infinity now say exactly what a search reads, and that an index made earlier is left in place unsearched.
  • The two main merges change none of the PR's own hunks.

Gates. The PR is not governed (Tier S). CI on this head had only started at 05:05Z: 13 success, 0 failed, 16 pending. This ACCEPT is on the code. The landing waits on every check at this head concluding green, and the area reads that before it lands.

Next: the area lands it on all-green at this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Landing · area o1-C · head 73d277418b · 2026-11-28T05:30Z · ACCEPT → PR #38056 comment 7234437796 (L1-a, delta); declaration record 7231688504 with deltas 7234240432 and 7234426325, PASS at TIER_DEFAULT

Probe Reading
check-runs at 73d277418b 42 success · 17 expected skip · 0 failed · 0 pending · mergeable_state clean
check-governed-merges.mjs --pr 38056 NOT governed · +1113 / −35
landing-k.mjs --pr 38056 K = 2 < 15

State: ready + auto-merge; #37975 closes on merge via Fixes. Clause-②: yes (widening) on no governed path ⇒ Tier S, landed by the area under the maintainer's ruling A on #37975 (record 7231124445). The one deferred item of that ruling is follow-up #38066.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/xl tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

knowledge-turso: approximate (libsql_vector_idx) search for large sources, chosen by size, never on a multi-organization store

2 participants