Skip to content

fix(knowledge): on a deployment with no knowledge service, duplicating a package copies its knowledge sources unserved - #39383

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-krwejw
Dec 4, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-krwejw

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #39346

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:没有知识服务的自建环境里,管理员复制一个带知识源的应用(比如从市场装的基础模板)不再整包被拒;副本带着知识源但不生效,以后配好知识服务,原包和副本一起生效。
  • 为什么做:属于「知识检索平台化」专题,执行您对「没有知识服务的环境要不要放行复制」的裁定;基础模板带知识源那张卡在等它。
  • 出错会怎样:最坏是这类环境上复制时少核对了一项检索权限,这是裁定里明说的让步,管理知识源的权限照常要;直接在这类环境保存知识源仍然被拒;可以直接撤回。
  • 要你做什么:无。

What changes

The second of the card's two PRs. The dated note it builds is ADR-0161 K8's note of 2026-12-03 (PR #39354), on ruling 7380897321 on #38374.

  • packages/metadata-core/src/knowledge-source-save-admission.ts: authoredKnowledgeSourceRefusal answers undefined for door: 'duplicate' when resolveKnowledgeService answers nothing. One branch. noKnowledgeServiceRefusal loses its door parameter and its duplicate wording, which nothing reaches any more. No door value added, no exported input added, signature unchanged.
  • packages/runtime/src/domains/packages.ts, packages/runtime/src/knowledge-service-lookup.ts: docblocks only.
  • packages/spec/src/migrations/entries/semantic/19.knowledge-source-save-refused-without-knowledge-service.ts: the package duplicate leaves the entry's surface; reason says a duplicate copies a source unserved.
  • content/docs/protocol/knowledge.mdx: the paragraph "A deployment with no knowledge service saves no source" no longer says a duplicate is refused, and a new paragraph says what a duplicate does there.
  • One changeset: @objectstack/metadata-core, @objectstack/runtime, @objectstack/spec, patch.

Unchanged, and pinned as unchanged: the save doors and the package move-in on a no-service deployment (503), the capability gate at the duplicate, the scoped-factory miss and the unresolvable service at the duplicate (503).

Tests

  • packages/metadata-core/src/knowledge-source-save-admission.test.ts: door: 'duplicate' with no service answers undefined; the same item at door: 'save' is still refused 503.
  • packages/runtime/src/domains/packages-knowledge-source-gate.test.ts: the pin "a host with no knowledge service refuses a duplicate" is flipped. On a no-service host the duplicate answers 200 and the writer runs once; a manage_metadata-only caller is still refused 403; PUT /meta/knowledge_source/faq and POST /packages/pkg-a/move-in are still refused 503 SERVICE_UNAVAILABLE and neither writer runs.
Runs at d39f7c2 (the two commits on main at 8157fd7), and the ablation
  • pnpm --filter @objectstack/metadata-core exec vitest run --maxWorkers=2 src/knowledge-source-save-admission.test.ts: 12 passed.
  • pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/packages-knowledge-source-gate.test.ts: 89 passed.
  • pnpm --filter @objectstack/metadata-core test: 31 files, 1163 passed (before the move onto the new main, at de99f05; the later commit is comments, docs and the changeset). typecheck of metadata-core and runtime: exit 0.
  • pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/migrations: 255 passed, 2 todo. check:generated: exit 0.
  • Ablation (run before the move onto the new main, same code), through scripts/ablation-replace.mjs with the fix committed first: the branch put back to return noKnowledgeServiceRefusal(input.item), metadata-core rebuilt, ablation-dist-preflight found the marker in dist/. Both pins went red: 1 failed of 12, and 1 failed of 89 (the flipped pin). Restored, blob equal to HEAD, rebuilt, preflight --absent passed, both green again.
  • NOT-MEASURED pnpm --filter @objectstack/runtime test :: the package suite did not finish inside the container's 10-minute foreground cap; it is CI's Test Core.
The card's premise on a booted kernel

Read before the first edit, on main at 850d240b with the Starter of PR #39340 (head ca114a34) laid over the tree, on the Starter's install-test host (no requires), with a scratch test that was never committed.

Acceptance notes

  • The migration ledger's rule on a landed entry. packages/spec/src/migrations/entries/README.md and ADR-0087 state no rule that forbids editing a landed entry's text, and the registration gate (check-adr-0087-registration) judges added entries only. Entry 19 sits in the current protocol major, and the upgrade guide and spec-changes are generated from the registry at publish. So the entry is edited in place under the same id: its surface stops naming a refusal the runtime no longer gives. A new entry was not added, because nothing new is refused or required. check:upgrade-guide and check:spec-changes pass.
  • The whole service verdict goes unasked with no service, not only the permission arm: the adapter and retrieval-mode checks of admitAuthoredSource are the service's too. The texts say so.
  • A deps without the classified lookup (classifyServiceOrLoud): resolveKnowledgeServiceForSave then answers both misses as "nothing registered", so on such a deps a scoped registration with no instance for the environment now copies at the duplicate. The platform's dispatcher supplies the classified lookup, and the scoped refusal at the duplicate stays pinned through it. Stated in the lookup's docblock and the changeset.
  • packages/runtime is in the changeset for its docblocks only; no runtime code path changes there.
  • Three derived local gates answered PREREQUISITE NOT MET, which is not a verdict: check-plugin-teardown-shape --self-test (a shallow clone cannot reach its pinned fixture commit) and check:dual-build-cjs-loads (needs a whole-workspace build). Both are CI's. check:skill-examples refused first for a missing client-react build and passed after it.

Verification

Read first: the branch in authoredKnowledgeSourceRefusal (search for "the dated note of 2026-12-03" in knowledge-source-save-admission.ts), then the flipped pin in packages-knowledge-source-gate.test.ts, then entry 19's surface.

Two-minute check: pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/packages-knowledge-source-gate.test.ts prints 89 passed.

Local gates: the 121 commands node scripts/pm/dispatch-gates.mjs --commands derived for the diff. 118 exit 0; check:skill-examples exit 0 on re-run; two not measured as above.

Claim: comment 7383707710 on #39346 names this PR's branch, claude/project-thread-krwejw. The first claim (7381239738) named the backup branch the PR 2 commits waited on while PR 1 held this branch.


Generated by Claude Code

…e duplicate copies each knowledge source unserved

Claude-Session: https://claude.ai/code/session_01Utp6CXDYNpike5DVnd7xXE
Co-authored-by: Claude <noreply@anthropic.com>
…, and that the service's whole verdict goes unasked with no service

Claude-Session: https://claude.ai/code/session_01Utp6CXDYNpike5DVnd7xXE
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/metadata-core, @objectstack/runtime, @objectstack/spec, touching 2 documentable anchor(s). ⚠️ 2 changed file(s) yielded no anchor (packages/runtime/src/domains/packages.ts, packages/runtime/src/knowledge-service-lookup.ts), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

1 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/permissions/system-context.mdx (via authoredKnowledgeSourceRefusal (symbol, a top-level function))
What this run could not see
  • 2 changed file(s) yielded no anchor (packages/runtime/src/domains/packages.ts, packages/runtime/src/knowledge-service-lookup.ts) — pages documenting those are invisible to this run
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 71 of 255 client-bound route-ledger rows — the other 184 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 184: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 60 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 190 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json ad9ba58120831d33e0d039543a262a9ee12c3e70 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from d84eefc20ed8d51f377a0fb4e9e7b6de09ce7443 — the merge of head d581d649cf44115b22b1340319b88b8ed8b45591 into base ad9ba58120831d33e0d039543a262a9ee12c3e70, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d84eefc20ed8d51f377a0fb4e9e7b6de09ce7443 && git checkout d84eefc20ed8d51f377a0fb4e9e7b6de09ce7443
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ad9ba58120831d33e0d039543a262a9ee12c3e70 d581d649cf44115b22b1340319b88b8ed8b45591 && git checkout -B drift-repro ad9ba58120831d33e0d039543a262a9ee12c3e70 && git merge --no-ff d581d649cf44115b22b1340319b88b8ed8b45591

node scripts/docs-audit/affected-docs.mjs --json ad9ba58120831d33e0d039543a262a9ee12c3e70

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs ad9ba58120831d33e0d039543a262a9ee12c3e70 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

os-bill commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

repo:objectstack@os-bill · os-bill · session_01Utp6CajP4pQ8nXZ7Sa21XP

Contract-review-claim: session_01Utp6CajP4pQ8nXZ7Sa21XP · head d581d64 · 2026-12-04T04:05Z

Card thread for #39346, resumed after the earlier card thread stopped. The head is main merged into d39f7c2 (no conflicts). The review is Opus per the maintainer's 2026-12-03T15:42Z rule (CONTRACT_REVIEW_TIER exhausted until Dec 9 20:00 UTC).


Generated by Claude Code

os-bill commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

repo:objectstack@os-bill · os-bill · session_01Utp6CajP4pQ8nXZ7Sa21XP

Contract review

Served-tier: TIER_DEFAULT
Head-sha: d581d649cf44115b22b1340319b88b8ed8b45591
Local-runs: none
Scope: packages/spec/src/migrations/entries/semantic/19.knowledge-source-save-refused-without-knowledge-service.ts + packages/metadata-core/src/knowledge-source-save-admission.ts, packages/metadata-core/src/knowledge-source-save-admission.test.ts, packages/runtime/src/domains/packages.ts, packages/runtime/src/domains/packages-knowledge-source-gate.test.ts, packages/runtime/src/knowledge-service-lookup.ts; read outside it: docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md, packages/runtime/src/domains/meta.ts, packages/runtime/src/domains/mcp-authoring.ts, packages/rest/src/meta-item-write-routes.ts, packages/runtime/src/http-dispatcher.ts, packages/runtime/src/domain-handler-registry.ts, packages/metadata-protocol/src/protocol-package-commits.ts, packages/metadata-protocol/src/package-writability.ts, packages/objectql/src/knowledge-source-unserved.ts, packages/services/service-knowledge/src/knowledge-service-admission.ts, packages/spec/src/migrations/entries/README.md, packages/spec/src/migrations/semantic-relevance-coverage-38929.test.ts
Security-touching: yes
Rule-change-verified: none
Tier-note: CONTRACT_REVIEW_TIER exhausted (429, resets Dec 9 20:00 UTC); Opus per maintainer 「fable 用完之后,可以用 opus 复审」 (2026-12-03T15:42Z)

Full L2, ① to ④. Face: schema. reviewFace puts entry 19 in hits. Inputs read: the diff at this head (8 files, +143 −46), both commit bodies (bf42243e, d39f7c28), the PR body, card #39346 and its 5 comments, ruling 7380897321 on #38374, ADR-0161 K8's note of 2026-12-03 (ADR-0161:442-452, merged as 8157fd71), and the check-runs at this head. The merge d581d649 is clean: it has no combined diff, and the PR's diff against main equals its own two commits. The changeset and content/docs/protocol/knowledge.mdx are prose faces. They are read here for ② and for agreement with the code.

① Derived judgments

  • Accept set. One input changes. A non-system caller holding both capabilities duplicates a package that holds a knowledge source, on a host with no knowledge service registered. Before: 503 SERVICE_UNAVAILABLE, nothing copied. Now: the copy runs. Every other input reads as before.
  • The no-service branch, traced. The duplicate route asks, in order: manage_metadata (packages.ts:4197), the wall (:4200), guard one (:4204-4207), the replica check (:4210), the base check (:4224), then guard two (:4228). Guard two lists the package's sources and asks the predicate once per source with door duplicate (packages.ts:667-676). The lookup answers undefined when nothing is registered (knowledge-service-lookup.ts:48-51). The predicate now returns undefined for that door (knowledge-source-save-admission.ts:278-283). So the loop returns null and protocol.duplicatePackage runs (packages.ts:4232). The protocol has no knowledge judge of its own: no knowledge reference in protocol-package-commits.ts. It copies the active rows and writes them with mode: 'publish' (protocol-package-commits.ts:348, :664).
  • Unserved, by construction. No knowledge service is registered, so nothing on that host loads, builds, embeds or searches any knowledge_source. The copy is written published, so the boot line counts it from the next boot (knowledge-source-unserved.ts:47-58, with no service registered). The PR body's booted-kernel reading agrees: 200, the source among copied, and PUT still 503.
  • The save doors still refuse. The three save doors call the predicate with no door: meta.ts:2046, mcp-authoring.ts:704, rest meta-item-write-routes.ts:265. The door defaults to save (admission.ts:271), so they get noKnowledgeServiceRefusal (:282, :205-221). The move-in calls it with no door too (packages.ts:4135-4140). Only packages.ts:675 passes duplicate (repo grep, tests excluded). Pinned: runtime test :342-356 (PUT and move-in answer 503, neither writer runs) and unit test :134-136.
  • The capability gate is still asked. Guard one runs before guard two and needs no service (packages.ts:473-511, metaTypeWriteRefusal at :487). Pinned: on a no-service host a manage_metadata-only caller is refused 403 and nothing is copied (runtime test :336-340).
  • Still refused at the duplicate. A scope miss (admission.ts:284): pinned at runtime test :372-388, through HttpDispatcher on a real ObjectKernel. A service that cannot be resolved (admission.ts:273-277): pinned at unit test :143. Where a service answers, admitAuthoredSource is still asked with door duplicate (admission.ts:285-298).
  • Tenancy. No new read or write path. The protocol is resolved per request (packages.ts:4213). The copy is read from and written to the request's environment (findEnvironmentRows, protocol-package-commits.ts:351). An organization-scoped duplicate is refused first (protocol-package-commits.ts:229-232). A walled catalog write is refused at packages.ts:4200. What is given up is guard two for the copier, on a host where nothing indexes. No cross-tenant reach found.
  • Public surface. authoredKnowledgeSourceRefusal keeps its signature and its two doors. noKnowledgeServiceRefusal is module-private. It loses its door parameter, and its one caller is :282. DOOR_WORDING.duplicate is still used by unavailable (:186-195) and the scope refusal (:230-245). No export, code or message key is added. The duplicate's answer gains no field (ruling term 4).
  • Prose faces. Changeset :12-17 and knowledge.mdx :302-303 and :318-343 agree with the code.

② Semver level

  • .changeset/39346-duplicate-copies-source-unserved.md: @objectstack/metadata-core, @objectstack/runtime and @objectstack/spec, all patch. Clause-②: yes (widening) is at :9 and Metadata-protocol: none at :10, both line-initial. The PR body carries both, line-initial, at :6-7.
  • AGENTS.md post-task 3 (:1023-1032): none takes patch, and a non-protocol widening ships patch. The kind is right. What an author can write is unchanged: the save doors still refuse, and no key, value or type is added. A widening needs no BREAKING banner and no ADR-0087 marker.
  • @objectstack/runtime is in the changeset for docblocks only. Harmless.
  • Entry 19's text feeds the generated upgrade guide. The PR body reports check:upgrade-guide, check:spec-changes and check:generated exit 0.
  • N4 (nit, prose). Changeset :12 gives "for example an app installed from the marketplace". A marketplace install with manifest scope system or cloud is read-only (package-writability.ts:73-83). The duplicate refuses it 422 DUPLICATE_SOURCE_NOT_A_BASE before any knowledge gate (packages.ts:1988, asked at :4224). The example holds for a base, such as an unmanaged install. Suggest "a base installed unmanaged from the marketplace".
  • CI at this head, read 2026-12-04T04:01Z: 40 check runs. 12 success, 11 skipped, 17 in progress, none failed. In progress: Check Changeset, the four Type Check jobs, the Lint jobs, Build Core, Build Docs, Live E2E UI, v18 → v19 source upgrade, and Plan Test Core shards. Test Core has not started. Landing needs all of them green. Not a finding.

③ Boundary flags

  • Dev flags. Report 7383649731 has open_questions empty and security_findings none. Its out-of-scope note says the ledger README states no rule for editing a landed entry. Answered: the README states none, and entry 19 has been edited in place before (packages/runtime/CHANGELOG.md:456, packages/spec/CHANGELOG.md:1636). The relevance pin for entry 19 (semantic-relevance-coverage-38929.test.ts:149-152: class deployment, "an author's save at run time") still holds after the edit. Keeping the same id is right.
  • Deviations the report names. The superseded backup branch claude/issue-39346-duplicate-no-knowledge-service-wip is owed deletion. That is the seat's. The runtime package suite was NOT-MEASURED locally. It is CI's Test Core, not yet run at this head.
  • Surface vs claim. Claim 7400652062 names five code paths and knowledge.mdx. The diff also touches packages/metadata-core/src/knowledge-source-save-admission.test.ts and the changeset. Both follow the claimed module: its unit test and the required changeset. N3 (nit): the seat owes a one-line claim amendment naming them.
  • SQL push-down. Nothing new. The change removes one refusal. The per-package listing and the per-source loop (packages.ts:657-684) are unchanged. No new id materialisation and no in-app join.
  • Author. user.login is objectstack-fleet[bot]. No author note.
  • Tier. reviewFace names CONTRACT_REVIEW_TIER for this schema face. This record is TIER_DEFAULT on Opus under the maintainer's rule in the Tier-note. Whether the queue guard takes it at this tier is the seat's call.
  • Security-touching is yes. The changed hunks teach that the author-may-search gate is not asked at the duplicate on such a host, and that manage_knowledge_sources still is.

④ Design judgment

packages/spec/src/migrations/entries/semantic/19.knowledge-source-save-refused-without-knowledge-service.ts (hits), against ruling 7380897321 and ADR-0161 K8's note of 2026-12-03.

  • Ruling term 5: entry 19's surface drops the duplicate, and the dev names the ledger rule applied. Done. surface (:13-17) names the three save doors only. The comment at :9-10 dates the change. The PR body's Acceptance notes name the ledger reading, and it holds (③).
  • Text against behaviour. Each door surface names still refuses (① save doors). reason :27-28, "a package duplicate copies a source it holds unserved", matches admission.ts:282 and packages.ts:4232. The rest of reason is unchanged and still true: the engine's writes are not refused (admission.ts:270), and a host's own service answers for its sources (:285-286). acceptanceCriteria (:30-35) still holds: a duplicate's copy is not an author's save, and the boot reports it.
  • First consumer: the generated upgrade guide and spec-changes, built from the registry. The new text spells no call a textual ratchet could match (README :82-93).
  • N1 (nit). surface still omits POST /packages/:id/move-in of a package-less source. That door is refused on such a host (packages.ts:4135-4150; runtime test :352-356). The changeset (:17) and knowledge.mdx (:321-322) both name it. The gap predates this PR, but this PR rewrites the list. Add it here or in a follow-up.

packages/metadata-core/src/knowledge-source-save-admission.ts (+), against the ruling and the note.

  • Term 1: the duplicate is not refused for no service (:278-283). The scope miss (:284) and the unresolvable service (:273-277) keep their refusals. Holds.
  • Term 2: the save door is untouched. The door defaults to save (:271). Holds.
  • Term 3: guard two is not asked with no service, and nothing is asked in its place. The module doc (:55-67) says the whole admitAuthoredSource verdict goes unasked: permission, adapter and retrieval mode. That is wider than the ruling's words, "the author-may-search gate". But it is what "nothing there can judge it" means, because the adapter and mode checks live in the same service member. A copy with an unmounted adapter meets the same registration verdict as its original once a service mounts. Accepted. The texts say it plainly.
  • The docblocks at :99-100, :129-134, :202-203 and :252-256 agree with the code.
  • Order: isSystem (:270) answers before the lookup. The engine's write is never asked, as before.

packages/runtime/src/domains/packages.ts (+). Docblock only (:631-638). It agrees with the code at :644-684 and with guard one at :4204-4207.

packages/runtime/src/knowledge-service-lookup.ts (+). Docblock only (:13-16, :24-34). The code at :41-52 is unchanged. The claim that the platform's dispatcher supplies the classified lookup holds: http-dispatcher.ts:584-585. That is the only deps object built in the repo (grep for resolveServiceOrLoud: outside tests).

  • N2 (nit, declared deviation). classifyServiceOrLoud is optional on the exported DomainHandlerDeps type (domain-handler-registry.ts:287). On a deps without it, a scope miss now copies at the duplicate. Ruling term 1 keeps the scope-miss refusal. The note's bound is "until an operator mounts the service", and a scoped factory mounts it per environment. This docblock and changeset :19 declare it, and no deps in the repo lacks the member. Accepted for this head. A follow-up could make the member required, or have the duplicate door refuse when the deps cannot classify.

Tests (+). The unit test (:129-136) pins undefined for the duplicate (both undefined and null) and 503 for a save of the same item. The runtime test (:327-365) pins 200 and one writer call, the 403 capability gate, and the 503 save and move-in controls. The scope-miss pin (:372-388) stands. Per the PR body, the ablation turned both pins red with the branch reverted, and green again once restored.

No must-fix. No should-fix. Four nits: N1 and N4 are prose, N2 is the declared deviation, N3 is the seat's claim amendment. Nits only, so this is the final round for this head.

Implemented-by: session_01Utp6CXDYNpike5DVnd7xXE
Reviewed-by: session_01Utp6CajP4pQ8nXZ7Sa21XP

VERDICT: PASS


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-bill · os-bill · session_01Utp6CaQsbKBMQtm6Tpsamd

席位核对

ACCEPT and landing · 2026-12-04T04:24Z · head d581d649cf44115b22b1340319b88b8ed8b45591 · repo:objectstack@os-bill

  1. Shape: 8 files, +143/−46. Fixes #39346; Clause-②: yes (widening), Metadata-protocol: none. Six files are in claim 7400652062; the other two are the test beside knowledge-source-save-admission.ts and the changeset, which a claim does not list (N3 answered: no amendment owed).
  2. Premise measured: per claim 7400652062 — one refusal branch in knowledge-source-save-admission.ts, reached with door 'duplicate' from packages.ts; ruling A on examples/app-starter and the blank template: a knowledge source over the help articles, served only where knowledge retrieval is enabled #38374 (7380897321): a duplicate copies a knowledge source unserved on a host with no knowledge service. PR 1 (docs(adr-0161): a dated note under K8 — where no knowledge service is registered, the package duplicate copies each knowledge source unserved #39354, ADR-0161 K8 note) merged as 8157fd71.
  3. Gates:
    • Contract review: PASS 7400777262 at this head, on Opus (Served-tier: TIER_DEFAULT, Tier-note) under the maintainer's 2026-12-03 15:42Z word 「fable 用完之后,可以用 opus 复审」. Nits only.
    • Check-runs at this head: 63 success, 12 skipped, none red (PR-body guards included).
  4. Accepted deviations: N2 (a host whose deps lack classifyServiceOrLoud copies on a scope miss; no such deps in this repo) and N4 (the changeset's example of a marketplace install does not fit a managed install, which refuses the copy first with 422). N1 (spec entry 19 lists no move-in door) predates this PR.
  5. Out of scope: the record marks it security-touching: the may-search gate is not asked on a host with no knowledge service, where nothing can be searched. The seat reads no exposure in that.
  6. Landing: not governed (check-governed-merges --pr), not a narrowing, 189 lines. The seat marks it ready and arms auto-merge. On merge, knowledge: on a host with no knowledge service, the package duplicate copies each knowledge source unserved (ADR-0161 K8 dated note, then the predicate change) #39346 closes and examples/app-starter and the blank template: a knowledge source over the help articles, served only where knowledge retrieval is enabled #38374 can re-read its Blocked-by: line.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 04:25
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit bb2c500 Dec 4, 2026
76 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-krwejw branch December 4, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

2 participants