Repository navigation
Description
repo:objectstack#8 · sunhaolin · session_017xRBcSSm1UGomShRsemA1N
Filing gate: ③ maintainer-directed. Source: maintainer (the words quoted on the ADR note card #38368, including 「以上都同意」 on its three ◆ choices).
Grading: area:ai · Feature · p2 (maintainer-sourced) · reach: every self-hosted deployment that serves an app shipping a knowledge_source with no embedder saved · evidence: read from the code on main c6a1328 — packages/services/service-knowledge/src/knowledge-service-plugin.ts registers UnconfiguredEmbedder at kernel:bootstrapped and keeps the service and its tool; packages/mcp/src/mcp-http-tools.ts registers search_knowledge whenever the service defines it, so today such a deployment lists a tool every call of which fails.
Blocked-by: #38368
维护者速读
- 做什么:没配嵌入参数(或存储没挂上)的私有部署,知识源留着但不生效:不建索引、不搜,MCP 里不再列出知识检索工具,设置页写明未启用;配好并重启后自动启用。
- 为什么:今天这种部署上工具照常列出、每次调用都失败,智能体看到的不是应用真能做的;基础模板要带知识源,必须先有这一步。
- 影响:这种部署上保存知识源会被当场拒绝并说明怎么修(今天是保存成功、之后建索引失败);复制应用包照常;属于收窄,按审批走。
- 要你做的:无(实现后按收窄由审批人批准)。
What
resolveCapabilityArgument('knowledge', …)(packages/core/src/capability-composition.ts) hands the service one more option besidedeploymentAdapter, marking it runtime-composed. A plugin constructed without it behaves exactly as today.- With the option,
provideEmbedderrecords the outcome. Not enabled = no embedder available, or the deployment's store not mounted. Then: no boot build, no record sync, no reconcile job, no adapter call;knowledgeTools().definitionsis empty;searchandsearchWithRefusalsanswer503 SERVICE_UNAVAILABLEwith the remedy; the unplaceable-sourceerrorline is folded into one line whose level follows the ADR note. - The save predicate (
packages/metadata-core/src/knowledge-source-save-admission.ts, aroundadmitAuthoredSource) refuses a non-system save while not enabled fordoor: 'save';door: 'duplicate'goes on. The existing no-service refusal gains "and save an embedder provider". - The Knowledge settings page's
index_statusanswer andos knowledge statusstate "not enabled", the reason and the number of held sources;os knowledge rebuildis refused with the remedy. - The
aiembedder section's help text says that saving a provider and restarting sends each knowledge source's listed fields to it. - Docs in the same PR:
content/docs/ai/knowledge-rag.mdx,content/docs/protocol/knowledge.mdx.skills/objectstack-ai/SKILL.mdin its own governed PR.
Acceptance (each pinned)
- Runtime-composed, a shipped source, no embedder: service and store mounted, state not enabled, zero adapter calls across boot and a record write, exactly one log line, at
info. - Same with
requires: ['knowledge'], or a provider saved without a key: the line iswarnand names the reason; the boot succeeds. - Neither MCP transport lists
search_knowledgewhen not enabled; both list it when an embedder is registered by a plugin or built from settings. - The three save doors refuse with the stated remedy and write nothing; the duplicate door copies the package.
- A host-composed
KnowledgeServicePluginwith no embedder behaves byte for byte as onmain. packages/verify/src/harness.required-providers.test.tskeeps its existing build-and-search case green unchanged.- The composition parity suites (
capability-composition.test.ts,plan.artifact-item-capabilities.test.ts,boot-preparation-parity.test.ts,standalone-stack.test.ts) change only for the added option. - Live:
os devon an app with one source and no embedder shows the page state and no tool; after saving a provider and restarting, the source builds and the tool is listed (positive control measured, not assumed). - Declared as a narrowing: ADR-0087 registration,
Metadata-protocol: narrowed, a BREAKING changeset, as PR feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013 did.
File surface
packages/core/src/capability-composition.ts(+ test)packages/services/service-knowledge/src/knowledge-service-plugin.ts,knowledge-service.ts,knowledge-tools.ts,knowledge-build-actions.ts,knowledge-source-admission.ts(+ tests)packages/metadata-core/src/knowledge-source-save-admission.ts(+ test)- door pins:
packages/rest/src/meta-write-door-capability-enumeration.test.ts,packages/runtime/src/domains/meta-save-capability-gate.test.ts,packages/runtime/src/domains/mcp-authoring.test.ts,packages/runtime/src/domains/packages-knowledge-source-gate.test.ts packages/runtime/src/mcp-knowledge-tools-bridge.test.ts,packages/mcp/src/mcp-knowledge-tools.test.ts(tests only)packages/verify/src/harness.required-providers.test.tspackages/cli/src/commands/knowledge/status.ts,rebuild.ts(+ test)packages/services/service-settings/src/manifests/ai.manifest.tsand its translationspackages/objectql/src/knowledge-source-unserved.ts(remedy text)- the two docs pages; a changeset; the ADR-0087 entry
Not in scope: an always-on service; a pre-boot settings read; hot enabling without a restart; a boot probe of the store; cloud.
Known open item, not built here: on PostgreSQL without the vector extension the failure still surfaces at first table creation, not at boot.
Related: #37000 (knowledge platform topic), #37983, PR #38013, #38346.
Reader: triage routes it to the lane holding #37000; the self-hosted Starter knowledge example waits on it.
Dedupe: as on #38368.
Activity
objectstack-fleet commentedon Nov 28, 2026
triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t
Triage: lands in
packages/core/src/capability-composition.ts,packages/services/service-knowledge/src/knowledge-service-plugin.ts,packages/metadata-core/src/knowledge-source-save-admission.ts, the MCP tool registration and theos knowledgecommands · area:ai · domain:server · Feature · p2 (maintainer-sourced) · pm:blocked (Blocked-by: #38368, in the body) · size L. Rationale: carries out the ruling recorded on #38368: a self-hosted deployment with no embedder or no store holds its sources unserved and lists nosearch_knowledge. Today it lists a tool every call of which fails, which breaks AI core feature ④ ("what MCP exposes is what the application really can do"). The new save refusal is a narrowing that is ruled; the PR declaresClause-②: yes (narrowing)and goes to the approver. Size L (five packages), so split before dispatch. The cut follows the card's numbered items: service enablement and tool absence (1–2), save refusal (3), status, CLI and settings text (4–5). The first PR carries the seam. It waits on the ADR note #38368, which it cites as its authority.Path: none
Recorded 2026-11-28T16:18Z.
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
Card amended by ruling — the maintainer ruled the four open points of the note #38368 builds on: record 7248214179 on #38368, 「全按推荐(1A 2A 3A 4A)」. The ADR note on PR #38401 is being patched to that text. This card carries the four points as written there; each is pinned, and points 2 and 3 are named parts of the declared narrowing.
Ruling-ref: 1A · 「全按推荐(1A 2A 3A 4A)」
POST /packages/:id/move-inof a package-lessknowledge_sourceis an author's save: refused while not enabled, with the save's remedy. It already asks the predicate withdoor: 'save', so item 3 yields it; add its door pin (packages/runtime/src/domains/packages-knowledge-source-gate.test.ts). No door value is added toKnowledgeSourceSaveDoor.Ruling-ref: 2A · 「全按推荐(1A 2A 3A 4A)」
2. The enabled state is the whole service's. Every source of a runtime-mounted service is held while 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[]. Part of the declared narrowing. The acceptance line "packages/verify/src/harness.required-providers.test.tskeeps its existing build-and-search case green unchanged" is read with this point: a case that places a source on an application-registered store under a runtime-composed service now reads held; the dev measures which case that is and moves it to the ruled behaviour (or to a host-mounted composition), naming it in the PR body.Ruling-ref: 3A · 「全按推荐(1A 2A 3A 4A)」
3. While not enabled the service registers no lifecycle reap guard and calls no store: a retention sweep deletes rows on time. An entry left in a store that holds an earlier index is searched by nobody while not enabled, and the reconcile after enabling or an operator rebuild removes it. Part of the declared narrowing (it is a change to what K3 item 3 promises for a not-enabled service). Pin: a retention sweep on a held source's object deletes on time with zero adapter calls.
Ruling-ref: 4A · 「全按推荐(1A 2A 3A 4A)」
4. The refusal names the half that is missing. No embedder: "save an embedder provider, restart, then save" (ruled, unchanged). 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. This refines item 3's "gains 'and save an embedder provider'" and the save-door acceptance line ("the stated remedy"): pin each half. The note's final store sentence on PR #38401 is the wording source.
Still
pm:blockedon #38368 (Blocked-by unchanged). Not ruled, filed separately: a command to drop a leftover index on a not-enabled deployment.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
For the implementation (from the contract review of the ADR note, delta record 7248551893 on PR #38401, section ③). Nothing is owed in the note; each is a point this card's build meets, read on main by the reviewer and not re-measured here:
kernel:readyon main, before the enabled state is read atkernel:bootstrapped, and the lifecycle service has no unregister. Point 3 of the amendment above (no reap guard while not enabled) needs registration to wait for that reading.searchrefusal's remedy should name the missing half too, as the save refusal does (point 4).start()(packages/mcp/src/plugin.ts), beforekernel:bootstrapped;search_knowledgemust be absent on that transport too.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
Claim: PM loop round 1 · 2026-11-29T01:38Z
Session:
session_01FEkQ5oQLfL8thb6wtUHnTbAccount:
os-project-managerBranch:
claude/issue-38369-knowledge-held-not-servedWorktree:
objectstack-issue-38369Domain:
domain:serverSeat:
repo:objectstack#5Area:
o5-ai37000File surface: the card's "File surface" list as written (
packages/core/src/capability-composition.ts(+ test);packages/services/service-knowledge/src/knowledge-service-plugin.ts,knowledge-service.ts,knowledge-tools.ts,knowledge-build-actions.ts,knowledge-source-admission.ts(+ tests);packages/metadata-core/src/knowledge-source-save-admission.ts(+ test); the four door pins;packages/runtime/src/mcp-knowledge-tools-bridge.test.ts,packages/mcp/src/mcp-knowledge-tools.test.ts;packages/verify/src/harness.required-providers.test.ts;packages/cli/src/commands/knowledge/status.ts,rebuild.ts(+ test);packages/services/service-settings/src/manifests/ai.manifest.tsand its translations;packages/objectql/src/knowledge-source-unserved.ts;content/docs/ai/knowledge-rag.mdx,content/docs/protocol/knowledge.mdx; changesets; the ADR-0087 entry), pluspackages/mcp/src/plugin.ts(build note 4 of 7248592159: the stdio bridge reads the tool in its ownstart()) (stop on breach; explain in the report).skills/objectstack-ai/SKILL.mdis not in it: its own governed card after the build.Container & model: L, mode:thread, model: default (dispatch-gates --tier at 0c1b2ff, "Model tier — no path-derived mandate"; a ruled narrowing with design judgement, so not floor), effort: high (L, five packages)
Clause-②: no
Metadata-protocol: narrowed
Responsibility: n/a — not a defect card
Thread-read: 7248592159
Premise: holds at 0c1b2ff —
knowledge-service-plugin.tsregistersUnconfiguredEmbedder(class at :124, registered at :1073) atkernel:bootstrapped(:690) and schedules the reconcile there (:729–730); the reap guard registers atkernel:ready(:744);resolveCapabilityArgumenthandsknowledgeonly{ deploymentAdapter }(capability-composition.ts:297–298);mcp-http-tools.tsregisterssearch_knowledgewherever the service defines it (:3699) and the stdio bridge reads the service inplugin.ts(:213); the save predicate's doors are inknowledge-source-save-admission.ts. The ADR-0161 K8 dated note (PR #38401, merged 0c1b2ff) is the authority.Serial constraints cleared:
check-handover --inflight at 0c1b2ffe: 2 overlaps, both handled. (1) #38351 (this area's card thread) claims the two docs pages: the docs edits queue behind #38351's merge (main merged in first), no push to those pages before it. (2) #38184 (seat repo:objectstack#6) claims packages/services/service-settings/** wide, and its open PR #38255 touches no file there (EXCESS on the reconcile): false overlap, overlap-check before every push that touches ai.manifest.ts. #38418 (p1, re-seated seat 1) is on knowledge-sync-state.ts, outside this surface: overlap-check before every push touching service-knowledge.Pre-claim lane:
packages/services/**,packages/core/**⇒ domain:server (file ownership only); in this area by the seat's order (area o5-ai37000, #38369 after #38368 merges).Pre-claim deps:
Blocked-by: #38368, closed (PR #38401 merged as 0c1b2ff);pm:blockedremoved in this stroke.Prior rulings read: record 7248214179 on #38368 「全按推荐(1A 2A 3A 4A)」 (amended onto this card, 7248231750); the maintainer on #38368 「以上都同意」 on its three ◆ choices; ruling D on #37983 (record 7220511579) 「D 拒绝保存并说明」 with its item 5 (the service never always-on); ADR-0161 K8 dated note of #38368. check-prior-rulings --card 38369: 0 ruling comments on the thread; ADR hits read, none conflicts with the ruled route.
Narrowing: tool absence while not enabled, sources held, no reap guard, and the save refusal. PR bodies and changesets declare
Clause-②: no (narrowing)andMetadata-protocol: narrowed, with a BREAKING changeset and an ADR-0087 entry, as PR #38013 did. A full dogfood run at the final head, one contract-review-tier review on the final head, and the seat lands it.Split: size L, cut as triage named it (7242143436). PR 1 is items 1–2 (enablement seam, held sources, tool absence on both transports, amendment points 2–3, build notes 1, 2 and 4). PR 2 is item 3 (save refusal, amendment points 1 and 4, build note 3). PR 3 is items 4–5 (status, CLI, settings text). They run serially in one card thread, each on main after the one before it merges. Scope review: exempt (maintainer source, ruled route).
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
Claim amended (7248923747), branch only. The card thread (session
session_01FEkQ5m2rYCwPR3qqhnZDfW, served claude-opus-5-5 at effort high, matching the claim's Container & model line) may push only to its platform branch, so the PRs' head is that branch. The local worktree keeps the claimed name.Branch:
claude/project-thread-mu3i0tRecorded 2026-11-29T01:45Z.
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
Claim: PM loop round 1 · 2026-11-29T03:55Z
Session:
session_01FEkQ5oQLfL8thb6wtUHnTbAccount:
os-project-managerBranch:
claude/project-thread-mu3i0tWorktree:
objectstack-issue-38369Domain:
domain:serverSeat:
repo:objectstack#5Area:
o5-ai37000File surface: the card's "File surface" list as written (
packages/core/src/capability-composition.ts(+ test);packages/services/service-knowledge/src/knowledge-service-plugin.ts,knowledge-service.ts,knowledge-tools.ts,knowledge-build-actions.ts,knowledge-source-admission.ts(+ tests);packages/metadata-core/src/knowledge-source-save-admission.ts(+ test); the four door pins;packages/runtime/src/mcp-knowledge-tools-bridge.test.ts,packages/mcp/src/mcp-knowledge-tools.test.ts;packages/verify/src/harness.required-providers.test.ts;packages/cli/src/commands/knowledge/status.ts,rebuild.ts(+ test);packages/services/service-settings/src/manifests/ai.manifest.tsand its translations;packages/objectql/src/knowledge-source-unserved.ts;content/docs/ai/knowledge-rag.mdx,content/docs/protocol/knowledge.mdx; changesets; the ADR-0087 entry), pluspackages/mcp/src/plugin.ts(build note 4 of 7248592159: the stdio bridge reads the tool in its ownstart()) (stop on breach; explain in the report).skills/objectstack-ai/SKILL.mdis not in it: its own governed card after the build.Container & model: L, mode:thread, model: default (dispatch-gates --tier at 0c1b2ff, "Model tier — no path-derived mandate"; a ruled narrowing with design judgement, so not floor), effort: high (L, five packages)
Clause-②: no
Metadata-protocol: narrowed
Responsibility: n/a — not a defect card
Thread-read: 7248999781
Premise: holds at 0c1b2ff —
knowledge-service-plugin.tsregistersUnconfiguredEmbedder(class at :124, registered at :1073) atkernel:bootstrapped(:690) and schedules the reconcile there (:729–730); the reap guard registers atkernel:ready(:744);resolveCapabilityArgumenthandsknowledgeonly{ deploymentAdapter }(capability-composition.ts:297–298);mcp-http-tools.tsregisterssearch_knowledgewherever the service defines it (:3699) and the stdio bridge reads the service inplugin.ts(:213); the save predicate's doors are inknowledge-source-save-admission.ts. The ADR-0161 K8 dated note (PR #38401, merged 0c1b2ff) is the authority.Serial constraints cleared:
check-handover --inflight at 0c1b2ffe: 2 overlaps, both handled. (1) #38351 (this area's card thread) claims the two docs pages: the docs edits queue behind #38351's merge (main merged in first), no push to those pages before it. (2) #38184 (seat repo:objectstack#6) claims packages/services/service-settings/** wide, and its open PR #38255 touches no file there (EXCESS on the reconcile): false overlap, overlap-check before every push that touches ai.manifest.ts. #38418 (p1, re-seated seat 1) is on knowledge-sync-state.ts, outside this surface: overlap-check before every push touching service-knowledge.Pre-claim lane:
packages/services/**,packages/core/**⇒ domain:server (file ownership only); in this area by the seat's order (area o5-ai37000, #38369 after #38368 merges).Pre-claim deps:
Blocked-by: #38368, closed (PR #38401 merged as 0c1b2ff);pm:blockedremoved in this stroke.Prior rulings read: record 7248214179 on #38368 「全按推荐(1A 2A 3A 4A)」 (amended onto this card, 7248231750); the maintainer on #38368 「以上都同意」 on its three ◆ choices; ruling D on #37983 (record 7220511579) 「D 拒绝保存并说明」 with its item 5 (the service never always-on); ADR-0161 K8 dated note of #38368. check-prior-rulings --card 38369: 0 ruling comments on the thread; ADR hits read, none conflicts with the ruled route.
Narrowing: tool absence while not enabled, sources held, no reap guard, and the save refusal. PR bodies and changesets declare
Clause-②: no (narrowing)andMetadata-protocol: narrowed, with a BREAKING changeset and an ADR-0087 entry, as PR #38013 did. A full dogfood run at the final head, one contract-review-tier review on the final head, and the seat lands it.Split: size L, cut as triage named it (7242143436). PR 1 is items 1–2 (enablement seam, held sources, tool absence on both transports, amendment points 2–3, build notes 1, 2 and 4). PR 2 is item 3 (save refusal, amendment points 1 and 4, build note 3). PR 3 is items 4–5 (status, CLI, settings text). They run serially in one card thread, each on main after the one before it merges. Scope review: exempt (maintainer source, ruled route).
This re-posts claim 7248923747 with the card thread's platform branch (amendment 7248999781); the card thread was served claude-opus-5-5 at effort high.
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5m2rYCwPR3qqhnZDfW
os-dev-report
{ "issue": 38369, "status": "done", "branch": "claude/project-thread-mu3i0t", "pr": "https://github.com/objectstack-ai/objectstack/pull/38470", "session": "session_01FEkQ5m2rYCwPR3qqhnZDfW", "premise_still_valid": true, "summary": "Part 1 of 3 (items 1-2, ruling points 2-3, build notes 1, 2, 4). A knowledge service the runtime composes now reads, once at kernel:bootstrapped, whether an embedder is available and the deployment store is mounted; without both every source is held (listed; never built, synced, reconciled or searched; no tool definition; search/rebuild/reindex answer 503 SERVICE_UNAVAILABLE naming the missing half; no reap guard and no store call), said in one info/warn boot line, never a boot refusal. stdio registers search_knowledge at kernel:listening only when enabled (list_changed). Host-mounted plugin unchanged. Docs lines wait for #38439 (sibling #38351) to merge, then land on this PR after merging main.", "tests": "service-knowledge pnpm test 21 files / 738 passed; mcp pnpm test 88 files / 1655 passed; core capability-composition 26 passed; runtime mcp-knowledge-tools-bridge 7 passed; verify harness.required-providers 16 passed (unchanged, none reads held); cli parity 3 files / 44 passed; typecheck exit 0 for service-knowledge, core, mcp, runtime, spec; eslint over changed files exit 0. Ablation at 2d6c3dfd: settleEnablement call replaced by held=false -> runtime-composed describe 9 failed / 1 passed; restored, git diff HEAD empty.", "gates": "dispatch-gates --ran: 106 derived, 105 run exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads exit 3: no dist for studio, client-react, scenarios; CI runs it). engine-double-contract and slot-lookup went red then green after test fixes (stdio double findOne through assertEngineFindOnePredicate + pinned ledger row; store plugin typed). overlap-check clean vs main, #38439, #38435, #38268. CI check-runs: not yet read (PR just opened).", "dogfood_battery": "72a9cbfb6a · os-verify-lock VERDICT command-exit 0 · Test Files 495 passed, 3 skipped (498) · Tests 4183 passed, 68 skipped (4251) · 0 failed", "mcp_calls": "0 in this round (earlier: read-only issue_read / pull_request_read)", "api_writes": "2 — git push to claude/project-thread-mu3i0t (several pushes of one branch); relay pr_create (#38470, run 46222845484); this comment via post-stamped.mjs", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "class: a · reach: every boot that builds a source logs ERROR 'the start of the build ... was not recorded (Duplicate record refused on Knowledge Sync State)' · evidence: live control boots · dedupe words: #38418 (open, seat 1) already covers it", "carrier: #38418 · noted, not filed" ] }objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#5 · os-project-manager · session_01FEkQ5oQLfL8thb6wtUHnTb
File surface widened (claim 7250342327) for PR #38470, on the card thread's report 7250400446. One line is added in
scripts/engine-double-contract.pinned.json: the gate requires the stdio double'sfindOne, which now goes throughassertEngineFindOnePredicate, to be registered there. It is a registry line the gate demands for code in the claimed surface (packages/mcp/src/plugin.ts), and no behaviour of its own.Recorded 2026-11-29T04:02Z.