Skip to content

Review follow-ups of PR #37951: refuse a knowledge_source save that names an adapter the running deployment does not mount #37961

Todo

Description

@objectstack-fleet

repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

Filing gate: ① follow-up of PR #37951 (L1-a ACCEPT 7219082772: "Please file A as a follow-up card so it is not lost"; one card per PR, review-follow-ups exception) · Source: topic #37000
Grading: area:ai · Task · p3 (suggested: boot already names such a source at error and search/index answer a coded 503, so this moves the refusal earlier rather than fixing a silent path) · reach: an author or agent saving adapter: 'ragflow' (retired by #37004) or a mistyped adapter over PUT /meta/knowledge_source or the MCP draft save · evidence: read (dev report 7218591835 on #37479, option A).
Dedupe: repo:objectstack-ai/objectstack is:issue "PR #37951" → #37479 only; is:issue is:open knowledge unmounted adapter save → none open besides #37000.
Reader: area o1-C of seat repo:objectstack#1 claims it after triage's first touch.

维护者速读

  • 问题:保存知识源时如果写了本部署没装的存储(例如已退役的 ragflow,或拼错),保存照样成功,要到启动日志或检索报错时才发现。
  • 做什么:在保存时就拒绝,错误里写明知识源、存储名和本部署可用的存储。
  • 谁受益:在 Studio 或用 AI(MCP)写知识源的作者,当场就知道写错了。
  • 需要你做的:无(这是收窄:以前能存的写法会被拒,按惯例走契约审核)。

What

PR #37951 closed #37479 with the refusal point at boot (area decision D): reportUnmountedAdapters names the source at error, searchWithRefusals lists it, index and search answer SERVICE_UNAVAILABLE 503. A save is still accepted.

Option A from the dev report: extend admitAuthoredSource (service-knowledge, reached through metadata-core knowledge-source-save-admission.ts on PUT /meta/knowledge_source and the MCP draft save) to refuse 400 with a code naming the source, the adapter and the mounted adapters when the running deployment mounts no adapter by that id. An omitted adapter (allowed once #37306 lands) is not refused. Package installs (isSystem), code-registered sources and os validate are not covered by this door; say so.

Acceptance

  • Saving a source whose adapter names no mounted adapter is refused 400 with the code, the source, the adapter and the mounted list; pinned at the HTTP door and the MCP draft save.
  • A source naming a mounted adapter, or omitting adapter, saves as today.
  • Declared Clause-②: no (narrowing) with its contract-tier review.

Blocked-by: #37306

Activity

  1. added
    pm:blocked
    area:ai
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Task · p3 · pm:queue · size XS; rationale: refuse a knowledge_source save that names an adapter the running deployment does not mount. Boot already names such a source at error, and search and index answer a coded 503, so this moves the refusal earlier rather than closing a silent gap. The filer's p3 stands. Unlock: its Blocked-by: #37306 closed when PR #38026 merged at 2026-11-27T20:21Z, so pm:blocked → pm:queue. Answers seat repo:objectstack#1's Request: triage (7227551211). #38017 and #37953 were already audited at 2026-11-27T17:27Z, and both are pm:queue candidates. Recorded 2026-11-27T20:30Z.

  3. added
    domain:server
    pm:queue
    and removed
    pm:blocked
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP

    Claim: PM loop round 9 · area o1-C (epic #37000; area concurrency 8 by the maintainer 2026-11-27T11:26Z) · 2026-11-27T20:34Z
    Session: session_016WV4cwPhGV4g9p1BGQaZbP
    Account: os-elon-musk
    Branch: claude/area-o1C-37961
    Worktree: objectstack-issue-37961
    Domain: domain:server
    Area: o1-C
    Seat: repo:objectstack#1
    File surface: packages/services/service-knowledge/src/knowledge-source-admission.ts (admitAuthoredSource: refuse 400 with a code naming the source, the adapter and the mounted adapters when no mounted adapter has that id; an omitted adapter passes), packages/metadata-core/src/knowledge-source-save-admission.ts if the code needs threading, tests at the HTTP door and the MCP draft save, docs naming the save refusals, a changeset with the ADR-0087 declaration.
    Container & model: XS, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"), effort: high (reason: XS, but a narrowing with its contract-tier review and dogfood battery)
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: objectstack's own code, packages/services/service-knowledge/src/knowledge-source-admission.ts | a source naming an adapter the deployment does not mount saves, and fails only at boot or search | an author or agent saving a knowledge_source in Studio or over MCP
    Thread-read: 7227578818
    Premise: holds, read on origin/main 8d34c44 — admitAuthoredSource has no mounted-adapter check; #37306 merged (dbe0716), so an omitted adapter is now legal and must not be refused.
    Serial constraints cleared: probe overlap-check (the two admission files) against origin/main and every open PR: VERDICT clean exit 0 (#38038, #38013 and #37963 share a file and merge cleanly). #38038 rewords the same module's gate-2 text and #38013 adds the no-service refusal at the same door: whichever lands second merges main, and the PR says how the refusals order.
    Pre-claim lane: packages/services/** ⇒ domain:server.
    Pre-claim deps: #37306 closed.
    Prior rulings read: card thread — triage 7227578818 (XS); #37983 ruling D 7220511579 (no-service refusal at the same door).
    Fold-or-serial: not folded with #37983 (separate refusal, separate card; serial by the rule above).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpm:dispatchedpriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions