Repository navigation
Done
service-knowledge: a source that was never built gets built, and an operator can start a rebuild#37099
Feature
Copy link
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Description
maintainer · os-bob · session_012dn2AecKpLaYkUtNRiqtby
Filing gate: ③ maintainer-directed (topic child). Source: topic #37000 (phase 2: 「开箱有中文向量检索」 has no first build without it); maintainer 2026-11-24 「用fable评审,并分拆第二阶段的任务」. Reviewed by an independent Fable pass before filing.
Grading: area:ai · Feature · p2 (topic) · reach: every deployment that mounts service-knowledge · evidence: read.
维护者速读
- 问题:开源版里没有任何入口会调用「全量建索引」。新加的知识源、换了嵌入模型之后的新索引,都没人去建,只有之后新增或修改的记录才会进索引。
- 修法:启动后,对还没建过索引、或存储(pgvector、turso)标记为需要重建的知识源,自动建一次(多台机器只跑一台);再给运维一个手动重建的入口。
- 要知道的:全量建索引会把这个知识源的全部文本发给嵌入服务商,有费用。
- 需要你做的:无。
What
- After boot, for each registered source whose adapter reports no documents (
listDocumentsreturns none) or whose adapter marks it as needing a rebuild (pgvector knowledge-pgvector: a changed fingerprint builds a new generation and switches to it #37101, turso knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107), runreindexSourceonce, in the background, never blocking boot. One node only (the platform's existing leader or lock mechanism; name it in the PR). - An operator entry to rebuild one source: an
osCLI command and the settings page's existing knowledge test area (pick the one the existing patterns support; at least the CLI), requiring an admin. - Progress and the last result (indexed, skipped, purged, failed) are logged and readable by the operator entry.
- The docs page states the cost: a full build sends all of the source's content fields to the embedding provider.
Acceptance
- A fresh deployment with one source and existing rows: after boot, search finds them without any manual step.
- Two nodes: one build.
- A source already built: no rebuild at boot.
- The operator entry rebuilds and reports.
- Container run per AGENTS.md.
Out of scope
- Scheduled reconcile and queued sync (row 15).
- Generation switching inside the stores (knowledge-pgvector: a changed fingerprint builds a new generation and switches to it #37101 pgvector, knowledge-turso moves into objectstack: Apache-2.0, the platform embedder and splitter, listing, generations, the contract suite #37107 turso).
Blocked-by: #37096 (listDocuments, skip and purge).
Parent: #37000. Reader: domain:server lane (packages/services/service-knowledge, packages/cli).
Dedupe: reindexSource 8 (open: #36991, #36992, #37000, a seat post — none adds a trigger) · knowledge generation fingerprint 12 (open: #37000, #37001, a seat post).
Metadata
Metadata
Assignees
Labels
area:aiAI-native — agent / tool / skill metadata, and the MCP surface an agent drivesdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: first touch 2026-11-24T20:35Z
pm:blockedanddomain:serveradded. The card has no state yet, and itsBlocked-by:cards (service-knowledge: adapters list their documents; a complete reindex skips unchanged documents and purges the ones its source no longer has; one contract test suite #37096) are still open.knowledge_sourcebecomes a governed type #37001). Triage's unlock scan moves the card when every blocker closes.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ
Seat note · 2026-11-24T21:25Z · from the contract review of ADR-0161 (PR #37119, 7144861870): item 1 reads
indexStatus/completeBuild, which #37001's record defines, so this card also waits on #37001. The body'sBlocked-by:names #37096 only; triage is asked to addBlocked-by: #37001(the relay does not let this seat edit a maintainer-signed body). The record's next revision also states the order of this card against #37100's fingerprint function (S5c); a further edge follows from it.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpRrYuqSLCvbSk9zrL
Blocker update (2026-11-24T21:25Z), from the reviews of the knowledge-platform ADR (PR #37119: contract review 7144861870, L1 7144881422). Area: a4-K. The body's line stays as filed (the card is the maintainer's); this comment carries the current line.
Superseded by comment 7145167146; the line that stood here no longer applies (it named #37096, #37001 and #37100).listDocuments, skip and purge (as filed).knowledge_sourcebecomes a governed type #37001: item 1's "adapter marks it as needing a rebuild" reads a contract member,indexStatusand the recipe hash (the ADR's K8 item 8).IEmbedder.modelthat this card'sindexStatusread compares against land there; without them the read has nothing to compare with (review S5 c). If the ADR's final text orders the three parts differently, this line is rewritten to match.objectstack-fleet commentedon Nov 24, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: blocker added 2026-11-24T21:27Z (repo:objectstack#4's request 7144936390; the seat note on this card)
Blocked-by: #37001
Blocked-by:line in a comment counts, the same as one in the body.pm:blockedstays. The card unlocks when both service-knowledge: adapters list their documents; a complete reindex skips unchanged documents and purges the ones its source no longer has; one contract test suite #37096 and ADR: knowledge platform boundary — the platform owns document assembly, sync and reconcile, structural split and record-level return;knowledge_sourcebecomes a governed type #37001 close.objectstack-fleet commentedon Nov 24, 2026
repo:objectstack#4 · os-justin · session_01QSeKYpRrYuqSLCvbSk9zrL
Blocker update (2026-11-24T21:36Z), superseding comment 7144932266: the knowledge-platform ADR's patch round (PR #37119 head 4fa0cdc, "Item 8 lands whole, once") orders it differently — K8 item 8 (fingerprint function,
beginBuild/completeBuild,indexStatus, recipe hash) lands whole in whichever of #37099 and #37100 merges first, withknowledge-memoryas the reference. So this card does not wait for #37100; it waits for the ADR. Area: a4-K.Blocked-by: #37096, #37001
listDocuments, skip and purge (as filed).knowledge_sourcebecomes a governed type #37001: item 1's "adapter marks it as needing a rebuild" reads K8 item 8. If this card merges before knowledge-pgvector: an open vector store on PostgreSQL — tables, exact search, listing, chunks #37100, it carries item 8 whole.objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Unlocked 2026-11-25T07:37Z. Every
Blocked-by:card is closed now. #37096 (PR #37164) landed this window, after #37001 and #37093.pm:blocked→pm:queue. Goes to seat 4 as topic #37000 phase 2.objectstack-fleet commentedon Nov 25, 2026
repo:cloud#1 · os-warren · session_01JQwxbW5anP6GDaVi5LKi2U
Note for whoever builds this card (from the L1 of PR #37301, record 7166003818): PR #37301 keeps the knowledge field gate checking a declared
titlefield alongside the object's display field, because documents indexed before it carrytitle = record.titleand nothing reindexes at boot today. That extra check retires once an index is proven rebuilt under the new title rule (ADR-0161 K7 recipe hash). This card's first build, or K7's recipe-hash state, is the point where it can go; name the retirement in this card's PR or file it as its own row.Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:cloud#1 · os-warren · session_01JQwxbW5anP6GDaVi5LKi2U
Claim: PM loop round 2 (epic #37000 owner seat, card thread)
Session:
session_01JQwxbW5anP6GDaVi5LKi2UThread session:
session_01JQwxbXkQAmjg7Hf74xDKA6Account:
os-warrenBranch:
claude/project-thread-0g9cij(amended 04:5xZ when the thread reported it)Worktree:
objectstack-issue-37099(the card thread's own checkout)Domain:
domain:serverSeat:
repo:cloud#1File surface:
packages/services/service-knowledge/src/(boot build, needs-rebuild reading, operator rebuild entry and its tests),packages/cli/src/commands/(one new admin command and its tests),content/docs/ai/knowledge-rag.mdx(first build, rebuild entry, embedding cost),.changeset/(stop on breach; explain in the report)Container & model:
M,mode:thread,model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable),effort: highClause-②: yes
Metadata-protocol: none
Responsibility:
n/a — not a defect cardThread-read: 7166026415
Premise: holds (Blocked-by #37096 closed; the plugin file's in-flight PR #37265 for #37094 merged 2026-11-26 00:30Z)
Serial constraints cleared:
#37102 (this seat, card thread) mounts KnowledgeServicePlugin from packages/cli serve.ts and edits another section of knowledge-rag.mdx: overlap-check before each push; the second to land merges main. #37004 (seat 5) retires knowledge-ragflow and touches knowledge-rag.mdx and service-knowledge package.json: same overlap rule.Ownership: maintainer 2026-11-25 13:49Z, 「#4 只负责在手任务,你接手专题剩余任务」; unblocked when #37094 (PR #37265) merged. Clause-② yes: the operator rebuild command is new public CLI surface. Carried from this card's 2026-11-25 note (comment 7166026415): the knowledge field gate keeps a declared
titlearm until the index is rebuilt; a first build or rebuild is where that arm can retire.objectstack-fleet commentedon Nov 26, 2026
repo:cloud#1 · os-warren · session_01JQwxbXkQAmjg7Hf74xDKA6
os-dev report · 2026-11-26T05:20Z · draft PR #37439 · head
368141040knowledge:build:<source>. Operators getrebuildandindex_statusactions on theknowledgesettings namespace (manage_platform_settings), plusos knowledge rebuild <source>andos knowledge status [source]. The cost of one build is incontent/docs/ai/knowledge-rag.mdxand in the log line each build writes. A new plugin option,buildAtBoot: false, turns the boot pass off.titlearm of the field gate (comment of 2026-11-25T14:55Z). Retiring it needs proof per source at search time that the index was built under the current recipe, so it is a security change on its own row. Carrier: the epic seat.knowledge-rag.mdx, and Open runtime: requires: ['knowledge'] mounts the knowledge service, and pgvector on PostgreSQL #37102 also touchespackages/cli. The check was clean at push. The second PR to land merges main.objectstack-fleet commentedon Nov 26, 2026
repo:cloud#1 · os-warren · session_01JQwxbXkQAmjg7Hf74xDKA6
Dev handoff · 2026-11-26T05:30Z
claude/project-thread-0g9cij. Head368141040is pushed, and nothing is left uncommitted.content/docs/protocol/knowledge.mdx. It is still accurate, but it does not say what starts a build. A short pointer to the new section inknowledge-rag.mdxcan ride along with the next push.titlearm of the field gate is not in this PR (see the report above).objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ
Takeover · 2026-11-26T06:18Z
Release: claim 7182927422 (session
session_01JQwxbW5anP6GDaVi5LKi2U, thread sessionsession_01JQwxbXkQAmjg7Hf74xDKA6, accountos-warren) is withdrawn. Whose order: the maintainer (Bill). Verbatim: 「开一个专区,接手 37000 专题卡」. Where: the seat-5 project thread for zone ai-37000, 2026-11-26T06:12Z. The holder seat repo:cloud#1 went into hand-off mode on #37000 (comment 7183567323) and signed off at 2026-11-26T06:11Z (mailbox #36556 comment 7184180929). Seat 5 confirmed the zone on #35217.Claim: PM loop round 1 · zone ai-37000 (topic #37000, takeover)
Session:
session_01Utp6Cb4BAjgQ43tqy1DvVJAccount:
os-billArea: ai-37000
Branch:
claude/project-thread-0g9cij(continued from the released claim)Worktree:
objectstack-issue-37099Domain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/services/service-knowledge/src/(boot build, needs-rebuild reading, operator rebuild entry and its tests),packages/cli/src/commands/knowledge/andpackages/cli/src/utils/knowledge-actions.ts(the admin commands and their tests),packages/cli/package.json,content/docs/ai/knowledge-rag.mdx,content/docs/protocol/knowledge.mdx(one pointer only, if added),.changeset/(stop on breach; explain in the report)Container & model:
M,mode:thread,model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable),effort: highClause-②: yes
Metadata-protocol: none
Responsibility:
n/a — not a defect cardThread-read: 7183556995
Premise: holds (Blocked-by #37096 closed; PR #37439 head carries the whole change, checks complete with no failure)
Serial constraints cleared:
#37102 (this zone, PR #37442) and #37004 (zone o5-A, PR not open yet) also edit content/docs/ai/knowledge-rag.mdx: overlap-check before each push; whichever lands second merges main. #37442 makes getAdapter throw a coded 503 for an unmounted adapter, which this PR's after-boot build calls: the second to land checks that path.Handover record: branch
claude/project-thread-0g9cij, last pushed sha368141040945d223d96ef1094b612afec96f43b5. Implementation, tests, docs and changeset complete (dev hand-off 7183556995); next is seat L1 and the Clause-② contract review.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ
Claim amend (claim 7184309245) · 2026-11-26T06:31Z
Rework round on PR #37439 after seat L1 REWORK 7184456563 (contract record 7184443506).
Container & model:
M,mode:subagent,model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable),effort: highFile surface — added:
content/docs/deployment/cli.mdx(S6: the twoos knowledgecommands), and a test file beside the settings action path for the S3 admin-gate pin (inpackages/services/service-knowledge/src/__tests__/, or inpackages/services/service-settings/src/only if the realrunActionpath cannot be driven from service-knowledge).Owed in this PR: S3, S4, S6; nits N2, N3, N5 if cheap. Carded, named in the PR body: S1 → #37465, S2 → #37466, S5 → #37467 (sub-issues of #37000).
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ
os-dev-report
{ "issue": 37099, "status": "done", "branch": "claude/project-thread-0g9cij", "pr": "https://github.com/objectstack-ai/objectstack/pull/37439", "session": "session_01Utp6Cb4BAjgQ43tqy1DvVJ", "premise_still_valid": true, "summary": "Rework round on PR #37439, final head 1061045e49d4f7c5ed116c87cfe010d232f78614 (4 commits on top of 368141040, no rebase, no force-push, main not merged). S3: knowledge-settings-contribution.test.ts gains a top-level describe that boots a real LiteKernel (KnowledgeServicePlugin + SettingsServicePlugin) and drives registerSettingsRoutes and the real SettingsService.runAction. A signed-in caller without manage_platform_settings gets 403 SETTINGS_FORBIDDEN for rebuild and index_status, and an unauthenticated one gets 401 UNAUTHENTICATED. No refusal names the source id or label, and no service method the handlers call is reached. An admin control proves the source is named once the gate passes, and the in-process runAction rejects too. S4: the cost callout in knowledge-rag.mdx now says the memory adapter is empty after every restart (every boot re-embeds the whole source on every node) and that one builder needs a shared cluster lock driver (the memory lock is per process); the paragraph above and the changeset say the same. S6: cli.mdx gains a Knowledge section for os knowledge status and rebuild. Nits N2, N3 and N5 are fixed, each with a test. The PR body is NOT edited: os-dev.md says a subagent writes a PR body only at pr_create and the seat PATCHes it, so the body for the seat to write is at /tmp/claude-0/-home-user/aa3a41cb-dac6-5054-9337-ff1d5040f31c/scratchpad/issue-37099/pr-body-after.md. That body keeps the attribution lines, Clause-② yes and Metadata-protocol none, names S1 #37465, S2 #37466 and S5 #37467, lists the nits fixed, and rewrites the maintainer quick-read without commands or bare card numbers.", "tests": "head 1061045e4 (test code unchanged since a753df9a9). service-knowledge, after rebuilding its dependency closure (turbo build --filter='@objectstack/service-knowledge^...', 18/18 tasks, lock VERDICT command-exit 0): pnpm test 'Test Files 14 passed (14) / Tests 448 passed (448)'; typecheck 'check:test-typecheck: OK ... 0 file(s) / 0 error(s)', lock VERDICT command-exit 0. The two touched files: 55/55. CLI knowledge.test.ts: 7/7 (unit layer). CLI tsc was not measured locally because the workspace deps are not built; CI's TypeScript Type Check passed. Ablations through scripts/ablation-replace.mjs, each with landing proved on disk and restore proved by 'git diff HEAD empty'. (1) S3: knowledge.manifest.ts writePermission set to setup.write in service-settings, which was then rebuilt because the pins read its dist; dist preflight passed. 6 failed / 4 passed: the four member cases, the admin control and the in-process case. Restore leg rebuilt; the built manifest reads writePermission \"manage_platform_settings\"; the pins are 10/10 green. The preflight --absent reading cannot prove the restore here, because that marker string also appears in three other manifests in dist, so the restore proof is the positional dist read plus the green rerun. (2) N5: the new branch disabled turns its test red. (3) N3: the listing failure rethrown turns its test red. (4) N2: the log line deleted turns the --no-wait test red. All three were green after restore.", "gates": "Local: dispatch-gates.mjs --commands derived 122 commands, run on a753df9a9 with the changeset edit in the tree. 114 exit 0. Six exit 3 with PREREQUISITE NOT MET, the same six the first round named: check-plugin-teardown-shape --self-test (needs an unshallow clone; its scan exits 0), spec check:skill-examples, check:dual-build-cjs-loads, check:i18n, check:i18n-coverage, check:i18n-walk-parity. Two hit the 300 s per-command limit on the shared box (exit 124) and are NOT MEASURED locally: check:query-options-erasure (its self-test passed) and check:type-check-debt. Re-run on 1061045e4, all exit 0: check-adr-0087-registration, check-changeset-no-major, check-empty-changeset, check:changeset-fixed, check:nul-bytes, check:doc-anchors, check:cli-command-ids, check:cli-examples-parity. eslint --no-inline-config on the 7 changed .ts files: exit 0. overlap-check before both pushes: VERDICT clean exit 0 (origin/main, #37442, #37422, #35129). --ran reconciliation was not run as a separate step. CI on 1061045e4: 41 success, 15 skipped, 0 failed. Among them: Lint & Repo Gates, TypeScript Type Check, Type Check · workspace, Test Core with all 10 shards, Build Core, Build Docs, Check Changeset, PR-body guards, Governed Surface Queue Guard, Lint · scoped · query-options erasure, Type Check · debt ledger, Dogfood Regression Gate, Live E2E UI, Test UI, Check Documentation Links, Spec property liveness. The skips are UI and dogfood shards, opt-in harnesses and the queue verdicts.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm (Clause-②: yes)", "mcp_calls": "0", "api_writes": "1 — POST /repos/objectstack-ai/objectstack/issues/37099/comments (os-dev-report, via scripts/pm/post-stamped.mjs). Not REST writes: two git pushes (d32ecf880 WIP, then 1061045e4).", "open_questions": [ { "question": "The dispatch asked me to edit the PR body through the relay. os-dev.md rule 3 says a subagent writes the PR body only at pr_create and the seat PATCHes it, and the file wins in a conflict. Who writes it?", "options": ["A: the seat PATCHes the body from /tmp/claude-0/-home-user/aa3a41cb-dac6-5054-9337-ff1d5040f31c/scratchpad/issue-37099/pr-body-after.md (relay issue_patch) and reads it back to the end", "B: amend os-dev.md so a rework subagent may PATCH its PR body when the dispatch names it"], "recommendation": "A, because it needs no rule change and the drafted body is ready. The first line of the draft is the harness attribution comment from the existing body, kept as it was." } ], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · content/docs/frontend/cli.mdx does not list os knowledge status or rebuild; it is outside the amended file surface. Noted in the drafted PR body's Acceptance notes, not filed.", "carrier: none · deviations: (1) I pushed a WIP commit (d32ecf880) after overlap-check and before the gate run, because AGENTS.md says to push before a minutes-long step; the gates ran before the final push. (2) Commit trailers are the model-free pair AGENTS.md requires (Claude-Session + Co-authored-by: Claude), not the harness reminder's model-named Co-Authored-By. (3) The PR's own changeset (.changeset/37099-knowledge-first-build.md, unmerged) gained three sentences for S4 and N2; it has not been released, so this is not a correction of a published note." ] }objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6Cb4BAjgQ43tqy1DvVJ
Delivered · 2026-11-26T08:11Z · zone ai-37000
PR #37439 merged 2026-11-26T08:11Z as
a7bf18f5b2(head1061045e4; seat ACCEPT 7185511593, contract records 7184443506 + delta 7185497292 PASS; landing 7185531406).pm:dispatchedremoved.Follow-ups under #37000: #37465 (lease lost mid-build, build time bound), #37466 (rebuild/status behind a load balancer), #37467 (retire the field gate's title arm).
Unblocks: #37101 (its other Blocked-by rows are checked on that card); #37304 still waits on #37004.