feat(vector): support account-scoped embedding builds - #598
Conversation
roborev: Combined Review (
|
|
looking |
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
|
fixing the CI |
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
3599f43 to
c63be5d
Compare
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
Add [vector.embed.scope] accounts (and --account/--collection one-run overrides on embeddings build/resume) so embedding generations can be limited to selected accounts. The scope is resolved to source IDs at startup, folded into the generation fingerprint, and applied by the embed worker, both vector backends' coverage and activation gates, the scheduler, coverage reporting, and the web settings catalog. Squashed from the review iterations on this branch: - fix(vector): fail closed on embedding scope changes - fix(api): report zero coverage for identity outside embed scope - fix(vector): address review findings on account-scoped builds (refuse empty-scope drains, daemon config race, docs corrections) - fix(vector): gate empty-scope activation and latch scope-drift stale - fix(api): gate vector search on stale status and detect drift on preflight - fix(vector): latch stale on deterministic scope-resolution failures - fix(api): run scope-drift check on the coverage endpoint - fix(web): expose vector.embed.scope.accounts in settings catalog - fix(api): revalidate the active generation on snapshot reuse - fix(vector): revalidate ready status and require canonical scope identifiers - fix(pgvector): check the empty-scope gate before the demote and delete - fix(api): hide vector error detail on the public health endpoint - fix(api): run the scope-drift check on health and stats endpoints - style: fix lint findings from CI - docs: design-note trims and account-scope usage documentation Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rebase integration with the contextual chat/transcript embeddings feature: the contextual worker's scan and build-scope normalization now carry the account dimension like the ordinary worker, the legacy convergence checker passes source IDs to the scoped missing count, and registerEmbedJob wires scope drift into the API server through the new constructor (tolerating the nil server its tests register with). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
cd7688b to
977aa5e
Compare
roborev: Combined Review (
|
The contextual worker enforced only the message-type dimension in its scope gate and enumerators, with two consequences: a source-only scope was rejected wholesale (ContainsMessageType on an empty type list vetoes everything, and sourceScopesAfter rendered a malformed empty IN clause), and a combined scope let excluded accounts' text reach the embedding provider through journal-driven paths. selectorInBuildScope — the authoritative gate every publication path funnels through — now enforces both dimensions independently: message type from the routing row or selector, and the account dimension from the message's source (MessageMeta now selects source_id) or the conversation's owning source for chat-block selectors, failing closed when a selector carries no source identity. The enumerators narrow by source in SQL (sourceScopesAfter, metadataScopesAfter) so excluded archives are not pointlessly walked, while scopesForChanges keeps enumerating unfiltered so moved-out scopes still tombstone. Also mirror the empty-source-scope activation guard into sqlitevec's sequence-bound ActivateGenerationIfConverged (the fused transaction checks live-in-scope before demoting the serving generation), and pass the resolved vector config through requireConfiguredConvergence / configuredConvergenceState so the daemon's activation plan counts missing coverage under the account scope rather than the unresolved global config. CI: pin toolchain go1.26.6 (go directive stays 1.26.5 for the nixpkgs Go) so govulncheck stops flagging stdlib advisories fixed in 1.26.6. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
roborev: Combined Review (
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
roborev: Combined Review (
|
Add account and collection scoping to embedding builds, including durable
[vector.embed.scope] accountsconfiguration for daemon jobs.Scope is part of generation identity, preventing vectors from different account policies being mixed. Explicit empty collections fail closed, durable scope configuration resolves identifiers rather than unstable source IDs, and daemon jobs verify account-to-source mappings before embedding.
Coverage and generation reporting honor the resolved scope across SQLite and pgvector. The CLI documents repeatable
--accountand--collectionflags.