Skip to content

fix(runtime): a scoped knowledge miss gets its own save refusal, the duplicate door words its remedy, and entry 19 names only affected stacks - #38208

Merged
os-zhuang merged 5 commits into
mainfrom
claude/area-o1C-38058
Nov 28, 2026
Merged

os-zhuang merged 5 commits into
mainfrom
claude/area-o1C-38058

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #38058

Clause-②: yes (widening) — @objectstack/metadata-core adds knowledgeServiceNotInScope, KnowledgeServiceNotInScope, KnowledgeSourceSaveDoor and the optional door input on authoredKnowledgeSourceRefusal; @objectstack/runtime's exported DomainHandlerDeps adds the optional classifyServiceOrLoud, which makes ClassifiedServiceLookup reachable
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:在没装知识服务的部署上保存或复制知识源时,报错说得更准:按环境注册的知识服务落空时单独说明原因,复制应用包时提示"重新复制应用包"且只说一次"没有复制任何内容";平台自带知识服务的路径不变。
  • 为什么做:属于知识库与检索(AI 知识源)这条线,是上一轮"没装知识服务时保存知识源当场拒绝"复审留下的四处收尾。
  • 出错会怎样:最坏只是报错文字或升级说明的措辞不对,接受与拒绝的范围没有变化,可以直接撤回。
  • 要你做什么:无。

What changes

Four review follow-ups of the no-knowledge-service save refusal (contract review nits N1, N3, N4, N5; N2 was accepted as a deviation and is not carried).

  • N3, a scoped-factory miss gets its own sentence (@objectstack/metadata-core, @objectstack/runtime). The dispatcher's classified lookup already told "nothing registered under the name" apart from "a registration that produced no instance in this scope". The deps member the doors read (resolveServiceOrLoud) folds both into undefined, so a host whose scoped knowledge factory serves no instance for the request's environment was told "this deployment runs no knowledge service" and sent to the stack's requires. Both statements are false for that host.
    • DomainHandlerDeps gains an optional classifyServiceOrLoud. It is the same chain, scope travel and loud rejections, and it returns the classified answer. Optional for the same reason as isRequestKernelReady: a host's own deps or a test double written before it still compiles. A deps without it answers both misses as before. The answer type ClassifiedServiceLookup moved from a module-local alias in http-dispatcher.ts to domain-handler-registry.ts, and it is not added to the package index.
    • A new runtime-internal helper, resolveKnowledgeServiceForSave (packages/runtime/src/knowledge-service-lookup.ts), maps the classified answer for the predicate. A scope miss becomes knowledgeServiceNotInScope(scopeId), a frozen value branded with Symbol.for, new in @objectstack/metadata-core. The /meta save (dispatcher transport), the MCP save_metadata_draft tool and the package duplicate all call it. The MCP door is included because it reads the same deps member and had the same collapse.
    • authoredKnowledgeSourceRefusal answers that value with its own 503 SERVICE_UNAVAILABLE sentence. The sentence names the environment and says the host's registration decides which environments it serves. It does not say "runs no knowledge service" and does not name requires: ['knowledge'].
    • Control: the platform's KnowledgeServicePlugin registers a plain instance, so its path never reaches the new branch. A plain-instance pin on each door shows the save and the duplicate admitted as before.
  • N5, the duplicate door words its remedy for its caller. authoredKnowledgeSourceRefusal takes an optional door: 'save' | 'duplicate', save by default. With duplicate, each sentence the predicate composes (no service, scope miss, could not be judged) says the source "cannot be copied" and tells the caller to duplicate the package again, without a "Nothing was written" of its own. The door's prefix, Duplicating package "ID" is refused, and nothing was copied., says it once. The /meta save's sentences are byte-identical to before; the existing pins on both transports and the MCP door stay green unchanged.
  • N4. The OpenAuthoringWriter.itemSaveRefusal jsdoc is reworded so that it reads as sentences.
  • N1, entry 19 and the changeset FROM line (@objectstack/spec). surface and acceptanceCriteria of semantic migration entry knowledge-source-save-refused-without-knowledge-service now name only a deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry. A stack that ships a source also mounts the service: mountedBy: { collection: 'knowledgeSources' } in packages/spec/src/kernel/platform-capabilities.ts.

DELIBERATE CORRECTION of a pending release note: .changeset/37983-knowledge-source-save-needs-the-service.md, the ## FROM → TO line. The corrected sentence: "A deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry, where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." check-empty-changeset is red on this path by design. The confirming record is the dispatching seat's.

New changeset: .changeset/38058-knowledge-save-refusal-scope-miss-and-duplicate-wording.md, a patch for @objectstack/metadata-core, @objectstack/runtime and @objectstack/spec.

Read first (by risk):

  1. packages/metadata-core/src/knowledge-source-save-admission.ts: the isKnowledgeServiceNotInScope branch, and DOOR_WORDING. The save row must keep today's bytes.
  2. packages/runtime/src/domain-handler-registry.ts: the new optional classifyServiceOrLoud on an exported interface.
  3. packages/runtime/src/knowledge-service-lookup.ts: the mapping, and the fallback for a deps without the member.

Tests

All runs are at head b85886609d unless marked otherwise.

  • metadata-core: knowledge-source-save-admission.test.ts has two new cases.
    • A scope miss is refused 503 SERVICE_UNAVAILABLE. The pin covers the first sentence, and the message has no "runs no knowledge service" and no requires. The engine's own write is not asked.
    • door: 'duplicate' words the three predicate-composed refusals for the duplicate caller, with no "save the source" and no "Nothing was written". The knowledge service's own verdict passes through unchanged.
  • runtime: meta-save-capability-gate.test.ts adds a real ObjectKernel with a ServiceLifecycle.SCOPED knowledge factory.
    • Serving another environment: the save is refused with the scope sentence naming 'platform', and nothing is saved.
    • CONTROL: the same factory serving this environment admits the save, and a plain registered instance admits it as before.
  • runtime: packages-knowledge-source-gate.test.ts.
    • The no-service duplicate now pins the whole prefix plus cannot be copied, and duplicate the package again. It has no "save the source" or "Nothing was written", and "nothing was copied" occurs exactly once.
    • A new scoped-factory case on a real kernel, with the plain-instance control.
  • Ablation, one-shot, through scripts/ablation-replace.mjs: the line if (isKnowledgeServiceNotInScope(service)) return noKnowledgeServiceInScopeRefusal(...) was deleted and metadata-core rebuilt. ablation-dist-preflight --absent reported the marker absent from all 8 built files. Both runtime scoped-factory cases went red (Tests 2 failed | 1 passed). The restore left blob == HEAD and an empty git diff HEAD. The rebuild put the marker back in dist/index.js (count 1), and the cases went green (Tests 3 passed).
    • Caveat: the mutated metadata-core build exited 1, because the now-unused type guard fails the dts step. The JS bundle was emitted without the branch, and that bundle is what the red ran against.
Package runs
  • pnpm --filter @objectstack/metadata-core test: Test Files 29 passed (29), Tests 1115 passed (1115).
  • pnpm --filter @objectstack/runtime test: Test Files 656 passed (656), Tests 12446 passed, 25 skipped (12471).
  • pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-write-door-capability-enumeration.test.ts: 81 passed. This is the REST door's pin on the unchanged save sentence.
  • pnpm --filter @objectstack/metadata-core typecheck and pnpm --filter @objectstack/runtime typecheck both exit 0. The runtime run includes check:test-typecheck.

Acceptance notes

  • DomainHandlerDeps is an exported runtime interface. The new member is optional and additive, follows the isRequestKernelReady precedent, and adds nothing to the package index. No spec contract or authorable key moves.
  • Residual, not changed here: the knowledge service's own 503 verdict text (Nothing was written; try again., in @objectstack/service-knowledge admitAuthoredSource) still passes verbatim through the duplicate door. Its 403 verdicts say "was not saved" and name a remedy ("have someone who may query it save the source"). Those sentences belong to the service, outside this card's file surface.
  • The REST transport's PUT /meta/:type/:name resolves the service through RestServer.resolveKnowledgeService (kernelServiceProvider), not the dispatcher's classified lookup. I did not measure how a scoped-factory miss reads there, and this PR does not change it.

Verification

Local gate subset

dispatch-gates --commands derived 97 commands at 68bf4ec548. The set was re-derived after the helper moved, at b85886609d, and is identical. All 97 ran under the verify lock after a packages/spec rebuild. 93 exited 0. The four others:

  • node scripts/check-empty-changeset.mjs --base origin/main exit 1: the DELIBERATE CORRECTION above, red by design.
  • pnpm check:route-envelope exit 1: the helper first lived under domains/. It was moved beside the dispatcher, and the gate re-ran exit 0 at b85886609d.
  • pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.ts exit 1 in the batch, in the oclif manifest global setup, before any test. It re-ran exit 0 with 3 passed.
  • pnpm check:dual-build-cjs-loads exit 3, PREREQUISITE NOT MET: it needs every package's dist/. NOT MEASURED locally; CI reads it.

node scripts/check-nul-bytes.mjs exits 0 at b85886609d. Every other family is CI's.

Rework at 3865f313b1 (L1 7235665356): the Clause-② line above and in the changeset now reads yes (widening) with the named additions (the level stays patch), and ClassifiedServiceLookup with its jsdoc moved above the DomainHandlerDeps doc block. Re-run at 3865f313b1: pnpm --filter @objectstack/runtime typecheck exit 0 (check:test-typecheck OK); knowledge-source-save-admission.test.ts 11 passed; runtime meta-save-capability-gate, packages-knowledge-source-gate, mcp-authoring, scoped-service-miss-attribution 191 passed; check-adr-0087-registration and check-changeset-no-major exit 0.

Two-minute check: pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/meta-save-capability-gate.test.ts -t "no instance in the request". Expect 2 passed: the scoped-miss refusal naming 'platform', and the plain-instance control.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint is CI's.
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: no generated artifact moved (a migration entry's prose only; check:upgrade-guide and check:spec-changes green locally).
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.

Generated by Claude Code

…the duplicate door words its remedy

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…wledge token nor ships a source

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…tcher, not among the domains

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@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 Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/metadata-core, @objectstack/runtime, @objectstack/spec, touching 23 documentable anchor(s).

20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 23fa3619c2382fc4551682145421c2ebe6a12f32.

⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 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 — 182 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 23fa3619c2382fc4551682145421c2ebe6a12f32 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from d43a83d786e704f3711ff2771070c2b721c14ea7 — the merge of head b460542e6b6e869b42fae05333e13cc8941b5440 into base 23fa3619c2382fc4551682145421c2ebe6a12f32, 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 d43a83d786e704f3711ff2771070c2b721c14ea7 && git checkout d43a83d786e704f3711ff2771070c2b721c14ea7
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 23fa3619c2382fc4551682145421c2ebe6a12f32 b460542e6b6e869b42fae05333e13cc8941b5440 && git checkout -B drift-repro 23fa3619c2382fc4551682145421c2ebe6a12f32 && git merge --no-ff b460542e6b6e869b42fae05333e13cc8941b5440

node scripts/docs-audit/affected-docs.mjs --json 23fa3619c2382fc4551682145421c2ebe6a12f32

⚠️ 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 23fa3619c2382fc4551682145421c2ebe6a12f32 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · b858866 · 2026-11-28T06:53Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b85886609d6c2c02ee7ed5e0c1d9740c5b728cd3
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/runtime/src/knowledge-service-lookup.ts, packages/runtime/src/domain-handler-registry.ts, packages/runtime/src/http-dispatcher.ts, packages/runtime/src/domains/meta.ts, packages/runtime/src/domains/mcp-authoring.ts, packages/runtime/src/domains/packages.ts

Inputs read: card #38058 (body and its four comments: triage 7229981145, unlock 7234377880, claim 7234905717, os-dev-report 7235562715), PR #38208 (body, 13-file list, net diff of the head against merge base 7605e0c9cc), and the check-runs on the head. The remainder of the diff (three test files, the two changesets as prose) is the lane seat's ACCEPT at TIER_DEFAULT; the changeset lines are read here only for section ② and for point 2.

① Derived judgments

  • Authorable accept-set: nothing moves. No schema key, accepted value or metadata type is added or refused; entry 19 keeps its id and changes prose in surface and acceptanceCriteria only. Metadata-protocol: none is right.
  • Refusal set at the save doors: unchanged. A scope-relative miss was already refused 503 SERVICE_UNAVAILABLE (it folded into undefined and took the no-service sentence); it is still 503 SERVICE_UNAVAILABLE, with a different sentence. No save that was refused is now accepted, and none that was accepted is now refused. Right.
  • Save-door bytes: the save row of DOOR_WORDING reproduces the pre-change sentences of noKnowledgeServiceRefusal and unavailable byte for byte (read against the removed lines). Right.
  • Duplicate-door answer: status and code unchanged; the message text changes (cannot be copied, duplicate the package again, no second "nothing was written"). Message text is not a published accept-set. Right.
  • Public surface of @objectstack/metadata-core: it GROWS. packages/metadata-core/src/index.ts:104 is export * from './knowledge-source-save-admission.js', so the entry gains the names knowledgeServiceNotInScope, KnowledgeServiceNotInScope and KnowledgeSourceSaveDoor, and authoredKnowledgeSourceRefusal gains the optional input door. The PR declares this as no surface change. Wrong: see S1.
  • Public surface of @objectstack/runtime: it GROWS. DomainHandlerDeps is re-exported at packages/runtime/src/index.ts:281; it gains the optional member classifyServiceOrLoud, and ClassifiedServiceLookup becomes reachable through that member's return type (it was a module-local alias in http-dispatcher.ts, under a comment that said "Nothing published gains a member"). The PR body's "adds nothing to the package index" is true of the re-export list and is not the test: references/execution-duties.md defines the public surface as what the built entry declaration reaches, re-exported names plus every type reachable through their props, parameters and return types, and says not to count the re-export list alone. Wrong as declared: see S1.
  • Point 1, plumbing or fork: additive runtime plumbing, not a contract fork. The member is optional; a deps without it is read through resolveServiceOrLoud and answers both misses as before (knowledge-service-lookup.ts, the typeof ... !== 'function' arm); no existing member changes meaning; resolveServiceOrLoud still returns the service or undefined; the dispatcher's classifyService body is untouched. It follows the isRequestKernelReady precedent in the same interface (optional, fail-safe fallback stated in the jsdoc). Nothing here needs the decision box. It is still a widening of an exported type, which is what S1 is about.

② Semver level

  • Level: patch on @objectstack/metadata-core, @objectstack/runtime and @objectstack/spec is right. AGENTS.md Post-Task Checklist step 3: the level follows the Metadata-protocol kind alone, none takes patch, and a non-protocol widening ships patch. All three packages are moved by the diff and all three are listed.
  • Metadata-protocol: none: right.
  • Clause-②: no: wrong. The line should read Clause-②: yes (widening), naming what grew.

S1 (should-fix) — the Clause-②: declaration is no on the claim comment 7234905717, the PR body and .changeset/38058-knowledge-save-refusal-scope-miss-and-duplicate-wording.md, and the diff enlarges the public surface of two packages (section ①: three new entry names and an optional input on @objectstack/metadata-core; an optional member and a newly reachable type on @objectstack/runtime's exported DomainHandlerDeps). By references/execution-duties.md (the criterion is "widens the accept-set or enlarges the public surface", the surface is what the built entry declaration reaches) and references/domains/spec.md ("however small") that is yes. Pending notes on main declare the same shapes that way at patch: .changeset/37864-capability-unavailable-languages.md (@objectstack/runtime HttpDispatcherResult.response gains an optional member), .changeset/37828-localized-refusal-vary-accept-language.md (@objectstack/types gains two exports), .changeset/37516-kanban-uncategorized-past-page.md (an entry-exported function gains an optional parameter). Fix: Clause-②: yes (widening) followed by the named additions, on all three carriers; the level stays patch. No tier was dodged by the wrong line: the spec path already put this PR at CONTRACT_REVIEW_TIER. The changeset and PR-body edits are prose-face; the claim comment is the carrier the queue gate reads.

③ Boundary flags

  • Dev flag, "DomainHandlerDeps gained an optional member: treated as additive runtime plumbing ..., flag if the seat reads it as needs_decision": answered in ①. Additive, no fork, no decision needed; the declaration line is S1.
  • Dev flag, runs outside the verify lock (one cli test re-run, one route-envelope re-run) and check:dual-build-cjs-loads not measured locally: the head's check-runs answer these families; see the CI reading below.
  • open_questions: empty. Nothing to answer.
  • Point 4, the two out-of-scope notes in the PR's Acceptance notes. Both should be follow-up cards; neither is filed.
    • Note 1 (the knowledge service's own verdict text through the duplicate door): yes, file it. packages/services/service-knowledge/src/knowledge-service.ts composes was not saved (3149), Nothing was written; try again. (3157) and have someone who may query it save the source (3215, 3226, 3228), and refuseDuplicatedKnowledgeSources appends a service verdict verbatim. These are the answers a duplicate gets on a deployment that DOES run the platform's service, which is the common path, so card knowledge: the no-service save refusal's migration entry over-includes stacks that ship a source, a scoped-factory miss gets the no-service sentence, and two wording slips (review follow-ups of PR #38013) #38058's fourth Acceptance line ("tells the caller to duplicate again, and says nothing was copied once") holds for the three predicate-composed sentences and not for the service's own. Same defect class as N5, same grade (p3, wording). The fix needs the door to reach admitAuthoredSource, so it is its own card on @objectstack/service-knowledge.
    • Note 2 (the REST transport): yes, file it. RestServer.resolveKnowledgeService (packages/rest/src/rest-server.ts:6227) returns whatever kernelServiceProvider answers and maps only the branded miss to undefined, so a scoped factory that answers nothing for the environment most likely still reads as "this deployment runs no knowledge service" on REST PUT /meta/knowledge_source/:name, the first door entry 19 names. After this PR the two transports of the same save can answer the same miss with different sentences. Unmeasured, as the PR says; the card should measure it first, then give REST the same classification or state why not. p3.
  • SQL push-down (Prime Directive 5): the diff adds no data read, no id materialisation and no in-app join. The duplicate door's per-item lookup is a service-registry read, as before. No finding.
  • Author: PR user.login is objectstack-fleet[bot]; no off-relay write to name.
  • Security: the scope sentence echoes the request's own resolved environment id to a caller already past manage_metadata and manage_knowledge_sources. No new disclosure.

④ Design judgment

19.knowledge-source-save-refused-without-knowledge-service.ts (hits). Holds. surface now reads "a deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry, and whose host mounts no KnowledgeServicePlugin". Against the code it cites: packages/spec/src/kernel/platform-capabilities.ts gives the knowledge row mountedBy: { collection: 'knowledgeSources' }; stackItemCapabilities (packages/core/src/capability-composition.ts) adds the token whenever the stack holds an item of that collection, at the top level or in a package body; packages/core/src/capability-providers.ts mounts KnowledgeServicePlugin for the token. So a stack that ships a source mounts the service and its author's save is admitted, and the old text over-included it. The new acceptanceCriteria names both mounts. No generated artifact carries the old sentence (searched the head tree for the entry id and the old wording: the two changesets and the entry only). replacement and reason are untouched and still true of the no-service branch.

Point 2, the DELIBERATE CORRECTION. The note is .changeset/37983-knowledge-source-save-needs-the-service.md, its ## FROM → TO line. It is PENDING on main: the file is in the top level of .changeset/ on origin/main, not under .changeset/pre/ (the consumed stock, 1185 files, none of them this one), its only commit is d59478f1b1 (#38013, 2026-11-28T03:46Z), and the last version pass is 9d111a7f52 (#38032, 2026-11-28T02:16Z), before it; no CHANGELOG.md carries it. Before: "A deployment whose stack does not declare requires: ['knowledge'], where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." After, the corrected sentence: "A deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry, where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." The corrected sentence is true of the code, by the same three reads as the entry above: the refusal fires only when no knowledge service is registered, and a shipped knowledgeSources entry registers one. The correction is right to make: the base sentence told a stack that already ships a source to perform a migration it does not need, card #38058 names this line in its What and its Acceptance, and the note would otherwise ship that sentence in the CHANGELOG.md of four packages. One line changed; the frontmatter, both declaration lines and the ADR-0087 marker of the note are untouched. The Check Changeset red on this head is exactly this: its one failing step is the foreign-changeset rule naming this file, and every other step of the job is green. This record confirms the correction on this head; it stands as the confirming record once S1 and S2 are closed by the delta.

knowledge-source-save-admission.ts. Agrees with its contract. The brand is a Symbol.for key on a frozen object, so it survives a second copy of the module and cannot collide with a real service. Order of the arms is right: engine write first (never asked, pinned), then lookup fault (503, could not be judged), then undefined or null (no service), then the brand (scope sentence), then the duck-typed admitAuthoredSource. The scope sentence says only what the lookup knows: a registration exists and served no instance for the named environment; it does not say the deployment runs none and does not name requires. The module jsdoc is honest that only "a door whose lookup tells that miss apart" answers this way.

knowledge-service-lookup.ts. Agrees. The mapping is total over the three outcomes; the fallback for a deps without the member reproduces the old answer; the scope passed is context.environmentId, as before.

http-dispatcher.ts. Agrees. classifyService is unchanged; the new deps member binds the request kernel exactly as resolveServiceOrLoud does. Read against packages/core/src/plugin-loader.ts: an unregistered name rejects with the branded error, so on ObjectKernel no-instance-in-scope is reached only when a registered factory answered nothing, and a plain instance (what KnowledgeServicePlugin registers) returns before any of it. A SCOPED registration asked with no scope still rejects unbranded and is answered 503 as a fault.

domains/meta.ts, domains/mcp-authoring.ts, domains/packages.ts. Agree. Each replaces the same one-line lookup with the helper; packages.ts passes door: 'duplicate' and keeps the single prefix "is refused, and nothing was copied." The itemSaveRefusal jsdoc now parses as sentences (N4 of the card).

domain-handler-registry.ts. The member, its jsdoc and the reworded resolveServiceOrLoud paragraph agree with the code. One defect:

S2 (should-fix) — packages/runtime/src/domain-handler-registry.ts: the new ClassifiedServiceLookup alias and its jsdoc were inserted between the existing jsdoc of DomainHandlerDeps (the block that opens "The dispatcher facilities an extracted domain body is allowed to use — the WHOLE dependency contract" and ends "do not cache the resolved kernel anywhere that outlives one request.") and the export interface DomainHandlerDeps line it documents. At head two jsdoc blocks sit back to back above the alias and the exported interface carries none, so the interface's contract text, including "Growing this interface is a design decision" and the rule against a facility that reads a kernel without the request, no longer attaches to it in the shipped declarations. Fix: move the alias and its jsdoc above the DomainHandlerDeps block (or below the interface). A code-file move, so it is read on the delta.

Point 3, the pin. Confirmed in the diff. meta-save-capability-gate.test.ts builds a real ObjectKernel, registers knowledge with registerServiceFactory(..., ServiceLifecycle.SCOPED) serving one environment, and asserts the 503, the code, the sentence opening naming 'platform', the absence of "runs no knowledge service", and that nothing is saved; its control boots the same factory serving the request's environment (admitted, asked once, saved once) and a plain registered instance (the same). packages-knowledge-source-gate.test.ts does the same at the duplicate door on a real kernel with a scoped factory that answers nothing, with a plain-instance control that is asked once and copies. The metadata-core unit pins both sentences per door. The pins sit on the registry's own classification, not on a double.

Observations of the third grade (no effect on correctness or the contract), accepted as deviations unless a later head moves these files anyway:

  • Entry 19 acceptanceCriteria: "(either mounts the service; or the host mounts KnowledgeServicePlugin)" is awkward; the meaning is recoverable.
  • unavailable() picks its tail with a door === 'save' ternary while the other two sentences read DOOR_WORDING; the bytes are right.
  • The scope sentence's "registered on this deployment" rests on the kernel rejecting an unregistered name with the branded error. ObjectKernel does. A kernel-shaped host whose getServiceAsync answers null for an unknown name would be read as registered. That is the classifier's existing premise, outside this diff.
  • For the lane seat's ACCEPT (test face): the changeset says the MCP save_metadata_draft door tells the scope miss apart; no pin exercises that door for it. The wiring is the shared helper pinned at the other two doors.

CI on this head at 2026-11-28T06:58Z. Failure: Check Changeset (the DELIBERATE CORRECTION step alone, by design). Success: Governed Surface Queue Guard, Spec property liveness, PR-body guards, Type Check · source gates, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, the three scoped Lint jobs, Dogfood Regression Gate, Live E2E UI, Build UI Deps, Check PR Size, both shard plans, Auto Label, docs-drift flag, filter. Still in progress: Build Core, Type Check · workspace, Type Check · consumer gates, Type Check · debt ledger, Type Check UI, Lint · CI, release & engine gates, Test Core 1 to 10 of 10, Test UI 1 to 16 of 16, Build & E2E UI. Skipped: the opt-in and queue jobs. The verdict below is on the design and the contract; the families still running are the gate's to conclude and are read again before landing.

Open on this head: S1, S2. No finding of the first grade. A delta review of the fixes is owed.

Implemented-by: claude/area-o1C-38058
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): REWORK at head b85886609d6c2c02ee7ed5e0c1d9740c5b728cd3 (Fixes #38058).

Review summary

Shape.

  • 13 files, +408/-76, NOT governed.
  • The spec migration entry is a contract face, so the at-tier record is owed. It is 7235658537: verdict PASS, tier verified, with two graded findings open on this head.
  • The queue guard reads those findings as OPEN, so this head cannot land. I agree with both.

Why REWORK.

  • S1 (should-fix): the Clause-②: declaration is wrong. It should read yes (widening), not no.
    • @objectstack/metadata-core gains three entry names through its export * of knowledge-source-save-admission.js, plus the optional door input.
    • @objectstack/runtime's exported DomainHandlerDeps gains the optional classifyServiceOrLoud, and through it ClassifiedServiceLookup.
    • Pending notes on main declare the same shapes as yes (widening) at patch.
    • Correct the line in three places: the claim comment, the PR body and the new changeset. The patch level stays.
  • S2 (should-fix): the DomainHandlerDeps jsdoc is detached. In packages/runtime/src/domain-handler-registry.ts, the new alias and its jsdoc sit between the existing DomainHandlerDeps jsdoc and the interface. The exported interface therefore has no doc, and its contract text now floats above the alias. Move the alias above that block or below the interface.

What the record settles.

  • The DELIBERATE CORRECTION of .changeset/37983-knowledge-source-save-needs-the-service.md. The note is still pending on main, the corrected FROM sentence is true of the code, and the correction is right to make. A same-head PASS with nothing open confirms it, so the delta record will carry that confirmation on the new head.
  • The optional member. It is additive plumbing, not a contract fork, and patch is the right level.
  • The scoped-miss pins. They are real: a real ObjectKernel with a scoped factory, plus plain-instance controls.
  • The out-of-scope notes. Both should be filed as p3 follow-ups: the service's own 403/503 text passing verbatim through the duplicate door, and REST PUT /meta on a scoped miss, which should be measured first.

Gates. CI was still running at 06:58Z. Check Changeset is red by design, from the foreign-changeset step alone.

Next: fix S1 and S2 on a new head. A delta contract record and a delta L1 follow, and then the area lands it.

…ace's own doc; the changeset declares the widening

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 3865f31 · 2026-11-28T07:19Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 3865f313b1a255282a29c8831f82d6a2ec97bc66
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/runtime/src/knowledge-service-lookup.ts, packages/runtime/src/domain-handler-registry.ts, packages/runtime/src/http-dispatcher.ts, packages/runtime/src/domains/meta.ts, packages/runtime/src/domains/mcp-authoring.ts, packages/runtime/src/domains/packages.ts

Delta record on the record 7235658537 (head b85886609d). This head is one commit on that one, 3865f313b1, parent b85886609d, merge base with main still 7605e0c9cc. Inputs read: the commit's diff (2 files, +22/-22: one line of .changeset/38058-knowledge-save-refusal-scope-miss-and-duplicate-wording.md, and a 21-line block moved in packages/runtime/src/domain-handler-registry.ts), the PR body as it stands, card #38058's new comments (claim amendment 7235667875, os-dev-report 7235845050), and the check-runs on this head. The hits file and the other six implementing files are byte-identical to the head the earlier record read, so its sections ① to ④ carry over to this head unchanged except as stated below.

① Derived judgments

  • Nothing derived moves between the two heads. The commit changes no executable line: one declaration line in a changeset, and the position of a type alias and its jsdoc. Accept-set, refusal set, save-door bytes and both packages' public surface are as judged in 7235658537.
  • The two public-surface judgments that record named wrong as declared are now declared right: see S1 below.

② Semver level

  • Level: patch on @objectstack/metadata-core, @objectstack/runtime and @objectstack/spec, unchanged and right (Metadata-protocol: none takes patch; a non-protocol widening ships patch).
  • Clause-②: line, now yes (widening): right.

S1 (should-fix): closed

The changeset .changeset/38058-knowledge-save-refusal-scope-miss-and-duplicate-wording.md and the PR body both now carry, at the start of a line, Clause-②: yes (widening) — ..., and the two lines are identical. The additions the line names are exactly the ones 7235658537 listed, no more and no fewer: on @objectstack/metadata-core the names knowledgeServiceNotInScope, KnowledgeServiceNotInScope, KnowledgeSourceSaveDoor and the optional door input on authoredKnowledgeSourceRefusal; on @objectstack/runtime the optional classifyServiceOrLoud on the exported DomainHandlerDeps, which makes ClassifiedServiceLookup reachable. The form is the one the declaration reader accepts: the fixed key at line start, the value yes, one arm from the closed pair, then a dash and free text, which is the shape of the pending notes .changeset/37864-capability-unavailable-languages.md and .changeset/37828-localized-refusal-vary-accept-language.md on main; read against readClause2Line in scripts/pm/clause2-line.mjs it is a declared yes with arm widening (not the refused no (widening) contradiction), and the PR-body guards check-run on this head is green. Metadata-protocol: none sits on the next line in both carriers, untouched. On the card, the original claim comment 7234905717 still reads no; it was not edited, and the correction is the appended claim amendment 7235667875, which carries Clause-②: yes (widening) at the start of a line and names the same additions. That is an append-only correction on the claim carrier, and it is enough here: the spec path limb already holds this PR at CONTRACT_REVIEW_TIER whatever the declaration limb reads, so no gate reads a lower floor from the old line.

③ Boundary flags

  • Dev flag in 7235845050, the PR body edited through the relay issue_patch with the signed trailer on its last line, against the standing rule that the seat writes later body edits: a process matter for the dispatching seat, which ordered the edit; it changes nothing this record judges. The body as read carries the corrected declaration, the DELIBERATE CORRECTION paragraph unchanged, and a rework note naming this head.
  • Dev flag, the full local gate subset not re-run at this head: accepted. The commit is a comment move and a changeset line, and the head's check-runs are the gate verdicts.
  • open_questions: empty.
  • The two out-of-scope notes: unchanged, still unfiled. The reading in 7235658537 stands: both should be follow-up cards at p3 (the knowledge service's own verdict text through the duplicate door; the REST transport's reading of a scope-relative miss).
  • SQL push-down (Prime Directive 5): the commit adds no read. No finding.
  • Author: PR user.login is objectstack-fleet[bot].

④ Design judgment

19.knowledge-source-save-refused-without-knowledge-service.ts (hits). Unchanged from the head read in 7235658537; it holds as judged there.

domain-handler-registry.ts.

S2 (should-fix): closed

The move is pure. In the commit's diff of this file the added lines and the removed lines are the same 21 lines in the same order (the 16-line jsdoc, the 4-line ClassifiedServiceLookup alias, one blank line), and the file's lines at the two heads are the same multiset, so no byte of the jsdoc or of the alias changed and nothing else in the file moved. The block now sits after the closing brace of DomainRoute and before the DomainHandlerDeps jsdoc. At this head that jsdoc ends "do not cache the resolved kernel anywhere that outlives one request." and its closing line is immediately followed by export interface DomainHandlerDeps {, with nothing between them: the interface's contract text is attached to the interface again, and the alias keeps its own jsdoc directly above it. The alias is still exported from the module and still not named in packages/runtime/src/index.ts, as before.

The DELIBERATE CORRECTION, re-confirmed on this head. The note is .changeset/37983-knowledge-source-save-needs-the-service.md, its ## FROM → TO line. This commit does not touch it (empty diff for that path between the two heads), so on this head it reads as it did: "A deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry, where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." The base sentence it replaces was: "A deployment whose stack does not declare requires: ['knowledge'], where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." The note is still PENDING: on main now its blob is the merge base's (4e3330d2b5), it sits in the top level of .changeset/, and the last version pass is still 9d111a7f52 (#38032), which predates it. The corrected sentence is true of the code on this head, by the reads recorded in 7235658537, none of which this commit moves: the knowledge row of PLATFORM_CAPABILITY_PROVIDERS carries mountedBy: { collection: 'knowledgeSources' }, stackItemCapabilities adds the token for a stack that holds such an item, and the provider row mounts KnowledgeServicePlugin; the refusal fires only where no knowledge service is registered. The correction is right to make: card #38058 names this line in its What and its Acceptance, and the base sentence sent a stack that already ships a source to a migration it does not need. The Check Changeset red on this head is this correction and nothing else: its one failing step is the foreign-changeset rule ("Reject an empty-frontmatter changeset added by this PR"). This record is the same-head at-tier confirmation of it.

The observations of the third grade in 7235658537 stand as accepted deviations; this commit touches none of them.

CI on this head at 2026-11-28 07:20Z. Failure: Check Changeset (the DELIBERATE CORRECTION step alone, by design). Success: Governed Surface Queue Guard, Spec property liveness, PR-body guards, Build Core, Type Check · source gates, Type Check · consumer gates, Type Check · debt ledger, Lint · ESLint, Lint · PM dispatch-gates, Lint · docs & code guards, Lint · repo & tooling gates, Lint · CI, release & engine gates, the three scoped Lint jobs, Lint & Repo Gates, Dogfood Regression Gate, Live E2E UI, Build UI Deps, Check PR Size, both shard plans, three of ten Test Core shards, Auto Label, docs-drift flag, filter. Still in progress: Type Check · workspace, Type Check UI, seven Test Core shards, Test UI 1 to 16 of 16, Build & E2E UI. Skipped: the opt-in and queue jobs. The verdict is on the design and the contract; the families still running are the gate's to conclude and are read again before landing.

No must-fix, no should-fix.

Implemented-by: claude/area-o1C-38058
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): ACCEPT (delta) at head 3865f313b1a255282a29c8831f82d6a2ec97bc66 (Fixes #38058). This follows REWORK 7235665356 at b85886609d.

Review summary

Records. Delta contract record 7235886755 is PASS at this head, with the tier verified. It closes both findings of 7235658537 and leaves nothing graded open.

Delta read.

  • The declaration line. The changeset and the PR body now carry the same line-initial Clause-②: yes (widening). It names the three @objectstack/metadata-core entry names, the optional door input, and DomainHandlerDeps.classifyServiceOrLoud with ClassifiedServiceLookup. The level stays patch, and the card's claim carries the same line as amendment 7235667875.
  • The alias move. The alias and its jsdoc moved above the DomainHandlerDeps jsdoc block. It is a pure move: the same 21 lines in the same order. The interface's own doc is attached again.

The DELIBERATE CORRECTION. The record re-confirms the correction of .changeset/37983-knowledge-source-save-needs-the-service.md on this same head. The note is still pending on main, and the corrected FROM sentence is true of the code. This ACCEPT and that same-head PASS together are the seat records that check-empty-changeset asks for. The red Check Changeset on this head is that one foreign-changeset step, by design.

Follow-ups. The record still describes the two out-of-scope notes as unfiled, because the reviewer did not see them filed. They are filed: #38210 for the duplicate door's service verdict text, and #38211 for REST PUT /meta on a scoped miss, to be measured first. Both are open, at p3.

Gates. CI at 07:24Z had 30 success, Check Changeset red as above, and 25 jobs pending: the Test UI shards, seven Test Core shards, Type Check UI and Type Check workspace. This ACCEPT is on the code. Landing waits on every other check at this head concluding green, which the area reads before it lands.

Next: not governed, so the area lands it on all-green apart from the confirmed Check Changeset step.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Landing · area o1-C · head 3865f313b1 · 2026-11-28T08:21Z · ACCEPT → PR #38208 comment 7235896285 (L1-a, delta, after REWORK 7235665356); contract records 7235658537 and delta 7235886755 PASS at CONTRACT_REVIEW_TIER, nothing open

Probe Reading
check-runs at 3865f313b1 58 success · 13 expected skip · 2 failed (both Check Changeset: the foreign-changeset step alone, the DELIBERATE CORRECTION of .changeset/37983-knowledge-source-save-needs-the-service.md, confirmed on this head by 7235886755 and 7235896285) · 0 pending
check-governed-merges.mjs --pr 38208 NOT governed (0 of 13 paths) · +408 / −76
landing-k.mjs --pr 38208 K = 5 < 15

State: ready + auto-merge; #38058 closes on merge via Fixes. Clause-②: yes (widening) on no governed path (claim amendment 7235667875) ⇒ Tier S, patch on metadata-core, runtime and spec. Follow-ups #38210 and #38211 are filed, pm:blocked by this PR.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 28, 2026 08:21
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · b460542 · 2026-11-28T08:59Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b460542e6b6e869b42fae05333e13cc8941b5440
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/runtime/src/knowledge-service-lookup.ts, packages/runtime/src/domain-handler-registry.ts, packages/runtime/src/http-dispatcher.ts, packages/runtime/src/domains/meta.ts, packages/runtime/src/domains/mcp-authoring.ts, packages/runtime/src/domains/packages.ts

Second delta record, on the records 7235658537 (head b85886609d) and 7235886755 (head 3865f313b1). This head is a merge commit, "Merge origin/main into claude/area-o1C-38058", with parents 3865f313b1 (the head 7235886755 read) and 23fa3619c2 (main); it carries no author change. The merge base with main moved from 7605e0c9cc to 23fa3619c2. Inputs read: the merge commit, the net diff of each head against its own merge base, the 40 commits main gained between the two bases, and the check-runs on this head. Git object reads only; nothing was built, checked out or run.

① Derived judgments

  • The PR's net diff is the same at both heads. git patch-id --stable of 7605e0c9cc..3865f313b1 and of 23fa3619c2..b460542e6b is f8f786b2c00d9da1a8a5be202d8b1d2b565cd64c for both; the file lists are identical (the same 13 paths) and the stat is the same, +408/-76.
  • The merge resolved no conflict. The combined diff of the merge commit is empty, and an in-memory three-way merge of the two parents (git merge-tree --write-tree, no worktree) reports no conflict and yields the tree de9700c129, which is this head's tree byte for byte. Nothing was hand-resolved and nothing was added in the merge.
  • So every derived judgment of 7235658537, as amended by 7235886755, is a judgment of this head's net diff too: no authorable accept-set moves, the refusal set at the save doors is unchanged, the save-door bytes are unchanged, and the public surface of @objectstack/metadata-core and @objectstack/runtime grows by exactly the additions the declaration names.
  • What main moved between the bases does not undercut any of it. Read for this:
    • packages/metadata-core: no file moved.
    • packages/runtime: one non-test source file moved, src/action-execution.ts (the ask_ai branch removed, feat(spec)!: retire the ask_ai action type (ADR-0160 D7) #37924), plus test files. None is in the PR's 13 paths, and none is imported by the PR's code. domain-handler-registry.ts, http-dispatcher.ts, knowledge-service-lookup.ts and the three domain files differ from main at this head only by the PR's own hunks.
    • packages/core/src (plugin-loader.ts, capability-composition.ts, capability-providers.ts), packages/spec/src/kernel/platform-capabilities.ts and packages/rest/src/rest-server.ts, the code the earlier records cite: no file moved. The branded miss for an unregistered name, the mountedBy: { collection: 'knowledgeSources' } row and RestServer.resolveKnowledgeService read as they did.
    • packages/services/service-knowledge/src/knowledge-service.ts: moved (+155), not in the sentences the follow-up reading rests on. admitAuthoredSource is still there and still composes "Nothing was written; try again." and "have someone who may query it save the source"; only their line numbers shifted (now near 3278 and 3343 to 3356, where 7235658537 gave 3157 and 3215 to 3228).
    • packages/spec/src/migrations/entries/semantic/: four other entries were added or edited; entry knowledge-source-save-refused-without-knowledge-service was not, and no new entry takes its id.
    • references/execution-duties.md and references/contract-review.md: one line each, neither the public-surface criterion nor the review-tier rule (a dropped clause about a script's legacy wording; a dropped "about 60 minutes").

② Semver level

  • patch on @objectstack/metadata-core, @objectstack/runtime and @objectstack/spec: unchanged and right. No version pass landed on main between the bases (no "version packages" commit among the 40), so the new changeset is still a pending note against the same release.
  • Clause-②: yes (widening) with the named additions, and Metadata-protocol: none: unchanged in the changeset at this head and right, as closed in 7235886755.

③ Boundary flags

  • The queue's Governed Surface Guard read this PR as a narrowing because its diff edits the pending note .changeset/37983-knowledge-source-save-needs-the-service.md, which carries feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013's Clause-②: no (narrowing) line. For the record: this PR narrows nothing. Its diff of that note is one line, the ## FROM → TO sentence; the note's frontmatter, its two declaration lines and its ADR-0087 marker are untouched, and the narrowing they declare is feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013's, already on main. This PR's own declaration is yes (widening), and section ① finds no save that was accepted and is now refused. The record the guard asks for on this exact head is this one.
  • open_questions: empty. No new dev flag: the merge has no author commit.
  • The two out-of-scope notes: unchanged, still unfiled; the reading in 7235658537 stands (both are follow-up cards at p3), with the service-knowledge line numbers as updated in ① above.
  • SQL push-down (Prime Directive 5): the net diff is unchanged and adds no read. No finding.
  • Author: PR user.login is objectstack-fleet[bot]; the merge commit's author is the seat account os-elon-musk.

④ Design judgment

19.knowledge-source-save-refused-without-knowledge-service.ts (hits) and the seven implementing files. Each is, at this head, main's file plus the PR's own hunks, and those hunks are the ones 7235658537 and 7235886755 judged (same patch id). The code they cite is unmoved on main (① above). The design judgment of those two records holds on this head without change: the entry's narrowed surface and acceptanceCriteria are true of the capability rows; the predicate, the lookup helper and the three doors agree with their contract; the DomainHandlerDeps jsdoc sits directly above its interface, with the ClassifiedServiceLookup alias and its jsdoc above that block.

The DELIBERATE CORRECTION, re-confirmed on this head. The note is .changeset/37983-knowledge-source-save-needs-the-service.md, its ## FROM → TO line. On this head it reads: "A deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry, where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." The base sentence it replaces, still what main holds: "A deployment whose stack does not declare requires: ['knowledge'], where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." The note is still PENDING: on main at 23fa3619c2 it is in the top level of .changeset/ with the blob 4e3330d2b5 it had at the old base, it is not under .changeset/pre/, no CHANGELOG.md names it, and no version pass has run since #38032, which predates it. The corrected sentence is true of the code on this head: the knowledge row of PLATFORM_CAPABILITY_PROVIDERS carries mountedBy: { collection: 'knowledgeSources' }, stackItemCapabilities adds the token for a stack that holds such an item, the provider row mounts KnowledgeServicePlugin, and the refusal fires only where no knowledge service is registered; none of those files moved on main. The correction is right to make: card #38058 names this line in its What and its Acceptance, and the base sentence sends a stack that already ships a source to a migration it does not need. This record is the same-head at-tier confirmation of it; the Check Changeset foreign-changeset step is red on this head for this correction, by design.

The observations of the third grade in 7235658537 stand as accepted deviations; the merge touches none of them.

CI on this head at 2026-11-28 09:00Z, early in its run. Success: Governed Surface Queue Guard, Spec property liveness, PR-body guards, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Dogfood Regression Gate, Check PR Size, Auto Label, filter. In progress: Check Changeset (its step "Reject an empty-frontmatter changeset added by this PR", the foreign-changeset rule, already reads failure, as designed), Build Core, Build UI Deps, the four Type Check jobs, Lint · ESLint, Lint · docs & code guards, Lint · repo & tooling gates, Lint · CI, release & engine gates, two scoped Lint jobs, Live E2E UI, both shard plans, the docs-drift flag; the test shards have not started. No check has concluded red. The verdict is on the design and the contract; every family still running is the gate's to conclude and is read again before landing.

No must-fix, no should-fix.

Implemented-by: claude/area-o1C-38058
Reviewed-by: session_016WV4czzx9dtSEm3jWWL9c3

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

L1 verdict (L1-a): ACCEPT (delta, merge only) at head b460542e6b6e869b42fae05333e13cc8941b5440 (Fixes #38058). This follows ACCEPT 7235896285 at 3865f313b1.

Review summary

  • The head. It is one merge of origin/main into 3865f313b1, with no author commit. The net diff against the new merge base 23fa3619c2 has the same git patch-id --stable as the reviewed head's diff against its own base, f8f786b2c0. It is the same 13 files, +408/-76, and the merge resolved no conflict.
  • The record. Delta contract record 7236969160, below, names this exact head. It is PASS with its tier verified, and nothing graded is open. Main's intervening commits undercut none of the earlier judgments.
  • The DELIBERATE CORRECTION. The record confirms it again on this head: the 37983 note is still pending, and the corrected FROM sentence is true of the code. This PR narrows nothing. The no (narrowing) line in that note is feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013's own, and it is untouched.
  • Gates. CI on this head was early in its run at 09:00Z. Check Changeset reads red by design on the foreign-changeset step alone. Landing waits on every other check at this head concluding green.

Next: this goes to seat 1 for the Tier H landing, which needs a seat record and an authorized approval.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Seat record · 2026-11-28T09:46Z · PR #38208 (Fixes #38058) · head b460542e6b6e869b42fae05333e13cc8941b5440 · queue guard narrowing leg (edits a pending note carrying Clause-②: no (narrowing)) — authorised approval required

维护者速读

  • 做什么:在没装知识服务的部署上保存或复制知识源时,报错说得更准。按环境注册的知识服务落空时单独说明原因;复制应用包时提示怎么补救,而且只说一次。升级说明第 19 条只点名真正受影响的部署。这是 feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013 复审留下的收尾。
  • 风险:13 个文件 +408/−76,只改拒绝时的报错文字、升级说明,以及一个内部查找辅助函数。接受与拒绝的范围不变,可以直接撤回。
  • 要你做什么:审批人批准即可。它顺手更正了一条还没发布的升级说明(feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013 留下的那条),所以队列把它按「收窄」对待,需要授权批准。契约审核 PASS 7236969160,Head-sha b460542e6b6e869b42fae05333e13cc8941b5440;批准后座位自主落地。
  • 不批会怎样:那条待发布的升级说明会对不受影响的部署也说「要改配置」,报错也分不清服务没装和本环境没注册这两种情况。

Seat opinion: land.

席位核对 — ACCEPT · repo:objectstack#1 · head b460542e6b

  1. Shape. Ready, base main, 13 files (+408/−76) across packages/metadata-core, packages/runtime, packages/spec (semantic migration entry 19) and two changesets. Body: Fixes #38058, Clause-②: yes (widening), Metadata-protocol: none. check-governed-merges reads NOT governed by path. The merge queue's Governed Surface Guard dropped it at 2026-11-28T08:56Z (run 46125950859, "Narrowed Spec Change"), because it edits .changeset/37983-knowledge-source-save-needs-the-service.md, which carries feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013's Clause-②: no (narrowing). That leg needs a same-head contract record and an authorised APPROVED review, so it comes to the seat.
  2. Premise measured. Four review follow-ups (N1, N3, N4, N5) of the no-knowledge-service save refusal. The scoped-factory miss gets its own 503 sentence, the duplicate door words its remedy, a jsdoc is reworded, and entry 19 plus the 37983 FROM line name only stacks that neither declare requires: ['knowledge'] nor ship a knowledgeSources entry. The save row keeps today's bytes. The contract record confirms the PR narrows nothing itself; the narrowing line belongs to feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013 and is untouched.
  3. DELIBERATE CORRECTION confirmed (seat). .changeset/37983-knowledge-source-save-needs-the-service.md, ## FROM → TO line, corrected to: "A deployment whose stack neither declares requires: ['knowledge'] nor ships a knowledgeSources entry, where authors save knowledge sources → add requires: ['knowledge'] to the stack, restart, then save the source." The old sentence is false after this PR, so restoring it from base is wrong. This record and the same-head at-tier PASS 7236969160 are the confirmation check-empty-changeset asks for. Check Changeset stays red by design on that step only.
  4. Gates (check-runs at this head). 57 success, 11 skipped, 1 failed: Check Changeset, red by design on the DELIBERATE CORRECTION step only (item 3) and not a required context. mergeable clean. landing-k K = 2 after the clean main merge.
  5. Out of scope → where it went. N2 was accepted as a deviation in the earlier contract record and is not carried. Security-touching: no.
  6. Landing terms. L1-a ACCEPT (delta, merge only) 7236974579 on ACCEPT 7235896285 + contract review PASS 7236969160 (CONTRACT_REVIEW_TIER, this exact head, as the queue guard requires) ⇒ ②③ in one --handoff stroke. After an authorised APPROVED, seat 1 lands it (maintainer's seat-thread line 2026-11-26T13:33Z 「审批人批准后的 Tier H PR 你可以自主落地」). A head move other than a clean main merge withdraws the hand-off, and any head move needs a new contract record for the queue guard.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Approval request · merge-queue narrowing leg (edits the pending #38013 note) · PR #38208 (Fixes #38058) · head b460542e6b6e869b42fae05333e13cc8941b5440

@os-zhuang: the no-knowledge-service save refusal's review follow-ups from #38013. A scoped-factory miss gets its own 503 sentence, and the duplicate door words its remedy. Entry 19 and the pending .changeset/37983-…md FROM line now name only the stacks that are actually affected. That note edit is a DELIBERATE CORRECTION, confirmed by the seat record above. Because the note carries #38013's Clause-②: no (narrowing), the Governed Surface Guard asks for an authorised approval. Records on this head:

  • L1-a ACCEPT (delta, merge only) 7236974579
  • contract review PASS 7236969160 (CONTRACT_REVIEW_TIER, this exact head)
  • seat record ACCEPT above

Every check is green or expected-skip, except Check Changeset, which is red by design on the deliberate-correction step. An APPROVED review on this head lets seat repo:objectstack#1 land it; nothing else is asked.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

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

Correction · 2026-11-28T09:48Z · seat record 7237466902, item 4: GitHub reads this PR's mergeable state as unstable, not clean. The only cause is the non-required Check Changeset red on the DELIBERATE CORRECTION step. There is no conflict, and nothing else in the record changes.

@os-zhuang
os-zhuang added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 898b056 Nov 28, 2026
72 of 74 checks passed
@os-zhuang
os-zhuang deleted the claude/area-o1C-38058 branch November 28, 2026 10:20
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
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

3 participants