Skip to content

Commit 0c1b2ff

Browse files
docs(adr): ADR-0161 dated note on item 12, a mounted knowledge service is enabled by configuration (#38401)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XDXvJPPtrTGfdDYhWWpihq5)_ Fixes #38368 Clause-②: no Metadata-protocol: none ## 维护者速读 - 用户能看到什么变化:用户无感;只在知识平台的架构决策记录里加一条带日期的注记,写明知识服务挂上不等于启用:私有部署配齐嵌入参数和存储才启用,没配齐时所有知识源都留着、管理员列得出,但不建索引、不同步、不能搜,也不能保存或移入应用包。 - 为什么做:属于知识平台专题;您定的规则(同一套元数据,私有部署看参数配没配,云端不管)和您随后裁定的四处细节,现有条文都没写,随后的实现要有据可依。 - 出错会怎样:只改一份文档,运行行为不变;条文若写错,碰到的是随后照它做实现的人,可以直接撤回。 - 要你做什么:审阅并合并这份注记(受管面,由您批准合并)。 ## What changes One file, `docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md`, 22 lines added and none removed against `main`, in three places: - **Header.** A third `**Amended**` line, dated 2026-11-28, beside the two that are there. It names both sources of the note: the maintainer's words of 2026-11-28 and the four points he ruled on 2026-11-29. The status line is left as it is. - **K4.** A cross-reference appended to the existing cross-reference block, in the shape of the one dated 2026-11-26. It says which two texts of K4 are read with the new note (clause 3, "A real consumer", and "Source admission at save") and closes with "No sentence of this record is changed." - **K8.** A third dated note after the two notes under the table, read with item 12: - item 12 is unchanged, and mounted is not enabled; the maintainer's six sentences of 2026-11-28 are quoted verbatim, untranslated and in order; - **Enabled**: at `kernel:bootstrapped` an embedder is available and the deployment's store is mounted, which means its adapter is registered; read once per boot; - **Not enabled: held, not served**: sources are loaded and listed to administrators, and not built, synced, reconciled or searched; no tool definition is handed out; a direct search is refused with a coded refusal and never answered empty; the state is said once in the boot's log; - **Enabling is an egress decision** (K5); the boot that first finds both halves runs K7's boot pass; - **The switch** is the existing setting `ai.embedder_provider`, default `none`; - the three ◆ choices ruled on 2026-11-28 by 「以上都同意」, each quoted in the card's words: an author's save, the log line, a service the host mounts; - the four ◆ points ruled on 2026-11-29 by the maintainer's choice of the decision card's option 「全按推荐(1A 2A 3A 4A)」, each under the number the ruling record gives it (comment 7248214179 on the card): - point 1: the package move-in of a package-less source is an author's save, refused while the service is not enabled, and no door value is added; - point 2: the state is the whole service's, so every source of a runtime-mounted service is held, whichever store it names; an application whose store embeds on its own mounts the knowledge service itself; - point 3: the service registers no lifecycle reap guard and calls no store, so a retention sweep deletes its rows on time; an entry left in a store that holds an earlier index joins the known gap, and K3 item 3 is read with the note as the promise of an enabled service; - point 4: the refusal of an author's save names the half that is missing; - **A known gap**, **Alternatives not taken**, and **Cloud is out of scope**; - the closing paragraph: no contract member, no settings key, no capability token; `main` has no such state until the implementation card #38369 lands; "The table is left as written; read item 12 with this note." The K8 table and every earlier sentence of the record are untouched. No file outside `docs/adr/` changes. **Read first, by risk** (one file, three bullets of the K8 note): 1. **Point 2, the state is the whole service's.** It is the one bullet that declares a narrowing: on `main` a source on an application's store that reads no embedder is built and searched under a runtime-mounted service, and under this note it is held. The bullet says so and says it is a named part of the narrowing #38369 declares. 2. **Point 3, no reap guard and no store call.** It is read against K3 item 3 ("an index entry never outlives its row") and the header's "Leaves unchanged" list. The bullet states the reading and changes neither sentence. 3. **Point 4, the refusal names the half that is missing.** The store sentence, "mount the deployment's knowledge store, restart, then save", is this area's English. The ruling record says it was not put to the maintainer word for word and is the delta review's to read. ## Tests No package is touched, so there is no build closure to build and no package test to run. A record is prose: nothing here is ablated. The checks that read the changed file are listed under Verification. ## Acceptance notes **The card's acceptance.** - The note sits under K8 and ends with the line "The table is left as written; read item 12 with this note". - K4 carries a cross-reference. - The three ◆ choices of 2026-11-28 are recorded as ruled, each in the card's words inside quotation marks, and are unchanged by the second commit. - `git diff origin/main...HEAD --stat` reads one file, 22 insertions. **The contract review's findings on the first head (comment 7247818861 on this pull request), and the ruling that answers them.** - The open choice of the first report, move-in: ruled, point 1. The two sentences that said the note did not decide it are replaced. - S1, a source on a store the application registered: ruled, point 2. - S2, the lifecycle reap guard: ruled, point 3, and one sentence added to **A known gap**. - S3, the save remedy when the store is the missing half: ruled, point 4, and "the boot that first finds an embedder" now reads "the boot that first finds both, an embedder and the deployment's store". - N1, applied: the K4 cross-reference says "listed to administrators". - N2, applied: the log-line bullet says the rule is about this state alone, and that a declared capability whose provider cannot be built still fails the boot, as before. - N3, not applied in the record: the Consequences sentence on index state, "The service keeps none of its own", is an earlier sentence and is left as written. It reads against the per-source sync state row that landed with pull request #38307. It stays a follow-up for a later revision of the record. - N4, applied: **Enabled** says the store is mounted when its adapter is registered, and that whether a registered store can open its database is outside the note, which declares no boot probe of it. **What the note says about code, read on `main`.** The files the note cites are byte-identical at `ff69bcabb2`, where they were first read, and at `3579cf136d`, which this branch has merged. Every anchor is a `path#symbol` or a file, as the record's anchor check requires. - The knowledge plugin provides its embedder from a `kernel:bootstrapped` hook: it keeps one another plugin registered, else builds one from the saved settings, else registers a stand-in whose every use is refused (`packages/services/service-knowledge/src/knowledge-service-plugin.ts#provideEmbedder`). `embedder_provider` defaults to `none`, and a saved default counts as not configured. - The settings description of that key reads "Read when the server starts: a saved change to any embedder setting takes effect after the next restart." (`packages/services/service-settings/src/manifests/ai.manifest.ts#aiEmbedderSettingsSpecifiers`). - Ruling D's three save doors ask `authoredKnowledgeSourceRefusal`: the REST `PUT /meta/:type/:name`, the dispatcher's same route, and the MCP draft save. The package duplicate door is `POST /packages/:id/duplicate`, through `refuseDuplicatedKnowledgeSources`, with the predicate's `duplicate` door. `POST /packages/:id/move-in` asks the same predicate with the default door, `save`. - A scheduled reconcile exists: `scheduleReconcile` registers a daily job on the job service by default, and an option turns it off. A reconcile walk removes the documents of rows that were deleted, for a store that lists its documents. - Composition is decided from the stack and the process environment before the kernel starts; the settings service reads saved values only once its data engine is bound at `kernel:ready`; the embedder settings section is contributed by the knowledge service itself (`contributeKnowledgeSettings`). Both halves of the first alternative hold. - For point 2: the service core never reads the embedder service, and the in-memory store plugin reads none, so on `main` a source on such a store builds and is searched with no embedder saved. - For point 3: the reap guard's work is a store call (`packages/services/service-knowledge/src/knowledge-reap-guard.ts`), and a failed call keeps the row. - For N2: under `os serve` a declared capability whose provider cannot be provided is a hard boot error, and a capability the stack's items mount is read as declared (`packages/core/src/capability-composition.ts`). - K9 rule 1, K7 rule 5, K8 rule 2, K5, K1, K3 item 3 and ADR-0078 §4 each say what the note cites them for. **Places where the note's wording departs from the card's, each on a reading of `main` or of the ruling record.** 1. Card point 9 gives the reason "(the service keeps no state of its own)". That no longer holds: a per-source sync state row landed on `main` after the card's evidence commit (pull request #38307; `packages/services/service-knowledge/src/knowledge-sync-state.ts`). The gap itself stands, for a different reason, and the note states that one: the row holds a source's last build and its failed syncs, and a change that was never attempted is neither. 2. Card point 4 says the enabling boot "builds every held source and names each". Read literally that contradicts point 9, since a store that already holds a current index is not rebuilt. The note says the boot runs K7's boot pass over every held source and names each one it builds, and that a source held since it was first loaded is built whole. 3. Ruling D's item 5 cites the capability file by line number. The record's anchor check refuses line anchors, so the note cites the same place as `packages/spec/src/kernel/platform-capabilities.ts#PLATFORM_CAPABILITY_TOKENS` and quotes the comment's words, "Requested, never always-on". 4. The note keeps its date, 2026-11-28, the day of the maintainer's words and of the first three choices. The four later points carry their own date, 2026-11-29, in the header line, in the note's first paragraph and in each bullet's title. **Noted, not filed, and not changed here.** - The stdio MCP bridge reads the knowledge service in its `start()`, before `kernel:bootstrapped`, the event at which the note says the state is read. The implementation card #38369 has to make `search_knowledge` absent on that transport too; the note states the outcome and leaves the mechanism to that card. - The Consequences sentence named under N3 above. ## Verification **Two-minute check.** Open the Files changed tab: one file, 22 lines added, none removed. The K8 note carries four bullets whose titles begin "◆ Ruled 2026-11-29 (point", and its last line ends with "The table is left as written; read item 12 with this note." <details> <summary>Local checks on head 83e9252 (the 21 commands derived for this diff)</summary> Derived with `node scripts/pm/dispatch-gates.mjs --commands` and reconciled with `--ran`: `✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED` Each exit code was captured before any pipe. | Command | Exit | | --- | --- | | `node scripts/check-adr-links.mjs` | 0 | | `node scripts/check-adr-links.mjs --self-test` | 0 | | `node scripts/check-closing-keyword-parity.mjs` | 0 | | `node scripts/check-closing-keyword-parity.mjs --self-test` | 0 | | `node scripts/check-comment-mask-corpus.mjs` | 0 | | `node scripts/ci/plan-test-core-shards.mjs --self-test` | 0 | | `pnpm --filter @objectstack/lint run check:doc-formula-expressions` | 0 | | `pnpm check:adr-anchors` | 0 | | `pnpm check:adr-index` | 0 | | `pnpm check:adr-symbol-anchors` | 0 | | `pnpm check:ci-filter-parity` | 0 | | `pnpm check:closed-ceremony-text` | 0 | | `pnpm check:cross-package-test-inputs` | 0 | | `pnpm check:doc-authoring` | 0 | | `pnpm check:driver-memory-census` | 0 | | `pnpm check:gitlink-declared` | 0 | | `pnpm check:nul-bytes` | 0 | | `pnpm check:pm-governed-merges` | 0 | | `pnpm check:pm-prior-rulings` | 0 | | `pnpm check:refd-timer-probe` | 0 | | `pnpm check:watch-hint-literal` | 0 | Verdict lines the checks print: - `check-adr-links: 1268 relative link destination(s) under docs/adr/ resolve` - `check-adr-symbol-anchors: 4538 anchors across 164 records resolve`, with 0 line anchors surviving - `adr-index --report: OK — docs/adr/README.md is current, every record parsed` - `check-nul-bytes: OK`, no raw ASCII control bytes The repo-wide scans and the full check farm are left to CI. </details> <!-- signed: repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5df10ec commit 0c1b2ff

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

‎docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- **Inputs**: every code and docs text quoted below was read on `objectstack-ai/objectstack` `main` at `254e396a29`, the commit this record's branch starts from. Positions are in [Readings](#readings-taken-at-254e396a29). PR #36823 and PR #36850 are merged and are in that tree; PR #37075 is open and edits §6 of `content/docs/protocol/knowledge.mdx`, so the §6 quotations may move when it lands.
1919
- **Amended** (2026-11-25, [#37097](https://github.com/objectstack-ai/objectstack/issues/37097)): a dated note under the table of [K8](#k8--the-contract-additions-decided-item-by-item) records that the document hash of item 2 covers `organizationId` when the document has one (item 9), with no version bump. The status line above is left as it is.
2020
- **Amended** (2026-11-25, [#37324](https://github.com/objectstack-ai/objectstack/issues/37324)): a second dated note under the table of [K8](#k8--the-contract-additions-decided-item-by-item) gives item 17 its final shape, `AdapterSearchOptions.scope?`: the typed scope the service builds from `scope: [{ object, ids }]`, on the maintainer's ruling of that day, 「也能指定上级对象(制度)」 (record `7168192820` on #37308). The status line above is left as it is.
21+
- **Amended** (2026-11-28, [#38368](https://github.com/objectstack-ai/objectstack/issues/38368)): a third dated note under the table of [K8](#k8--the-contract-additions-decided-item-by-item), read with item 12, records that a knowledge service the runtime mounts is enabled by configuration: a boot enables it when it finds an embedder and the deployment's store, and until then its sources are held and not served. It is written on the maintainer's words of that day, 「平台没有知识服务时,知识源不应该启用啊。」 and 「私有部署判断的是相关参数有没有配置」, as the filing gate of #38368 records them, and on four points he ruled on 2026-11-29 by choosing the decision card's option 「全按推荐(1A 2A 3A 4A)」 (record [`7248214179`](https://github.com/objectstack-ai/objectstack/issues/38368#issuecomment-7248214179) on #38368). It adds no contract member and no settings key. A cross-reference stands under [K4](#k4--knowledge_source-is-admitted-as-a-metadata-type). The status line above is left as it is.
2122

2223
---
2324

@@ -220,6 +221,8 @@ The package whose README and tests carry the `http` shape, `knowledge-ragflow`,
220221
> **Cross-reference (2026-11-25, [#37325](https://github.com/objectstack-ai/objectstack/issues/37325)).** Which package's source a name means is ADR-0150's question, and this record does not ask it. Its [addendum of 2026-11-25](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md#addendum-2026-11-25-knowledge_source-joins-bucket-3) puts `knowledge_source` in bucket 3 beside `skill` and `ai_context`, on the maintainer's ruling 「按应用+名字区分,都保留」 (record [`7168239918`](https://github.com/objectstack-ai/objectstack/issues/37304#issuecomment-7168239918) on #37304): a source is identified by `(package, name)`, two packages that ship one source name each keep their source, and the keys of a source's index carry the package. Point 3 above is read with it: "A name is one source" holds between two packages by keeping both, and which holder a registration in code is stays open there, for row 3. So is [K6](#k6--adr-0087-dispositions): item 4 stays true of the rename, and the re-keying is what moves a document id and rebuilds an index; item 5 keeps its spellings, and the value each carries for a package's source is that addendum's and row 3's to state. Row 3 ([#37304](https://github.com/objectstack-ai/objectstack/issues/37304)) follows the addendum. No sentence of this record is changed.
221222
>
222223
> **Cross-reference (2026-11-26, [#37545](https://github.com/objectstack-ai/objectstack/issues/37545)).** Which holder a registration in code is was ruled on 2026-11-26: **A**, by the maintainer's word 「两处都选 A」 (record [`7192063608`](https://github.com/objectstack-ai/objectstack/issues/37304#issuecomment-7192063608) on #37304). ADR-0150's addendum carries the ruling as the dated note under [point 6 of "Past the ruling's words"](./0150-behavioural-metadata-addressed-by-package-objects-keep-the-literal-prefix.md#addendum-2026-11-25-knowledge_source-joins-bucket-3). The record states it as: "A knowledge source registered in code belongs to no package. It is read as the environment's own source and takes the one package-less slot of its name, keeping its bare key, bare face and existing index. The duplicate refusal compares `(package, name)`. A code registration and an environment-authored source of one name are the same slot, so the second arrival is refused, naming both doors. A code registration and a package's source of one name are two sources, and both are kept." Point 3 above is read with it. No sentence of this record is changed.
224+
>
225+
> **Cross-reference (2026-11-28, [#38368](https://github.com/objectstack-ai/objectstack/issues/38368)).** Whether a mounted knowledge service is enabled is the question of the dated note of 2026-11-28 under the table of [K8](#k8--the-contract-additions-decided-item-by-item), read with item 12. Two texts above are read with it. Clause 3 ("A real consumer"): where the runtime mounted the service and it is not enabled, a source is loaded and listed to administrators, whichever store it names, and it is not built, synced or searched until a boot finds an embedder and the deployment's store. "Source admission at save": an author's save is also refused while the service is not enabled, at the save doors that note names, the package move-in among them, and the package duplicate door is not refused for that reason. No sentence of this record is changed.
223226
224227
### K5 — A source lists its content fields; embedding is egress
225228

@@ -347,6 +350,25 @@ The epic holds the contract shut until this record merges ("No new adapter-contr
347350
>
348351
> This note adds exactly one member, `AdapterSearchOptions.scope` with its term type, and no other: the list stays closed beyond it (rules 3 and 5). #37308 builds it after this note merges, in one PR: the member, its first reader in `knowledge-memory`, and the suite cases. The code this note cites was read on `main` at `829a45e96c`. The table is left as written; read item 17 with this note.
349352
353+
> **Note (2026-11-28, [#38368](https://github.com/objectstack-ai/objectstack/issues/38368)) — item 12: a knowledge service the runtime mounts is enabled by configuration; until it is, its sources are held and not served.** Item 12 is unchanged: the `knowledge` token, or a `knowledge_source` the stack ships, mounts the knowledge service and the deployment's store. Mounted is not enabled. The maintainer's words of 2026-11-28, verbatim and untranslated, in the order the filing gate of #38368 records them: 「如果我还是想把知识库放到 统一的 app-starter,但是根据平台的实际运行情况,决定是否有知识搜索的能力呢?」「也就是同一套元数据,企业版和社区版运行结果不一样」「平台没有知识服务时,知识源不应该启用啊。」「知识服务本身应该也可以有一个开关」「云端不需要管,企业版其实看的也是有没有配置相关的参数」「私有部署判断的是相关参数有没有配置」. So one set of metadata ships to every deployment, and what a self-hosted deployment has configured decides whether it searches. A ◆ marks a choice past those words. Three were put to the maintainer with their recommendations and ruled that day by 「以上都同意」; each is recorded below in the card's words. Four more were put to him on 2026-11-29 and ruled by his choice of the decision card's option 「全按推荐(1A 2A 3A 4A)」 (record [`7248214179`](https://github.com/objectstack-ai/objectstack/issues/38368#issuecomment-7248214179) on #38368); each is recorded below with that date, under the number the record gives it.
354+
>
355+
> - **Enabled.** A knowledge service the runtime composes for item 12 (`packages/core/src/capability-composition.ts#resolveServedCapabilities`, read by `os serve` and by `@objectstack/verify`) is enabled when, at `kernel:bootstrapped`, an embedder is available and the deployment's store is mounted. An embedder is available when another plugin registered one, or when the saved `ai.embedder_*` settings build one (`packages/services/service-knowledge/src/knowledge-service-plugin.ts#provideEmbedder`). The store is mounted when its adapter is registered; whether a registered store can open its database is outside this note, which declares no boot probe of it. That event follows every plugin's `start()` and every `kernel:ready` handler, so an embedder or a store that is absent then is absent for that boot. The state is read once per boot: a changed setting takes effect at the next restart, which the settings page already says (the description of `embedder_provider` in `packages/services/service-settings/src/manifests/ai.manifest.ts#aiEmbedderSettingsSpecifiers`).
356+
> - **◆ Ruled 2026-11-29 (point 2): the state is the whole service's.** Every source of a service the runtime mounted is held while the service is not enabled, whichever store it names, a store the application registered included. An application whose store embeds on its own mounts the knowledge service itself in `plugins[]`, which the third ◆ below leaves outside this note. On `main` a source on an application's store that reads no embedder is built and searched under a runtime-mounted service with none saved, so holding it is a narrowing, and a named part of the one #38369 declares.
357+
> - **Not enabled: held, not served.** The sources are loaded and listed to administrators. They are not built, synced, reconciled or searched. The service hands out no tool definition, so no transport registers `search_knowledge`: every transport registers the one definition the service hands out (K9 rule 1), so the tool is absent on all of them alike. A direct `search` is refused with a coded refusal (ADR-0112) that names the remedy, and it is never answered empty, which is K7 rule 5's rule for a source that cannot be searched. The state is said once, in the boot's log (K8 rule 2: nothing is skipped silently).
358+
> - **◆ Ruled 2026-11-29 (point 3): no reap guard and no store call.** While it is not enabled the service registers no lifecycle reap guard and calls no store, so a retention sweep deletes its rows on time. A row deleted or reaped then can leave an entry in a store that holds an earlier index. Nothing searches that entry while the service is not enabled, and the reconcile after enabling, or an operator's rebuild, removes it: this joins the known gap below. K3 item 3 ("an index entry never outlives its row") is read with this note as the promise of an enabled service. No earlier sentence of the record is changed.
359+
> - **Enabling is an egress decision.** Embedding is egress (K5), so configuring an embedder is the deployment's decision to send the listed fields of its sources to that provider. The boot that first finds both, an embedder and the deployment's store, runs K7's boot pass ("What starts a rebuild") over every held source and names each one it builds. A source held since it was first loaded has nothing in the store, so it is built whole.
360+
> - **The switch.** The switch the maintainer asked for is a setting that exists: `ai.embedder_provider`, whose default is `none`. No settings key is added.
361+
> - **◆ Ruled: an author's save.** "An author's save is refused while the service is not enabled, at the three save doors of #37983's ruling D, with the remedy "save an embedder provider, restart, then save". The package duplicate door is not refused then." Ruling D is the maintainer's 「D 拒绝保存并说明」 (record [`7220511579`](https://github.com/objectstack-ai/objectstack/issues/37983#issuecomment-7220511579) on #37983): where no knowledge service is registered, an author's save of a `knowledge_source` is refused at each door that saves one, and the engine's own write (a package install, a seed, a migration) is not. It stands. This refusal stands beside it and draws the same line, between an author's save and the engine's write, so a shipped source still installs and is held. The three doors are `PUT /meta/:type/:name` on both transports and the MCP draft save, and they ask one predicate (`packages/metadata-core/src/knowledge-source-save-admission.ts#authoredKnowledgeSourceRefusal`). The package duplicate door is `POST /packages/:id/duplicate`, which asks that predicate for each source it copies (`packages/runtime/src/domains/packages.ts#refuseDuplicatedKnowledgeSources`). What it answers where no knowledge service is registered, and to a caller who may not search what a source indexes, is unchanged; a service that is not enabled is no reason for it to refuse.
362+
> - **◆ Ruled 2026-11-29 (point 1): the package move-in is an author's save.** One more door asks that predicate on `main`, as a save: `POST /packages/:id/move-in`, for a package-less source it moves into a package. It is an author's save: it is refused while the service is not enabled, with the save's remedy. No door value is added for it: the predicate's doors stay `save` and `duplicate`.
363+
> - **◆ Ruled 2026-11-29 (point 4): the refusal names the half that is missing.** This is the refusal of an author's save, at each door above that refuses one. With no embedder it is the ruled sentence, unchanged: "save an embedder provider, restart, then save". Where the deployment's store is not mounted, the refusal says so and says that the boot's log names the reason, and its remedy is "mount the deployment's knowledge store, restart, then save". With both missing it says both.
364+
> - **◆ Ruled: the log line.** "Log level: `info` when only a shipped item mounted the service and nothing was configured; `warn` when the stack lists `requires: ['knowledge']`, the saved settings are incomplete, or the store could not be mounted. Never a boot refusal (ADR-0078 §4)." ADR-0078 §4 is the rule that the runtime seam warns and never throws. It is about this state alone: a declared capability whose provider cannot be built still fails the boot, as before.
365+
> - **◆ Ruled: a service the host mounts.** "A knowledge service a host mounts itself in `plugins[]` is outside this note: its adapters may embed on their own (K1)." K1 leaves to the adapter whether an embedding call is made at all, so the absence of the kernel's embedder says nothing about such a composition. This note changes nothing for it.
366+
> - **A known gap.** A deployment that was enabled, built its indexes and then boots not enabled syncs nothing while it stays so. The boot that finds it enabled again builds by what each store holds (K7), and a store that holds a current index for a source is left as it is. The record changes made in between are repaired by the next reconcile, which runs daily by default on the job service for a store that lists its documents (`packages/services/service-knowledge/src/knowledge-service-plugin.ts#scheduleReconcile`), or by an operator's rebuild (`os knowledge rebuild`). They are not repaired by the enabling boot, because nothing records which changes went unsynced: the sync state the service keeps for a source (`packages/services/service-knowledge/src/knowledge-sync-state.ts`) holds its last build and its failed syncs, and a change that was never attempted is neither. A row deleted or reaped in between is such a change (point 3 above): its entry stays in a store that holds an earlier index until that reconcile or rebuild.
367+
> - **Alternatives not taken.** Mounting by configuration, so that an unconfigured deployment has no knowledge service. The runtime decides what it mounts from the stack and the process environment before the kernel starts, and the settings service, which it mounts, reads a saved value only once its data engine is bound at `kernel:ready`. The `ai.embedder_*` keys are also contributed by the knowledge service itself (`packages/services/service-knowledge/src/knowledge-settings-contribution.ts#contributeKnowledgeSettings`), so the setting that would mount the service could be saved only where it is already mounted. An always-on knowledge service: ruling D's item 5 keeps it out (the same record), and `packages/spec/src/kernel/platform-capabilities.ts#PLATFORM_CAPABILITY_TOKENS` states the token as "Requested, never always-on".
368+
> - **Cloud is out of scope**, by the maintainer's word above: 「云端不需要管」.
369+
>
370+
> This note adds no contract member, no settings key and no capability token: the list stays closed (rules 3 and 5). It declares, and [#38369](https://github.com/objectstack-ai/objectstack/issues/38369) builds it after this note merges. Until then `main` has no such state: a mounted service with no embedder registers a stand-in whose every use is refused with the reason, and still starts its boot build, its record sync and its reconcile job and hands out its tool. The code this note cites was read on `main` at `ff69bcabb2`. The table is left as written; read item 12 with this note.
371+
350372
**What "capabilities" became.** #36990's rule named "capabilities" among the members that waited for this record. Two things answer it. A method that is absent is the capability signal for listing, dropping, status, and the start and end of a build: the service asks whether the method is there. One flag covers what a method cannot say, `capabilities.chunks` (item 5). No wider descriptor is added.
351373

352374
**What counts as a member** (for rule 5 below, and for the epic's "no new adapter-contract member"). A member is anything an adapter author must read to be correct:

0 commit comments

Comments
 (0)