Skip to content

knowledge: a deployment that turns knowledge off has no way to drop the index its stores still hold #38416

Not planned

Description

@objectstack-fleet

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

Filing gate: ② a decision only the maintainer can make (whether to build it). Source: fleet — raised by the decision thread that ruled #38368's four points (record 7248214179 on #38368, its "Not ruled" list: "Whether a not-enabled deployment needs a command to drop a leftover index (#38369 refuses os knowledge rebuild in that state): noted in the analysis, not asked, no card filed").
Grading: area:ai · Feature · p3 (fleet-sourced Feature) · reach: a self-hosted deployment that built knowledge indexes, then removed its embedder or store settings · evidence: read on main — the adapters' dropSource exists (packages/plugins/knowledge-memory/src/index.ts, knowledge-pgvector/src/pgvector-adapter.ts, knowledge-turso/src/turso-adapter.ts) and the service calls it only for a removed source (packages/services/service-knowledge/src/knowledge-service.ts, the drop path near its dropSource doc comment); packages/cli/src/commands/knowledge/ holds status.ts and rebuild.ts only.

维护者速读

  • 用户能看到什么变化:关掉知识检索(删掉嵌入参数或存储)的自建部署,可以用一条命令清掉存储里留下的旧索引;今天没有办法。
  • 为什么做:按 ADR-0161 dated note: a mounted knowledge service is enabled by configuration; until then its sources are held and not served #38368 的裁定,未启用时不碰索引,旧索引里会留下条目,直到重新启用后的每日对账;永远不再启用的部署就一直留着。
  • 出错会怎样:不做的话只是存储里多占空间、留着已删数据的条目,期间没人能搜到;做的话误删可以重建恢复。
  • 要你做的:决定做不做(推荐暂不做,等真有部署提出)。

What (if built)

An operator command, for example os knowledge drop [SOURCE], that calls the adapter's dropSource for held sources on a deployment whose knowledge service is mounted but not enabled (the #38368 note's state). It needs the store mounted and no embedder; it is refused with a reason when the store is not reachable.

Four axes

  • Real business need. Measured: no deployment or example turns knowledge off after building an index today; the state itself lands with service-knowledge: a self-hosted deployment with no embedder holds its knowledge sources without serving them, and lists no search_knowledge #38369. The leftover is invisible (nothing searches it) and is removed by the reconcile if the deployment enables again. The only pull is a deployment that disables knowledge for good and cares about the store's size or about deleted rows' text staying in it.
  • Long-term soundness. dropSource is already the contract member (ADR-0161 K8 item 4); a command is a thin reader of it, no new member.
  • Preventing AI mistakes. Neutral: it is an operator action, not metadata an agent writes.
  • Startup focus. Recommendation: not now. Re-open when a deployment asks, or fold into the first operator card that touches os knowledge.

Reader: seat repo:objectstack#5, area o5-ai37000, if the maintainer rules build; otherwise it closes not planned with the ruling.
Related: #38368 (the note), #38369 (refuses os knowledge rebuild while not enabled), #37000.
Dedupe: knowledge dropSource 14 (open: #37000 only) · knowledge leftover index 24 (open: #38368, #38369, unrelated #38150 #37391) · knowledge purge index command 36 (none on this) · os knowledge drop 352 (none on this).

Activity

  1. added
    needs-user-decision
    area:ai
    on Nov 29, 2026
  2. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t

    Triage: lands in packages/cli/src/commands/knowledge/ (a drop command beside status.ts and rebuild.ts, calling the adapters' existing dropSource) · area:ai · domain:server · Feature · p3 · needs-user-decision kept (a decision card is never moved by triage) · size S. Rationale: a deployment that turns knowledge off has no way to drop the index its store still holds. It was raised from the "not ruled" list of #38368 and is fleet-sourced. It is not a topic child and not pre-authorised, so it is not dispatched and goes on triage's weekly Feature list for the maintainer to pick, fold into a topic or close. The card itself recommends "not now".

    Recorded 2026-11-29T00:50Z.

  3. added
    domain:server
    on Nov 29, 2026
  4. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Decision analysis · 2026-11-29T05:07Z · #38416, whether to build an operator command that drops the index a store still holds after a deployment turns knowledge off. Written by the decision thread opened for seat repo:objectstack#5. ⛔ Not a claim and not a ruling: the maintainer rules.

    维护者速读

    • 问题:自建部署建过知识索引、后来又把知识检索关掉(去掉嵌入参数或存储),存储里会留着旧索引,其中包括之后已删除记录的文字。关着的时候没人能搜到它,重新启用后每日对账会清掉;永远不再启用的部署就一直留着,今天没有命令能清。目前没有任何部署处在这个状态。
    • 选项:A 暂不做,关单,等有部署提出再重开,或并进下一张运维命令的卡;B 现在做一条清理命令,等「未启用」那张卡合并后一个小 PR。
    • 推荐 A:今天没有部署会碰到;这条命令只是调用存储已有的清理能力,以后再做成本一样,现在不做不会留下要返工的东西。
    • 不定会怎样:卡一直挂在待裁决里;对用户没有影响。

    Background

    Card #38416 (p3, Feature, area:ai, domain:server, not a topic child) was filed by seat repo:objectstack#5 from the "Not ruled" list of ruling record 7248214179 on #38368: a not-enabled deployment has no command to drop a leftover index, because #38369 refuses os knowledge rebuild in that state. The card itself recommends "not now". Triage (7248395595) kept it as a decision card for the maintainer to pick, fold or close.

    Governing text

    • ADR-0161 K8, note of 2026-11-28, point 3 as ruled 2026-11-29: "While it is not enabled the service registers no lifecycle reap guard and calls no store ... 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."
    • Same note, "A known gap": "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." The leftover is a gap the maintainer accepted with that ruling; what the record does not cover is the deployment that never enables again.
    • ADR-0161 K8 item 4: dropSource is already a contract member. A drop command reads it; it adds no member, so the closed list (K8 rule 5) is not touched.
    • pm-dispatch state model: a card with no mechanism that can wake it is not held; it closes not planned with its reason, and reopening is free.

    Protocol statement: no option edits a protocol. B adds a CLI command.

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

    1. Every store this repository ships can drop a source's index. grep -n "async dropSource" packages/plugins/knowledge-*/src/*.ts (memory, pgvector, turso).
    2. The service calls it on one path only, the removal of a source through the metadata door. grep -n "dropSource" packages/services/service-knowledge/src/knowledge-service.ts (dropMetadataSource). While not enabled the service calls no store (the ruled point 3), so removing the source in that state will not drop it either once service-knowledge: a self-hosted deployment with no embedder holds its knowledge sources without serving them, and lists no search_knowledge #38369 lands.
    3. The operator commands are status and rebuild only. ls packages/cli/src/commands/knowledge/.
    4. The not-enabled state is not on main yet: service-knowledge: a self-hosted deployment with no embedder holds its knowledge sources without serving them, and lists no search_knowledge #38369 is in flight in three serial PRs (PR feat(service-knowledge)!: a knowledge service the runtime mounts holds its sources without an embedder or its deployment store #38470 is the first). grep -n -i "not enabled" packages/cli/src/commands/knowledge/*.ts prints nothing. The state this card is about does not exist in a release today.
    5. No example or deployment known to this thread turns knowledge off after building an index (the card's own measurement; not re-measured here).

    The question

    A deployment that built a knowledge index and then turned knowledge off for good keeps the old index, including text of rows deleted since, with no command to remove it. Is a removal command built now, before any deployment is in that state?

    Options, real cost, effort

    Option What is done What customers see Effort
    A: not now The card closes not planned with this ruling as its reason. It reopens when a deployment asks, or the command rides the next operator card that touches the knowledge commands. Nothing changes. A deployment that turns knowledge off keeps an index nobody can search; turning it on again cleans it within a day; a deployment that must purge without re-enabling uses its database's own tools on the store. None.
    B: build now One command that drops what the store holds for the held sources, on a deployment whose service is mounted but not enabled; refused with a reason when the store cannot be reached. Lands after #38369. An operator who turned knowledge off can clear the leftover with one command. A mistaken run is repaired by enabling and rebuilding. domain:server · 1 PR, size S by triage. No landed precedent of that size: PR #37439 (+1988/−5) built status, rebuild and their service side together. A command that deletes data, so an L1 read of the confirmation and refusal paths.

    Business meaning

    • A: nobody has moved out of the flat yet, so the landlord does not print a move-out checklist.
    • B: the checklist is printed and filed now, for a tenant who may never leave.

    Four axes

    • Long-term fit. A complete operator kit will one day include a drop, as every search engine's does. Nothing about today's code gets harder to extend by waiting: the contract member exists, the command is a thin reader of it, and nothing built in between has to be undone. Building it now neither removes a special case nor prevents one.
    • Real pull. None measured. The state arrives with service-knowledge: a self-hosted deployment with no embedder holds its knowledge sources without serving them, and lists no search_knowledge #38369, which is not released. The only customer who would feel the absence is one who disables knowledge permanently and has a duty to purge deleted records' text; none is known.
    • AI error surface. Neutral. It is an operator's action, not metadata an agent writes. A destructive command is one more thing an agent with shell access can run by mistake; the loss is recoverable by a rebuild.
    • No spread. A adds nothing. B adds a command with no user, which then has to be kept working across every store and every later change to the enabled state.

    os-decision-facets
    ① Long-term fit: neutral on timing; the drop is a thin reader of an existing contract member whenever it is built, and waiting leaves nothing to undo.
    ② Real pull: zero; the not-enabled state is not released and no deployment turns knowledge off after building an index.
    ③ AI error surface: neutral; an operator command, recoverable by a rebuild.
    ④ No spread: A adds nothing; B adds a destructive command with no user and a standing upkeep cost.
    Prior rulings read: dropsource,leftover,knowledge,drop → 23 hits; ADR-0027 Decision §12, ADR-0041 Decision §5, ADR-0056 D4, ADR-0057 D11, ADR-0061 D6, ADR-0062 D8, ADR-0064 Decision §3, ADR-0067 D5, ADR-0078 Decision §6; thread: none; repo: objectstack-ai/objectstack
    Also read, by hand: ADR-0161 K8 note of 2026-11-28 (point 3 and "A known gap"), ruling record 7248214179 on #38368, #38369's body, triage 7248395595. None of the named ADR decisions is about a knowledge index; they match on "drop" or "knowledge" only.

    Recommendation

    A, not now. End state: the operator kit gains a drop when a deployment needs one; until then the accepted gap in ADR-0161 describes exactly what is left behind and what removes it. Zero pull, so the rule is not to spread.

    Not taken. B: a command for a state no release has and no deployment is in.

    Self-check: ① alone is neutral on timing; ②③④ flip it: no, ② and ④ set the timing to not now.

    Confidence gaps:

    After the ruling

    Related: #38368 (the note), #38369 (the not-enabled state), #37000 (topic), PR #37439 (the existing operator commands).

  5. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Ruling: letter A · maintainer 「A 暂不做,关单」 · recorded 2026-11-29T06:01Z

    • Who and when: the maintainer (Leehom, os-project-manager) tapped option A on the decision card at 2026-11-29T06:01:03Z. The card's question, as he read it: 「定关掉知识检索后清理旧索引的命令做不做」. The option's label, verbatim: 「A 暂不做,关单」. Its one-line consequence on the card, verbatim: 「卡片关闭,有部署提出时重开或并进下一张运维命令的卡;关着时旧索引没人能搜到,重新启用后每日对账会清掉。」 He added no condition.
    • Ruling-ref: decision thread cmsg_01TenzsRopZj4jMbvjX8uz1XDhnaLQdueQRRJsU18ywLAR, decision card cmsg_01TenzsRopZj4jMbvjX8uz1XERmyp3KcuifFiE8pu7PAsP, option index 0. Analysis: comment 7251068795 on this card.
    • What is ruled: no drop command is built now. The card closes not planned. It reopens when a deployment asks, or the command rides the next operator card that touches the knowledge commands.
    • Not taken: 「B 现在做」.
    • Not ruled: nothing further; the leftover itself stays the known gap ADR-0161's note of 2026-11-28 records (point 3).
    • Next: seat repo:objectstack#5 posts the closing record and the card closes not planned. The close stroke needs a person, since the seat's sessions are refused it.
  6. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Closing record · not planned · 2026-11-29T06:06Z

    • Ruling-ref: 7251608284 (maintainer 「A 暂不做,关单」, decision card option 0, analysis 7251068795).
    • No drop command is built now. While knowledge is off, nobody can search the old index; once it is re-enabled, the daily reconcile clears it. The leftover stays the known gap in ADR-0161's note of 2026-11-28 (point 3).
    • Reopen when a deployment asks for the drop, or fold it into the next operator card that touches the knowledge commands.
  7. removed
    needs-user-decision
    on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aidomain:serverpriority:p3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions