Skip to content

ADR-0161 dated note: a mounted knowledge service is enabled by configuration; until then its sources are held and not served #38368

Description

@objectstack-fleet

repo:objectstack#8 · sunhaolin · session_017xRBcSSm1UGomShRsemA1N

Filing gate: ③ maintainer-directed. Source: maintainer. Key words (maintainer, 2026-11-28, this session, in order): 「如果我还是想把知识库放到 统一的 app-starter,但是根据平台的实际运行情况,决定是否有知识搜索的能力呢?」「也就是同一套元数据,企业版和社区版运行结果不一样」「平台没有知识服务时,知识源不应该启用啊。」「知识服务本身应该也可以有一个开关」「云端不需要管,企业版其实看的也是有没有配置相关的参数」「私有部署判断的是相关参数有没有配置」; on the three choices marked ◆ below, presented with their recommendations: 「以上都同意」. An independent Fable review shaped the note (it replaced the session's first idea, mounting the service only when configured, which cannot work: the composition runs before the settings are readable, and the embedder settings section is contributed by the knowledge plugin itself).
Grading: area:ai · Task · p2 (it blocks the implementation card filed beside it) · reach: every self-hosted deployment serving an app that ships a knowledge_source · evidence: read from the code on main c6a1328.

维护者速读

  • 做什么:给知识平台的架构决策记录加一条带日期的注记:知识服务挂上不等于启用;嵌入参数和存储都齐了才启用,没齐时知识源留着但不生效。
  • 为什么:您今天定的规则(同一套元数据,私有部署看参数配没配;云端不管)现有条文没写,实现卡要有据可依。
  • 影响:原有条文一字不改,不加任何契约成员;三处您已同意的选择逐条写进注记。
  • 要你做的:审阅并合并这份注记(受管面)。

What

One dated note under ADR-0161 K8, read with item 12, and one cross-reference under K4. The K8 table stays as written ("The table is left as written; read item 12 with this note"). The note states:

  1. Item 12 is unchanged: the knowledge token, or a shipped knowledge_source, mounts the service and the deployment's store.
  2. Mounted is not enabled. A knowledge service the runtime composes is enabled when, at kernel:bootstrapped, an embedder is available (registered by another plugin, or built from the saved ai.embedder_* settings) and the deployment's store is mounted. Read once per boot; a changed setting takes effect at the next restart (the settings page already says so).
  3. Not enabled: sources are loaded and listed to administrators, and are not built, synced, reconciled or searched; the service hands out no tool definition, so no transport registers search_knowledge (K9 rule 1: absent everywhere); a direct search is refused with a coded refusal, never answered empty (K7 rule 5); it is said once (K8 rule 2).
  4. Configuring an embedder is the deployment's egress decision (K5). The boot that first finds one builds every held source and names each.
  5. The switch is ai.embedder_provider, whose default is none. No key is added.
  6. ◆ (ruled) An author's save is refused while the service is not enabled, at the three save doors of knowledge: what a knowledge_source saved at run time does on a deployment that mounted no knowledge service (split from #37306 item 4) #37983's ruling D, with the remedy "save an embedder provider, restart, then save". The package duplicate door is not refused then.
  7. ◆ (ruled) 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).
  8. ◆ (ruled) A knowledge service a host mounts itself in plugins[] is outside this note: its adapters may embed on their own (K1).
  9. Known gap, stated: record changes missed while a deployment was not enabled are repaired by the daily reconcile or an operator rebuild, not by the enabling boot (the service keeps no state of its own).
  10. Alternatives not taken: mounting by configuration (composition runs before settings are readable; the embedder section is contributed by the service); an always-on service (ruling D item 5, record 7220511579).
  11. Cloud is out of scope by the maintainer's word.

Acceptance

  • The note sits under K8 with the line "The table is left as written; read item 12 with this note"; K4 carries a cross-reference.
  • The three ◆ choices are recorded as ruled, with the words above.
  • No file outside docs/adr/ changes.

File surface

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

Governed surface (docs/adr/**): the maintainer approves the merge.
Related: #37000 (knowledge platform topic), #37983 (ruling D), #38346 (knowledge splitting topic; its manual-search pause waits on this card).
Reader: triage routes it to the lane holding #37000.
Dedupe: search_knowledge no embedder listed 8 (none open but #37000) · knowledge service not enabled embedder 40 (no open card on this) · knowledge enabled configuration embedder_provider 0 · UnconfiguredEmbedder 0.

Activity

  1. added
    priority:p2
    area:ai
    on Nov 28, 2026
  2. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t

    Triage: lands in docs/adr/0161-knowledge-platform-boundary-…md (one dated note under K8, read with item 12, and a cross-reference under K4) · area:ai · domain:skills (docs/adr/**) · Task · p2 (it blocks the implementation card filed beside it) · pm:queue · size S. Rationale: maintainer-directed (③). The rule "mounted is not enabled: enabled only when an embedder and the store are both present at kernel:bootstrapped; otherwise sources are held, not served" and the three ◆ choices are ruled (「以上都同意」). The ADR text is on the human floor, but its direction is decided, so the card queues. The PR is Tier H, and the maintainer approves and merges it. No contract member is added (ai.embedder_provider default none is the switch). Related: decision card #38352 (manual search via the knowledge service). Its option A already keeps substring matching where no embedder is present, which matches this note's "not enabled" state.
    Path: none

    Recorded 2026-11-28T16:17Z.

  3. added
    domain:skills
    pm:queue
    on Nov 28, 2026
  4. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
    Claim: PM loop round 1 · 2026-11-28T23:17Z
    Session: session_01FEkQ5oQLfL8thb6wtUHnTb
    Account: os-project-manager
    Branch: claude/issue-38368-adr-0161-enabled-by-configuration
    Worktree: objectstack-issue-38368
    Domain: domain:skills
    Seat: repo:objectstack#5
    Area: o5-ai37000
    File surface: docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: ceiling (dispatch-gates --tier at 33778d0, Model tier — MANDATORY: - docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md ⇢ 'docs/adr/'), effort: xhigh (reason: ADR revision, 定档 「ADR 修订(改 docs/adr/ 的卡)effort 照常设令 xhigh」)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 7242123494
    Premise: holds at 33778d0 — ADR-0161 K8 item 12 is the capability-token row and K4 is the admission section; the ADR has 0 hits for not enabled, is enabled and embedder_provider, so no text states the enabled rule yet; ai.embedder_provider defaults to none in packages/services/service-knowledge/src/knowledge-service-plugin.ts
    Serial constraints cleared: #37447 (this seat, area o5-fleet) declares docs/adr/** and its open PR #38365 does not touch ADR-0161 (files read); no other open PR names ADR-0161; implementation card #38369 is Blocked-by this card; seat repo:objectstack#8 (area knowledge-split) hot files are content/docs and service-knowledge, not this ADR; overlap-check before every push
    Pre-claim lane: docs/adr/** ⇒ domain:skills (file ownership only); an ADR card, routed to this area by the seat's order (area o5-ai37000, first wave item 1); governed (Tier H): the maintainer approves the merge, the seat lands it, this area does not.
    Pre-claim deps: none (no Blocked-by: on the card).
    Prior rulings read: the maintainer on this card, verbatim 「以上都同意」 on the three ◆ choices, with 「平台没有知识服务时,知识源不应该启用啊。」「私有部署判断的是相关参数有没有配置」「云端不需要管」; ruling D on #37983 (record 7220511579): 「D 拒绝保存并说明」, its item 5 keeps the service never always-on; ADR-0161 line 14 (⛔ none of the rulings it executes is re-opened) and K8 rules 3 and 5 (a change is a dated note on the record); check-prior-rulings 43 hit lines in the ADR, read, none conflicts with a dated note that leaves the K8 table as written.

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  6. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
    os-dev-report

    {
      "issue": 38368,
      "status": "needs_decision",
      "branch": "claude/issue-38368-adr-0161-enabled-by-configuration",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38401",
      "session": "session_01FEkQ5oQLfL8thb6wtUHnTb",
      "premise_still_valid": true,
      "summary": "The dated note is written and pushed as draft pull 38401 (head f82aec1a, one file, +18 -0): a third note under the K8 table read with item 12, ending with the line \"The table is left as written; read item 12 with this note\", a cross-reference under K4, and a third Amended line in the header; the maintainer's six sentences are quoted verbatim and the three ruled choices are recorded in the card's words. All six mechanism assumptions were measured on main at ff69bcabb2 and hold; three wordings depart from the card on those readings and are named in the pull body (card point 9's reason is false on main since the sync state row landed, point 4 is worded as K7's boot pass so it agrees with point 9, and ruling D's line anchor is cited as a symbol anchor). Status is needs_decision because drafting found a fourth open choice the ruled words do not cover: POST /packages/:id/move-in is a fifth caller of the save predicate on main; the note states it and does not decide it (see open_questions). The pull is draft, Tier H: never readied, enqueued or armed by this run.",
      "tests": "No package is touched: no closure build owed, no package test or typecheck owed; a record is prose, nothing ablated. The union of derived checks ran after the final commit: git rev-parse --short HEAD = f82aec1a. Independent of the union, on the same tree: check-adr-symbol-anchors exit 0 (\"4536 anchors across 164 records resolve\", 0 line anchors survive), check-adr-links exit 0 (\"1268 relative link destination(s) under docs/adr/ resolve\"), adr-index --report \"OK — docs/adr/README.md is current, every record parsed\". The nine anchors the added lines carry were extracted with the anchor check's own extractor and each one is read by it. The six quoted maintainer sentences and the ruling quote were byte-compared against the card and the order.",
      "gates": "LOCAL, head f82aec1a, derived by `node scripts/pm/dispatch-gates.mjs --commands` (21 commands), each exit code captured before any pipe: 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 :: 3 on the first run (PREREQUISITE NOT MET, two workspace packages unbuilt, nothing measured), then 0 after `pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint --concurrency=2` under os-verify-lock (VERDICT command-exit 0, full cache replay) · 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. Reconciliation: \"✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED\". CI, pull 38401 check-runs as of the later of two reads, roughly ninety seconds after creation, 45 runs, not waited on: success (9) Check Changeset, Check PR Size, Auto Label, filter, Governed Surface Queue Guard, PR-body guards (claim · duplicate · Part-of · single-writer path), Check Documentation Links, Test UI, Dogfood Regression Gate; in progress (13) Plan Test Core shards, Type Check · workspace, Type Check · source gates, Type Check · debt ledger, Type Check · consumer gates, Lint · ESLint, Lint · scoped · slot lookup and corpus, Lint · scoped · tooling self-tests, Lint · scoped · query-options erasure, Lint · docs and code guards, Lint · CI, release and engine gates, Lint · PM dispatch-gates, Lint · repo and tooling gates: NOT MEASURED: CI lint and type-check lanes, reason: still running at that reading and this order forbids waiting on CI; skipped (23) the path-filtered and opt-in jobs; failure 0 at that reading.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "9 — read tools only, no write tool: issue_read x6 (get and get_comments on 38368, get and get_comments on 37983, get on 38369, and one get_comments on 38368 to read this comment back), pull_request_read x3 (get on 38401 once, get_check_runs twice)",
      "api_writes": "2 — both through the fleet-write relay (POST /repos/objectstack-ai/objectstack/dispatches): (1) pr_create, run 46202959039, which created draft pull 38401 with label skip-changeset and assignee os-project-manager (read-back: 10919 bytes sent, 10919 stored, identical; label and assignee both listed); (2) this os-dev-report comment on issue 38368 through scripts/pm/post-stamped.mjs. git pushes, not REST writes: 2 (the empty-branch probe, then f82aec1a).",
      "open_questions": [
        {
          "question": "While a mounted knowledge service is not enabled, what does POST /packages/:id/move-in answer for a package-less knowledge_source it would move into a package? The ruled words (card point 6) name the three save doors of ruling D and the package duplicate door. Move-in is a fifth caller of the same predicate on main (authoredKnowledgeSourceRefusal in packages/runtime/src/domains/packages.ts, asked with the default door, save); it was already there at the card's evidence commit, and no ruled word names it. The note says so in two sentences and decides nothing.",
          "options": [
            "A — refused, as an author's save. Move-in already asks the predicate with the save door, so the implementation card 38369 as written (refuse a non-system save while not enabled for door save; door duplicate goes on) yields this with no extra code. Cost: an administrator of a not-enabled deployment cannot move a package-less source into a package until an embedder is saved and the server restarted. Work: one sentence of the note patched to name move-in among the refused saves (a second commit on the same draft pull, about two changed lines), minutes.",
            "B — not refused, like the package duplicate. Cost: move-in must stop reading as a save to the predicate, which means a third value on the exported KnowledgeSourceSaveDoor type and on the door option of admitAuthoredSource in the metadata-core package (a published contract member with its changeset and its own remedy wording), plus the note patched to name the carve-out. Work: about half a day inside the implementation card, and one published type member added for one edge."
          ],
          "recommendation": "A. 实际业务需求: measured, nothing pulls on B. `git grep move-in` outside tests reads 12 files, all of them the route's own implementation, the client method, the spec and the docs, none under examples; and under this note a package-less source can sit on a not-enabled deployment only if it was saved while the service was enabled or written by the engine. The duplicate carve-out, by contrast, has the app-starter driver the maintainer named. 项目长远合理性: A keeps one predicate with two doors and leaves move-in what it is on main, a save; B adds an exported door value for a single edge. 防 AI 写代码犯错: A is the loud refusal that names the remedy, so an agent moving a source hears why at once; B lets a held source change packages silently while nothing serves it. 创业阶段不扩散需求: A adds nothing; B adds contract surface with no pull. The four axes agree. If nothing is ruled before the implementation card runs, its item 3 as written produces A."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: 38369 · noted, not filed — the stdio MCP bridge reads the knowledge service for its tool in its own start() (packages/mcp/src/plugin.ts, knowledgeToolsService), before kernel:bootstrapped, the event at which the note says the enabled state is read; the implementation has to make search_knowledge absent on that transport too. The note states the outcome and leaves the mechanism to that card. In the pull's Acceptance notes.",
        "carrier: none · noted, not filed — the record's Consequences sentence on index state, \"The service keeps none of its own\", reads against the per-source sync state row that landed on main with pull 38307 (packages/services/service-knowledge/src/knowledge-sync-state.ts). Unexercised prose drift, no reach measured; no earlier sentence of the record is changed here. In the pull's Acceptance notes.",
        "carrier: none · noted, not filed — \"Never a boot refusal\" in the ruled log-line choice is about the state this note declares; os serve still stops the boot when the provider package of a declared capability cannot be loaded, which is another rule and untouched. An observation, in the pull's Acceptance notes."
      ],
      "line_budget": "+18 -0 in 1 file. The deriver's own line: \"Changed lines — 18 (+18 / -0; generated files INCLUDED) vs the human-merge threshold 3000: under\".",
      "deviations": [
        "Order, Zone 3 (suggested route): the pull body ends with the footer block AGENTS.md prescribes for a pull body (a blank line, a rule, one session-URL footer line) and not with the robot-emoji line the order names. Reason: AGENTS.md states the footer form, and readings-write-shapes.md measures that a harness block stacked above the footer is stored as several signature blocks. The stored body was read back identical, one footer.",
        "Order: \"if drafting finds a fourth open choice, stop and return needs_decision\". The return is needs_decision, with the draft pull open: the eleven ruled points are complete and the fourth choice (move-in) is stated in the note as not decided, instead of stopping with no pull. Taking the two sentences out, or patching them once ruled, is a change of about two lines.",
        "Three wordings depart from the card on a reading of main, each named in the pull body: card point 9's reason \"(the service keeps no state of its own)\" is false since the sync state row landed, so the note gives the reason that holds; card point 4 is worded as K7's boot pass so that it agrees with point 9; ruling D item 5's line anchor is cited as packages/spec/src/kernel/platform-capabilities.ts#PLATFORM_CAPABILITY_TOKENS because the record's anchor check refuses line anchors.",
        "The worktree base is ff69bcabb2 (origin/main when the worktree was built), not 33778d06 as the order names; every code reading was made at ff69bcabb2 and origin/main had not moved when the pull was opened.",
        "Commit trailers are the model-free pair the order and AGENTS.md require, not the model-named trailer of the harness reminder. The pull body's first line is the harness attribution comment, kept as the order gives it; it survived the write.",
        "The doc formula check was run twice (first run exit 3, prerequisite not met); the recorded code in the reconciled list is the second run's.",
        "The card and its thread were read through the MCP read tool issue_read, not the payload or single-card REST read os-dev.md names; counted in mcp_calls.",
        "test:repo and the full check farm are left to CI, as the local verification scope says; CI was not waited on."
      ],
      "files_changed": [
        "docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md (+18 -0)"
      ]
    }
  7. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5nLQFkgEZSDcCyuD82

    Decision analysis · 2026-11-29T00:07Z · #38368, four open choices on the ADR-0161 note of draft PR #38401 (head f82aec1a), written by the decision thread opened for seat repo:objectstack#5. ⛔ Not a claim and not a ruling: the maintainer rules.

    维护者速读

    • 问题:「知识服务挂上不等于启用」这条注记写好了,复审通过,但有四处您当天的原话没覆盖到:未启用时,把一个散放的知识源移进应用包算不算保存;应用自带存储的知识源跟不跟着停;到期自动清理数据时还要不要先去清索引;缺的是存储而不是嵌入参数时,拒绝保存的提示怎么说。四处都只影响没配好知识服务的私有部署。
    • 选项:每处各两到三个,见下文;四处都按推荐走,注记再改约十行,同一个 PR,不加任何契约成员。
    • 推荐:移入包按保存拒绝;启用状态按整个服务算,只有一个开关;未启用时自动清理不再碰索引,数据到期照常清;提示按实际缺的那一半说。共同理由:没启用就是整个知识功能不动,管理员只需要记住一个开关。
    • 不定会怎样:注记合不进去,后面的实现卡和基础模板带知识源的那一步都排在它后面。

    Background

    Card #38368 adds one dated note under ADR-0161 K8: a knowledge service the runtime mounts is enabled only when a boot finds an embedder and the deployment's store; until then its sources are held and not served. The maintainer ruled the rule and three ◆ choices on 2026-11-28 (「以上都同意」). Draft PR #38401 writes it (+18 −0, one file). The dev's report (comment 7247665546) raised one choice the ruled words do not cover; the contract review (PR comment 7247818861, PASS, no must-fix) raised three more as should-fix S1, S2, S3. Implementation card #38369 is blocked by this card and builds what the note declares.

    Governing text

    Protocol statement: this PR changes no protocol (prose under docs/adr/). What it declares is built by #38369, which is already a declared narrowing (Metadata-protocol: narrowed, BREAKING changeset). Q2-A and Q3-A each add one named item to that narrowing; no option adds a contract member except Q1-B.

    Premises, each with its re-check (read on main f42bcc18)

    1. Move-in asks the save predicate with the default door. grep -n "authoredKnowledgeSourceRefusal(" -A6 packages/runtime/src/domains/packages.ts: two callers, :660 with door: 'duplicate', :4166 (move-in) with no door, and packages/metadata-core/src/knowledge-source-save-admission.ts:109 reads export type KnowledgeSourceSaveDoor = 'save' | 'duplicate'.
    2. A source on an application's own store builds and searches today with no embedder. The service core never calls the embedder (grep -n -i embedder packages/services/service-knowledge/src/knowledge-service.ts: comments only); packages/plugins/knowledge-memory/src/index.ts has no hit for embedder; packages/plugins/knowledge-turso/src/plugin.ts:69 reads the kernel's embedder at each call.
    3. Nobody in the tree uses that composition without an embedder under a runtime-mounted service. grep -rn "registerAdapter(" --include=*.ts . | grep -v "test\|node_modules\|dist": the three store plugins and the contract. examples/app-showcase names adapter: 'memory' and mounts KnowledgeServicePlugin itself in plugins[] (objectstack.config.ts:185), which the third ◆ leaves out of the note. The pin rqp_app_store in packages/verify/src/harness.required-providers.test.ts:483 registers its own embedder in the same plugin and its source sits on the deployment's store, so it stays enabled under either reading.
    4. The reap guard's work is an adapter call and a failure keeps the row. packages/services/service-knowledge/src/knowledge-reap-guard.ts: service.adapterFor(source) then adapter.delete(...) inside a try; the catch sets deIndexed = false and the row is not confirmed.
    5. No shipped object pairs a retention rule with a knowledge source today. grep -rln "lifecycle:" --include=*.object.ts packages examples: 19 objects, all system tables (messaging, automation runs, upload sessions); the one shipped source in examples is on showcase tasks.
    6. The store can be the missing half. packages/verify/src/harness.required-providers.test.ts:522: an install without the optional @objectstack/knowledge-turso constructs the service, not the store, and warns once.

    Q1. Moving a package-less source into a package while not enabled

    One-sentence question: on a deployment where knowledge is not switched on, an administrator moves a loose knowledge source into an app package; is that turned away like saving one, or let through like copying a package?

    Option What is done What the administrator sees Effort
    A: refused, as a save The note names move-in among the refused saves. "Nothing was moved", with the remedy. The source stays where it is and can be moved after knowledge is enabled. This PR, about 2 lines. #38369 produces it with no extra code.
    B: not refused, like duplicate Move-in gets its own door value on the exported type. The source changes package silently while nothing serves it. About half a day inside #38369, one published type member added, a changeset. No precedent measured.

    Business meaning. A: re-filing a document is filing it, and the filing counter is closed. B: a second exception at the counter, for one kind of paperwork.

    Recommendation: A. Move-in's own comment on main calls it a save by the caller, which is the author's side of the line ruling D draws. The duplicate door was ruled open for a named reason (the starter app is copied by customers); nothing pulls on move-in. Not taken: B adds a contract member for one edge with zero measured use.

    Q2 (review S1). A source on a store the application brought, under a runtime-mounted service

    One-sentence question: an application ships its own knowledge store that needs no embedding service; on a deployment with no embedder saved, does its knowledge search keep working, or is it off like everything else?

    Option What is done What the customer sees Effort
    A: the state is the whole service's The note says so: every source of a runtime-mounted service is held while not enabled, whichever store it names. It names the way out: an application whose store embeds on its own mounts the knowledge service itself in plugins[] (the third ◆), as the showcase does. #38369 names this as part of its narrowing. One switch. Such an application, upgraded, finds its source held and a boot line saying what to do. This PR, about 3 lines; #38369 one more line in its declared narrowing.
    B: the state is judged per store The note says only sources on the deployment's store are held; a source naming another store is served as on main. Knowledge can be half on: the search tool is listed, some sources answer, others are refused; the settings page, the save doors and the boot line each need a per-source answer. This PR about 5 lines; #38369 grows by a per-source branch in the build, sync, reconcile, tool list, status page and save doors. No precedent; not measured, estimated at a day or more.

    Business meaning. A: the feature has one main switch, and a tenant who brings their own generator wires their own panel. B: every appliance has its own switch and the building has no single answer to "is the power on".

    Recommendation: A. The maintainer's words describe one switch for the service (「知识服务本身应该也可以有一个开关」, 「私有部署判断的是相关参数有没有配置」). An administrator and an agent get one answer to "is knowledge on here". Loosening later (serving own-store sources) is not breaking; tightening later would be. Not taken: B is the more literal reading of K1, and it is where the record could go when a real own-store application appears; today premise 3 finds none.

    Q3 (review S2). The retention sweep's de-index step while not enabled

    One-sentence question: when records reach their retention date on a deployment where knowledge is not switched on, does the clean-up still stop to remove them from the search index first?

    Option What is done What the operator sees Effort
    A: the guard stops Not enabled, the service registers no reap guard and calls no store. The note says so and extends its known gap: a row deleted or reaped while not enabled can leave an entry in a store that holds an earlier index; nothing searches it while not enabled, and the reconcile after enabling, or an operator's rebuild, removes it. K3 item 3 is read with the note: its promise is an enabled service's. Retention runs on time on every deployment. A deployment that once built an index and then turned knowledge off keeps old entries in that store until it is enabled again. This PR about 3 lines; #38369 as written ("no adapter call").
    B: the guard keeps running as landed The note says the guard is the one adapter call that survives. Where the store cannot answer (not installed, or PostgreSQL without the vector extension), rows of a source's object are kept past their retention date on every sweep, with a warning each time, on a deployment that never used knowledge. This PR about 2 lines; #38369 drops "no adapter call" and its zero-call acceptance gains an exception.
    C: the guard tries, and never keeps a row Not enabled, the guard asks the store to delete and confirms the row whatever the answer. Retention on time; a reachable store is cleaned. Two failure directions for one guard, and a not-enabled deployment still opens its store on every sweep. This PR about 4 lines; #38369 adds a state-dependent branch and its pins. No precedent.

    Business meaning. A: a department that is closed does not hold up the archive's shredding day. B: shredding waits for a signature from a department that never opened. C: the archive knocks, and shreds whether or not anyone answers.

    Recommendation: A. Deleting data on schedule is a compliance duty and should not depend on a feature the deployment never configured; PostgreSQL without the vector extension is an ordinary self-hosted setup. A is also consistent with the gap the note already states: while not enabled, an ordinary delete by a user is not synced either, so keeping the promise for reaped rows alone would protect one of two doors. Not taken: B produces silent over-retention; C is the fullest clean-up but adds a second failure direction and store calls on deployments that are meant to be idle, with no pull (premise 5).

    Q4 (review S3). What the refusal says when the missing half is the store

    One-sentence question: the ruled message tells an author to save an embedding provider and restart; when the provider is saved and it is the store that is missing, the author follows the advice and is refused again with the same sentence. What should it say?

    Option What is done What the author sees Effort
    A: the refusal names the half that is missing No embedder: the ruled sentence, unchanged. Store not mounted: "the deployment's knowledge store is not mounted (the boot log says why); mount it, restart, then save". Both: both. The note's "the boot that first finds an embedder" becomes "that first finds both". Advice that works the first time. This PR about 3 lines; #38369 one more remedy string and its pin.
    B: one general sentence for both causes "Knowledge is not enabled; Settings shows why." A second step to learn the cause. Same size.
    C: left as ruled Nothing. Wrong advice in the store case, in a loop. None.

    Recommendation: A. The ruled words stand for the cause they were written for; the note already names the store in its log-line rule. Not taken: B hides the remedy the refusal exists to give; C is a known false instruction.

    Four axes

    • Long-term fit. Q1-A keeps one predicate with two doors. Q2-A keeps "enabled" one fact about the service, which every later surface (settings page, tool list, save doors, logs) can state in one sentence. Q3-A makes "not enabled" mean the service touches no store, and keeps retention independent of an optional feature. Q4-A keeps a refusal true for each cause.
    • Real pull. Every self-hosted deployment that serves the Starter with a knowledge source and has no embedder meets this state. Inside it: move-in has no measured caller outside its own route and docs; no own-store application without an embedder is in the tree; no shipped object pairs retention with a source. The pull is on the state being simple, not on any of the alternatives.
    • AI error surface. Q1-A, Q2-A and Q4-A are loud refusals naming a remedy that works. Q2-B makes a half-on state an agent has to reason about per source. Q3-B fails quietly in the direction of keeping data that was due for deletion; Q3-A's leftover entries are unreachable while not enabled and are a stated gap.
    • No spread. A on all four adds no contract member, no setting and no state; Q1-B adds a published type member, Q2-B and Q3-C add per-source and per-state branches.

    os-decision-facets
    ① Long-term fit: A on all four shrinks special cases (one predicate with two doors, one enabled state for the service, no store call while not enabled, a refusal true per cause); Q1-B, Q2-B and Q3-C each grow contract or branching.
    ② Real pull: the not-enabled state reaches every self-hosted deployment with a shipped source and no embedder; zero measured use of move-in for sources, of an own-store source without an embedder under a runtime mount, or of retention on a source's object.
    ③ AI error surface: A is loud and names a working remedy at each door; Q2-B is a half-on state, Q3-B keeps rows past retention quietly, Q4-C repeats a false instruction.
    ④ No spread: A adds nothing to maintain; Q1-B adds an exported member, Q2-B and Q3-C add branches #38369 must pin.
    Prior rulings read: not enabled,reap guard,move-in,deployment's store,embedder → 2 hits; none (ADR-0154 D8 is the audit ledger's expiry; ADR-0161 K10 says the reap guard stays, which Q3 reads); thread: none; repo: objectstack-ai/objectstack
    Also read, by hand: ruling record 7220511579 on #37983; the dev report 7247665546; the contract review 7247818861; card #38369.

    Recommendation

    A on all four. End state: two years on, a deployment has one answer to "is knowledge on", shown the same on the settings page, in the tool list and at every save door, as the mainstream platforms model an org-level feature switch (Salesforce's org-wide feature enablement, from prior knowledge, not re-read for this card). A host that composes its own knowledge service stays outside, as ruled.

    Self-check: ① alone picks A on each; ②③④ flip it: no.

    Confidence gaps:

    After the ruling

    Related: #38369 (implementation), #37983 (ruling D), #38346 and #37000 (topics), #38352 (paused, restarts when this card closes).

  8. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5nLQFkgEZSDcCyuD82

    Ruling: letter A on each of the four questions (1A 2A 3A 4A) · maintainer 「全按推荐(1A 2A 3A 4A)」 · 2026-11-29T00:34Z

    Recorded by the decision thread opened for seat repo:objectstack#5. The maintainer (Leehom) tapped the option 「全按推荐(1A 2A 3A 4A)」 at 2026-11-29T00:34:10Z on the decision card that asked 「裁定 #38368 的四处细节:全按推荐(四处都选 A)吗」. The option's consequence line as he read it, verbatim: 「移入按保存拒绝;整个服务一个开关;未启用时到期清理不碰索引;提示按实际缺的那一半说。注记改约十行后交您审合。」 It is a tap on a card and not typed words: it answers what the card asked and nothing else. The four questions and their options are those of the analysis on this card, comment 7247902437, which the question message put to him in Chinese.

    Decision thread cmsg_01TenzsRopZj4jMbvjX8uz1XFdeyqHVkzjcTCCk6xpkM6d · question message cmsg_01TenzsRopZj4jMbvjX8uz1XWnnYJigtZ5RteLSGyS2v8D · decision card cmsg_01TenzsRopZj4jMbvjX8uz1XY6rrV5wr9d5BXkfqCDKcU1 (option index 0).

    What is ruled, for a knowledge service the runtime mounts that is not enabled

    Ruling-ref: 1A · 「全按推荐(1A 2A 3A 4A)」 · as put to him: 「A 算保存,拒绝并告诉他怎么修」

    1. Move-in (dev report 7247665546, open question). POST /packages/:id/move-in of a package-less knowledge_source is an author's save: it is refused while the service is not enabled, with the save's remedy. No door value is added to KnowledgeSourceSaveDoor.

    Ruling-ref: 2A · 「全按推荐(1A 2A 3A 4A)」 · as put to him: 「A 整个知识服务只有一个状态,一起停;这类应用改成自己挂知识服务就不受这条规则管」
    2. Review S1. The enabled state is the whole service's. Every source of a runtime-mounted service is held while it is not enabled, whichever store it names, including a store the application registered. An application whose store embeds on its own mounts the knowledge service itself in plugins[], which the third ruled ◆ leaves outside the note. This is a named part of #38369's declared narrowing.

    Ruling-ref: 3A · 「全按推荐(1A 2A 3A 4A)」 · as put to him: 「A 不碰索引,数据到期照常删」
    3. Review S2. While not enabled the service registers no lifecycle reap guard and calls no store: 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 it while not enabled, and the reconcile after enabling, or an operator's rebuild, removes it. This joins the note's known gap. K3 item 3 ("an index entry never outlives its row") is read with the note as the promise of an enabled service; no earlier sentence of the record is changed. The cost he was told: 「建过索引后又关掉的部署,旧索引里会留下已删数据的条目,期间没人能搜到,重新启用后的每日对账会清掉」.

    Ruling-ref: 4A · 「全按推荐(1A 2A 3A 4A)」 · as put to him: 「A 缺哪一半就说哪一半」
    4. Review S3. The refusal names the half that is missing. No embedder: the ruled sentence, unchanged ("save an embedder provider, restart, then save"). The deployment's store not mounted: the refusal says so and that the boot log names the reason, then mount it, restart, save. Both missing: both. The note's "the boot that first finds an embedder" reads "that first finds both". The exact English of the store sentence is the area's to write and the delta review's to read; it was not put to him word for word.

    Not ruled

    Next

  9. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
    os-dev-report

    {
      "issue": 38368,
      "status": "done",
      "branch": "claude/issue-38368-adr-0161-enabled-by-configuration",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38401",
      "session": "session_01FEkQ5oQLfL8thb6wtUHnTb",
      "premise_still_valid": true,
      "summary": "Patch round on draft pull 38401, new head 83e9252e: origin/main 3579cf13 merged first (merge commit 3ec1cf99), then one commit on the one ADR file (+12 -8; +22 -0 against main). The four points ruled on 2026-11-29 (record 7248214179, read before writing) are in the note as four bullets titled \"◆ Ruled 2026-11-29 (point N)\": move-in is an author's save, refused, no door value added (the two \"not decided\" sentences are gone); the state is the whole service's, whichever store a source names, and is a named part of the narrowing 38369 declares; no reap guard and no store call while not enabled, joined to the known gap, with K3 item 3 read as the promise of an enabled service; the save refusal names the half that is missing, and the enabling boot is the one that first finds both. The three choices of 2026-11-28 stay as recorded, byte-checked. Review nits N1, N2 and N4 are applied; N3 is not applied in the record, as ordered. ONE THING IS LEFT FOR THE SEAT: the pull body is not rewritten by this run, because os-dev.md forbids a subagent to PATCH a pull body while this order asks for it; the replacement body is prepared and its issue_patch stroke is dry-run accepted (see deviations, first entry). Nothing was readied, enqueued or armed, and no reviewer was knocked.",
      "tests": "No package is touched: no closure build owed, no package test or typecheck owed; a record is prose, nothing ablated. The union of derived checks ran after the final commit: git rev-parse --short HEAD = 83e9252e. Byte checks on the final tree: the six maintainer sentences of 2026-11-28 adjacent and in order, 「以上都同意」 and 「D 拒绝保存并说明」 present; the three card sentences of the first three ruled choices each present once, unchanged; the option text of the 2026-11-29 ruling present twice with its full-width parentheses (code points checked), each beside a link to record 7248214179; the mandated closing line present once; the sentence \"this note does not decide\" absent. Code read for the new sentences, on a tree whose packages, examples and content directories are byte-identical at ff69bcabb2 and at the merged head: the service core never reads the embedder service and the in-memory store plugin has no hit for it (point 2); the reap guard calls the store and a failed call keeps the row (point 3); a reconcile walk removes the documents of deleted rows for a store that lists its documents (point 3 and the known gap); under serve a declared capability whose provider cannot be provided is a hard boot error (N2).",
      "gates": "LOCAL, head 83e9252e, derived by `node scripts/pm/dispatch-gates.mjs --commands` (21 commands, the same list as on the first head), each exit code captured before any pipe, all 21 exit 0 on the first run: node scripts/check-adr-links.mjs · its --self-test · node scripts/check-closing-keyword-parity.mjs · its --self-test · node scripts/check-comment-mask-corpus.mjs · node scripts/ci/plan-test-core-shards.mjs --self-test · pnpm --filter @objectstack/lint run check:doc-formula-expressions (its two prerequisite packages built first under os-verify-lock, VERDICT command-exit 0, full cache replay) · pnpm check:adr-anchors · check:adr-index · check:adr-symbol-anchors · check:ci-filter-parity · check:closed-ceremony-text · check:cross-package-test-inputs · check:doc-authoring · check:driver-memory-census · check:gitlink-declared · check:nul-bytes · check:pm-governed-merges · check:pm-prior-rulings · check:refd-timer-probe · check:watch-hint-literal. Reconciliation: \"✓ dispatch-gates --ran: 21 derived famil(ies) accounted for — 21 run, 0 NOT-MEASURED\". Verdict lines: \"check-adr-links: 1268 relative link destination(s) under docs/adr/ resolve\"; \"check-adr-symbol-anchors: 4538 anchors across 164 records resolve\", 0 line anchors survive; \"adr-index --report: OK — docs/adr/README.md is current, every record parsed\". Before the push: overlap-check \"VERDICT clean exit 0\" against origin/main 3579cf136d; the pre-push hook passed (2 commit messages, no card relation, no model identifier in the trailer pair). CI, pull 38401 check-runs on head 83e9252e, one read about seven minutes after the push, 42 runs, not waited on: success (21) TypeScript Type Check, Type Check · workspace, Type Check · source gates, Type Check · debt ledger, Type Check · consumer gates, Lint · ESLint, Lint · docs and code guards, Lint · CI, release and engine gates, Lint · PM dispatch-gates, Lint · scoped · slot lookup and corpus, Lint · scoped · tooling self-tests, Lint · scoped · query-options erasure, PR-body guards (claim · duplicate · Part-of · single-writer path), Governed Surface Queue Guard, Check Documentation Links, Check PR Size, Auto Label, filter, Plan Test Core shards, Test UI, Dogfood Regression Gate; in progress (2) Lint · repo and tooling gates, Test Core (1/12): NOT MEASURED: those two CI jobs, reason: still running at the one reading and this order forbids waiting on CI; skipped (19) the path-filtered and opt-in jobs, Check Changeset among them on this event; failure 0 at that reading.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "6 this round, 15 since the dispatch — read tools only, no write tool. This round: issue_read x3 (get_comments on 38368 for the ruling record, get on 38369, and one get_comments on 38368 to read this comment back), pull_request_read x3 (get_comments on 38401 for the contract review, get_check_runs, get_files).",
      "api_writes": "1 this round, 3 since the dispatch — this os-dev-report comment on issue 38368 through scripts/pm/post-stamped.mjs (relay, POST /repos/objectstack-ai/objectstack/dispatches). No issue_patch was sent: the stroke was dry-run only, which reads the target and writes nothing. git pushes, not REST writes: 1 this round (f82aec1a..83e9252e, carrying the merge and the patch commit), 3 since the dispatch.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: 38369 · noted, not filed — the stdio MCP bridge reads the knowledge service for its tool in its own start() (packages/mcp/src/plugin.ts, knowledgeToolsService), before kernel:bootstrapped, the event at which the note says the enabled state is read; the implementation has to make search_knowledge absent on that transport too. Unchanged from the first report; the contract review verified it and named the same carrier.",
        "carrier: os-project-manager (the seat, per this order: \"it stays a follow-up\") · noted, not filed — review nit N3: the record's Consequences sentence on index state, \"The service keeps none of its own\", reads against the per-source sync state row that landed on main with pull 38307. The sentence is an earlier sentence of the record and is not edited here; the prepared pull body names the drift under Acceptance notes."
      ],
      "line_budget": "+22 -0 against main in 1 file; this round's commit is +12 -8 (eight existing lines of the note reworded, four bullets added). The deriver's own line: \"Changed lines — 22 (+22 / -0; generated files INCLUDED) vs the human-merge threshold 3000: under\".",
      "deviations": [
        "CONFLICT, named and not settled quietly: this order says to update the pull body through the relay issue_patch; os-dev.md says a subagent writes a pull body only at pr_create and never PATCHes it, the seat writes it, and that os-dev.md prevails where a dispatch order conflicts with it. So the body on the pull is still the first head's and still says move-in is undecided. The replacement is ready for the seat: line 1 is the attribution comment, the last non-empty line is the signed trailer the order names, no footer is sent, the open question is dropped, and its account of the four points, the nits, the departures and the gates is written for head 83e9252e. It is in this container only, valid while the seat's container lives: body /tmp/claude-0/-home-user/d80d6232-fbae-5e94-adce-f0c5c0a62e97/scratchpad/issue-38368/pr-body-r2.final.md (13655 bytes), stroke /tmp/claude-0/-home-user/d80d6232-fbae-5e94-adce-f0c5c0a62e97/scratchpad/issue-38368/pr-patch-actions.json. One command sends it: node scripts/pm/fleet-write/dispatch.mjs --repo objectstack-ai/objectstack --actions-file /tmp/claude-0/-home-user/d80d6232-fbae-5e94-adce-f0c5c0a62e97/scratchpad/issue-38368/pr-patch-actions.json --json. Its dry run exited 0: the trailer was accepted and the target read as a pull request.",
        "Nits, as ordered to report: 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); 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); N3 not applied in the record, as ordered.",
        "The exact English of the store sentence under point 4 is this area's, as the ruling record leaves it: the refusal says the deployment's store is not mounted and that the boot's log names the reason, and its remedy is \"mount the deployment's knowledge store, restart, then save\". It is for the delta review to read.",
        "Point 4 is written for the refusal of an author's save, at each door that refuses one (the three of ruling D and the move-in). The refusal of a direct search is left as the note already had it (\"names the remedy\"): the ruled words do not extend to it and this round adds nothing there.",
        "Point 2 carries one sentence past the ruling record's words, as the reason the point is a narrowing: 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. It is a reading of main, verified this round, and the contract review states the same.",
        "The note keeps its date, 2026-11-28. The four later points carry 2026-11-29 in the header's Amended line, in the note's first paragraph and in each bullet's title, each time beside the option text 「全按推荐(1A 2A 3A 4A)」 or the link to record 7248214179, in the shape the item 17 note uses for a ruling made by choosing a decision card's option.",
        "The order aims at about ten changed lines; the commit touches twelve lines of the note's text (eight reworded, four new bullets), which git counts as +12 -8.",
        "The worktree no longer existed, so it was rebuilt from the pushed branch with dev-worktree.sh --resume-from (the stale local branch ref, equal to the remote, was deleted first), and origin/main was merged with os-regen-merge.sh before the first edit, as os-dev.md orders for a resumed branch. Nothing was regenerated: the branch touches no generated path. The sentence \"The code this note cites was read on main at ff69bcabb2\" is left as written: the cited files are byte-identical at the merged head.",
        "The card, its thread, the pull's comments and card 38369 were read through MCP read tools, not the payload or single-card REST read os-dev.md names; counted in mcp_calls.",
        "CI was not waited on; test:repo and the full check farm are left to CI. The delta review of S1, S2 and S3 was not requested by this run: the order says not to knock any reviewer."
      ],
      "files_changed": [
        "docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md (+22 -0 against main; +12 -8 in this round's commit 83e9252e)"
      ]
    }
  10. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb

    Delivered: PR #38401 merged into main as 0c1b2ff (2026-11-29T01:35Z). L1 ACCEPT on thread L1-a. Contract review at CONTRACT_REVIEW_TIER: delta 7248551893, PASS on head 83e9252. Seat record 7248623505. Rulings recorded in the note: record 7248214179 (1A 2A 3A 4A). pm:dispatched removed in this stroke. Follow-ons: nit N3 (the Consequences sentence on index state) is a row on the weekly ADR revisions card #38438. Implementation card #38369 is unblocked and claimed next. #38352's Restart-when has fired, and the seat is taking it back to the maintainer.

  11. removed
    pm:dispatched
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:aidomain:skillspriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions