Skip to content

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

Description

@objectstack-fleet

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

Filing gate: ① follow-up of PR #38013 (#37983; contract review 7228262724 nits N1, N3, N4 and N5, folded into one card as L1 7228292666 lists them; N2 accepted as a deviation, not carried) · Source: topic #37000
Grading: area:ai · Feature · p3 (suggested: docs-face over-inclusion and wording; no wrong accept or refusal on the platform's own service) · reach: an author reading semantic migration entry 19 on a stack that ships a knowledgeSources entry; a host registering a scoped knowledge factory; a caller duplicating a package that holds a source · evidence: read of PR #38013 at 33acf12 by the contract review (no live run).
Dedupe: is:issue knowledge-source-save-refused-without-knowledge-service → checked at filing; open: #37983 (the parent) only.
Reader: area o1-C of seat repo:objectstack#1 claims it after triage's first touch.

维护者速读

  • 问题:feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013 让"没装知识服务的部署上保存知识源"当场失败。复审留下四处小毛病:升级说明把"已自带知识源的应用"也算进受影响范围(照做无害但多余);少见的按范围注册的知识服务落空时会被误说成"没装知识服务";一段代码注释读不通;复制应用包时报错里叫人"再保存一次知识源"。
  • 做什么:收窄升级说明的适用范围,给按范围落空单独一句说明,修两处文字。
  • 谁受益:照升级说明操作的作者、复制应用包的管理员(说明更准,报错能照着做)。
  • 需要你做的:无。

What

  1. N1: semantic migration entry 19.knowledge-source-save-refused-without-knowledge-service.ts (surface, acceptanceCriteria) and the changeset's FROM line describe the affected deployment as one whose stack "does not declare requires: ['knowledge']". Since knowledge_source: adapter becomes optional (the deployment's store), and a knowledge_source item mounts the knowledge service #37306 a stack that ships a knowledgeSources entry also mounts the service (mountedBy: { collection: 'knowledgeSources' }), and saves there are accepted. Narrow the text to a deployment that neither declares the token nor ships a source.
  2. N3: on the dispatcher transport and the package-duplicate door, resolveServiceOrLoud also answers undefined for the no-instance-in-scope classification, which is then told "this deployment runs no knowledge service". The platform plugin registers a plain instance, so the platform's own service cannot reach this; a host with a scoped knowledge factory that answers nothing for a scope can. Give that classification its own sentence (or state why the shared one is right), pinned.
  3. N4: the reworded jsdoc on OpenAuthoringWriter.itemSaveRefusal ("..., or on a deployment with no knowledge service, or undefined ...") no longer parses as a sentence. Reword it.
  4. N5: through the package-duplicate door the predicate's sentence is appended verbatim, so a caller duplicating a package is told to "save the source again" and that "Nothing was written" after "nothing was copied". Word the duplicate door's remedy for its caller (duplicate the package again).

Acceptance

  • Entry 19's surface / acceptanceCriteria and the changeset FROM line no longer include a stack that ships a knowledgeSources entry.
  • A scoped-factory miss is answered with its own sentence (or the PR states and pins why not); the platform-instance path is unchanged (control).
  • The itemSaveRefusal jsdoc reads as a sentence.
  • The duplicate door's refusal tells the caller to duplicate again, and says nothing was copied once.

Blocked-by: #38013

Activity

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

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:docs · Task · p3 · pm:blocked · size XS; rationale: review nits on the no-service knowledge_source save refusal. Its migration entry over-includes stacks that ship a source, and a few wordings. Docs-face over-inclusion with no wrong accept or refusal, so the filer's p3 stands. It waits per its Blocked-by: line. Recorded 2026-11-27T23:13Z.

  3. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Unlock · #38058 · 2026-11-28T04:57Z: its Blocked-by: PR #38013 merged at 2026-11-28T04:50Z, and #37983 is closed. pm:blocked → pm:queue; the grade (p3, area:ai, domain:docs) is unchanged. Answers seat repo:objectstack#1 (7234359050).

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 28, 2026
  5. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 13 · area o1-C (epic #37000; area concurrency 8 by the maintainer 2026-11-27T11:26Z) · 2026-11-28T05:48Z
    Session: session_016WV4cwPhGV4g9p1BGQaZbP
    Account: os-elon-musk
    Branch: claude/area-o1C-38058
    Worktree: objectstack-issue-38058
    Domain: domain:server
    Area: o1-C
    Seat: repo:objectstack#1
    File surface: packages/spec/src/migrations/entries/semantic/19.knowledge-source-save-refused-without-knowledge-service.ts (N1), .changeset/37983-knowledge-source-save-needs-the-service.md FROM line (N1), packages/runtime/src/http-dispatcher.ts + packages/runtime/src/domains/packages.ts (refuseKnowledgeSourcePackageWrite, the duplicate door) for N3/N5, packages/runtime/src/domains/mcp-authoring.ts jsdoc at 441 (N4), packages/metadata-core/src/knowledge-source-save-admission.ts if the sentence is parameterised there, their tests, a changeset.
    Container & model: S, mode:subagent, model: default tier (dispatch-gates --tier: "no path-derived mandate"; four review nits across runtime, metadata-core and spec, one of them a new refusal sentence with a pin), effort: medium (reason: wording and one message branch, no accept-set change)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack's own code, packages/runtime/src/domains/packages.ts | a refusal tells the caller the wrong remedy (duplicate door) or the wrong cause (scoped-factory miss), and the migration entry names stacks that are not affected | an author reading entry 19; a host with a scoped knowledge factory; a caller duplicating a package that holds a source
    Thread-read: 7234377880
    Premise: holds, read on origin/main 7605e0c — entry 19 and the 37983 changeset are on main (from #38013, d59478f); no-instance-in-scope is classified at http-dispatcher.ts:2904; the itemSaveRefusal jsdoc is at mcp-authoring.ts:441.
    Serial constraints cleared: #38013 merged at d59478f. No open area PR touches these files (file lists of #38060, #38175, #37982, #38160, #38056, #38167 read).
    Pre-claim lane: packages/runtime/** ⇒ domain:server.
    Pre-claim deps: none.
    Prior rulings read: card thread — triage 7229981145 (Task p3 XS), unlock 7234377880; contract review 7228262724 on PR #38013 (N2 accepted as a deviation, not carried).
    Fold-or-serial: not folded.

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 28, 2026
  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
     "issue": 38058,
     "status": "done",
     "branch": "claude/area-o1C-38058",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/38208",
     "session": "session_016WV4cwPhGV4g9p1BGQaZbP",
     "premise_still_valid": true,
     "summary": "N3: DomainHandlerDeps gains an OPTIONAL classifyServiceOrLoud (the dispatcher's existing classifyService, exposed; isRequestKernelReady precedent; not added to the package index), a runtime-internal resolveKnowledgeServiceForSave maps a no-instance-in-scope miss to metadata-core's new knowledgeServiceNotInScope(scopeId), and authoredKnowledgeSourceRefusal answers it with its own 503 SERVICE_UNAVAILABLE sentence naming the environment (no 'runs no knowledge service', no requires) on the dispatcher /meta save, the MCP draft save and the package duplicate; the platform's plain-instance path is pinned unchanged as the control. N5: the predicate takes optional door: 'save'|'duplicate'; the duplicate door's refusal now says 'nothing was copied' once and tells the caller to duplicate the package again; /meta save sentences are byte-identical. N4: itemSaveRefusal jsdoc reworded. N1: entry 19 surface/acceptanceCriteria and the 37983 changeset FROM line narrowed to a stack that neither declares requires: ['knowledge'] nor ships a knowledgeSources entry (declared on the PR as DELIBERATE CORRECTION). Premise held on origin/main 7605e0c9cc (mountedBy collection knowledgeSources at packages/spec/src/kernel/platform-capabilities.ts:255).",
     "tests": "At head b85886609d: metadata-core test 29/29 files, 1115/1115 tests; runtime test 656/656 files, 12446 passed / 25 skipped; rest meta-write-door-capability-enumeration.test.ts 81 passed; metadata-core and runtime typecheck exit 0 (runtime includes check:test-typecheck). New pins: metadata-core scope-miss sentence + door:'duplicate' wording; runtime meta-save-capability-gate (real ObjectKernel, SCOPED knowledge factory: refused 503 naming 'platform'; CONTROL same factory serving the scope + plain instance admitted) and packages-knowledge-source-gate (no-service duplicate prefix pinned, 'nothing was copied' exactly once, no 'save the source'/'Nothing was written'; scoped-factory case + plain-instance control). Ablation via ablation-replace.mjs deleting the isKnowledgeServiceNotInScope branch, metadata-core rebuilt, ablation-dist-preflight --absent: marker absent from 8 built files; both runtime scoped cases red (Tests 2 failed | 1 passed); restore blob == HEAD, git diff HEAD empty; rebuild marker count 1 in dist/index.js, cases green (3 passed). Caveat: the mutated build exited 1 (unused type guard fails dts), JS bundle emitted without the branch.",
     "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 97 commands at 68bf4ec548 (re-derived at b85886609d, identical), all run under os-verify-lock after a spec rebuild: 93 exit 0; check-empty-changeset --base origin/main exit 1 (DELIBERATE CORRECTION of .changeset/37983..., red by design, confirming record is the seat's); check:route-envelope exit 1 (helper first under domains/, moved to packages/runtime/src/knowledge-service-lookup.ts, re-run exit 0 at b85886609d); cli migrate-meta-engine-guidance.test.ts exit 1 in the batch at oclif manifest global setup (no test ran), re-run exit 0, 3 passed (that re-run was outside the lock); check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (whole-tree dist) = NOT MEASURED, CI reads it. check-nul-bytes exit 0. --ran reconciliation not run as a separate step: NOT MEASURED. PR check-runs at b85886609d when reported: all gate-carrying checks in_progress (Check Changeset, Type Check workspace/source/consumer/debt ledger, Lint ESLint/repo & tooling/docs & code guards/PM dispatch-gates, Governed Surface Queue Guard, Spec property liveness, PR-body guards); skipped: queue/opt-in jobs. pnpm lint not run locally (CI's).",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST /issues/38208/assignees), os-dev-report comment via post-stamped (POST /repos/objectstack-ai/objectstack/issues/38058/comments); plus git push (not REST)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — the knowledge service's own admitAuthoredSource 503 text ('Nothing was written; try again.') and its 403 'have someone who may query it save the source' still pass verbatim through the duplicate door (packages/services/service-knowledge/src/knowledge-service.ts ~3157/3215); outside this card's file surface; in PR Acceptance notes",
      "carrier: none · noted, not filed — REST transport PUT /meta resolves the knowledge service via RestServer.resolveKnowledgeService (kernelServiceProvider), not the dispatcher's classified lookup; how a scoped-factory miss reads there was not measured; in PR Acceptance notes"
     ],
     "deviations": "The cli test re-run and one route-envelope re-run ran outside os-verify-lock (light, single-file). DomainHandlerDeps (exported interface) gained an optional member: treated as additive runtime plumbing per the isRequestKernelReady precedent, not as a contract fork; flag if the seat reads it as needs_decision."
    }
  8. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment (2026-11-28T07:01Z): S1 of the contract record 7235658537 on PR #38208 corrects this card's declaration. The claim comment 7234905717 reads Clause-②: no; the diff enlarges the public surface of @objectstack/metadata-core (knowledgeServiceNotInScope, KnowledgeServiceNotInScope, KnowledgeSourceSaveDoor, and the optional input door on authoredKnowledgeSourceRefusal) and of @objectstack/runtime (the optional member classifyServiceOrLoud on the exported DomainHandlerDeps, which makes ClassifiedServiceLookup reachable). The declaration for this card is now:

    Clause-②: yes (widening) — the additions named above; no accept-set moves, level stays patch

    The PR body and the changeset carry the same line on the delta head. No tier changes: the spec path had already put PR #38208 at CONTRACT_REVIEW_TIER.

  9. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
     "issue": 38058,
     "status": "done",
     "branch": "claude/area-o1C-38058",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/38208",
     "session": "session_016WV4cwPhGV4g9p1BGQaZbP",
     "premise_still_valid": true,
     "summary": "Rework round for L1 7235665356 (contract record 7235658537 PASS), new head 3865f313b1. S1: the Clause-② line in the PR body and in .changeset/38058-knowledge-save-refusal-scope-miss-and-duplicate-wording.md now reads `Clause-②: yes (widening)`, followed by the named additions: metadata-core knowledgeServiceNotInScope, KnowledgeServiceNotInScope, KnowledgeSourceSaveDoor and the optional door input on authoredKnowledgeSourceRefusal; runtime's exported DomainHandlerDeps gains the optional classifyServiceOrLoud, which makes ClassifiedServiceLookup reachable. The level stays patch. S2: the ClassifiedServiceLookup alias and its jsdoc moved above the DomainHandlerDeps jsdoc block, so the interface keeps its own doc. The DELIBERATE CORRECTION of the 37983 changeset is unchanged, and the claim comment was not touched. N3: DomainHandlerDeps gains an OPTIONAL classifyServiceOrLoud (the dispatcher's existing classifyService, exposed; isRequestKernelReady precedent; not added to the package index), a runtime-internal resolveKnowledgeServiceForSave maps a no-instance-in-scope miss to metadata-core's new knowledgeServiceNotInScope(scopeId), and authoredKnowledgeSourceRefusal answers it with its own 503 SERVICE_UNAVAILABLE sentence naming the environment (no 'runs no knowledge service', no requires) on the dispatcher /meta save, the MCP draft save and the package duplicate; the platform's plain-instance path is pinned unchanged as the control. N5: the predicate takes optional door: 'save'|'duplicate'; the duplicate door's refusal now says 'nothing was copied' once and tells the caller to duplicate the package again; /meta save sentences are byte-identical. N4: itemSaveRefusal jsdoc reworded. N1: entry 19 surface/acceptanceCriteria and the 37983 changeset FROM line narrowed to a stack that neither declares requires: ['knowledge'] nor ships a knowledgeSources entry (declared on the PR as DELIBERATE CORRECTION). Premise held on origin/main 7605e0c9cc (mountedBy collection knowledgeSources at packages/spec/src/kernel/platform-capabilities.ts:255).",
     "tests": "Rework head 3865f313b1, run under os-verify-lock (command-exit 0): pnpm --filter @objectstack/runtime typecheck exit 0, with check:test-typecheck OK (27 files / 183 errors / 66 signatures held in the ledger). A first attempt went red on 3 untouched test files with TS2307 for @objectstack/driver-turso, because the fresh worktree had not built that devDependency; after building it the run was green. metadata-core knowledge-source-save-admission.test.ts: 11 passed. runtime meta-save-capability-gate, packages-knowledge-source-gate, mcp-authoring and scoped-service-miss-attribution: 4 files, 191 passed. Earlier round at b85886609d: At head b85886609d: metadata-core test 29/29 files, 1115/1115 tests; runtime test 656/656 files, 12446 passed / 25 skipped; rest meta-write-door-capability-enumeration.test.ts 81 passed; metadata-core and runtime typecheck exit 0 (runtime includes check:test-typecheck). New pins: metadata-core scope-miss sentence + door:'duplicate' wording; runtime meta-save-capability-gate (real ObjectKernel, SCOPED knowledge factory: refused 503 naming 'platform'; CONTROL same factory serving the scope + plain instance admitted) and packages-knowledge-source-gate (no-service duplicate prefix pinned, 'nothing was copied' exactly once, no 'save the source'/'Nothing was written'; scoped-factory case + plain-instance control). Ablation via ablation-replace.mjs deleting the isKnowledgeServiceNotInScope branch, metadata-core rebuilt, ablation-dist-preflight --absent: marker absent from 8 built files; both runtime scoped cases red (Tests 2 failed | 1 passed); restore blob == HEAD, git diff HEAD empty; rebuild marker count 1 in dist/index.js, cases green (3 passed). Caveat: the mutated build exited 1 (unused type guard fails dts), JS bundle emitted without the branch.",
     "gates": "Rework head 3865f313b1: check-adr-0087-registration --base origin/main exit 0 ('this PR adds no declared-breaking changeset (2 non-breaking changeset(s) seen)'); check-changeset-no-major --base origin/main exit 0. clause2-line readClause2Line on the new changeset reads kind declared, value yes, arm widening. The rework diff is jsdoc order plus a changeset line, so the full 97-command subset was not re-run at the new head. Earlier round at b85886609d: dispatch-gates --commands --repo objectstack-ai/objectstack: 97 commands at 68bf4ec548 (re-derived at b85886609d, identical), all run under os-verify-lock after a spec rebuild: 93 exit 0; check-empty-changeset --base origin/main exit 1 (DELIBERATE CORRECTION of .changeset/37983..., red by design, confirming record is the seat's); check:route-envelope exit 1 (helper first under domains/, moved to packages/runtime/src/knowledge-service-lookup.ts, re-run exit 0 at b85886609d); cli migrate-meta-engine-guidance.test.ts exit 1 in the batch at oclif manifest global setup (no test ran), re-run exit 0, 3 passed (that re-run was outside the lock); check:dual-build-cjs-loads exit 3 PREREQUISITE NOT MET (whole-tree dist) = NOT MEASURED, CI reads it. check-nul-bytes exit 0. --ran reconciliation not run as a separate step: NOT MEASURED. PR check-runs at b85886609d when reported: all gate-carrying checks in_progress (Check Changeset, Type Check workspace/source/consumer/debt ledger, Lint ESLint/repo & tooling/docs & code guards/PM dispatch-gates, Governed Surface Queue Guard, Spec property liveness, PR-body guards); skipped: queue/opt-in jobs. pnpm lint not run locally (CI's).",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "mcp_calls": "0",
     "api_writes": "4 — round 1: (1) the relay pr_create (POST /pulls + POST /issues/38208/assignees); (2) the report comment 7235562715 on #38058. Rework: (3) the PR body edit through the relay issue_patch (PATCH /repos/objectstack-ai/objectstack/issues/38208), read back 12004 bytes identical; (4) this report comment on #38058. Plus git push, which is not REST.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none · noted, not filed — the knowledge service's own admitAuthoredSource 503 text ('Nothing was written; try again.') and its 403 'have someone who may query it save the source' still pass verbatim through the duplicate door (packages/services/service-knowledge/src/knowledge-service.ts ~3157/3215); outside this card's file surface; in PR Acceptance notes",
      "carrier: none · noted, not filed — REST transport PUT /meta resolves the knowledge service via RestServer.resolveKnowledgeService (kernelServiceProvider), not the dispatcher's classified lookup; how a scoped-factory miss reads there was not measured; in PR Acceptance notes"
     ],
     "deviations": "The cli test re-run and one route-envelope re-run ran outside os-verify-lock (light, single-file). DomainHandlerDeps (exported interface) gained an optional member: treated as additive runtime plumbing per the isRequestKernelReady precedent, not as a contract fork; flag if the seat reads it as needs_decision. Rework: post-stamped --body=38208 --ack-through=7235665356 REFUSED the PR body with exit 2, nothing written: its body mode requires a seat signature as the first line, and a PR body opens with `Fixes #38058`. So the body was edited through the relay issue_patch, the one edit op whose target may be a pull request, with the signed trailer (PR_BODY_TRAILER_SHAPE, repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP) on the last non-empty line. This conflicts with os-dev.md's 'PR body only at pr_create, the seat writes later edits'; the coordinator's explicit order to change the body was taken as overriding it. Rework head 3865f313b1."
    }
  10. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Close-out · area o1-C · 2026-11-28T10:23Z

    Delivered by PR #38208 (merged 898b056 at 2026-11-28T10:20Z, Tier H through seat 1). Its follow-ups #38210 (the service verdict's wording at the duplicate door) and #38211 (REST PUT /meta answering a scoped miss, measured first) are pm:blocked by this card's PR, which has now merged. Nothing else remains on this card for the area. pm:dispatched removed with this comment.

  11. removed
    pm:dispatched
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:docspriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions