Repository navigation
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
Conversation
…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
📓 Docs Drift CheckThis PR changes 3 package(s): 20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 182 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · b858866 · 2026-11-28T06:53Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: 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 ① Derived judgments
② Semver level
S1 (should-fix) — the ③ Boundary flags
④ Design judgment
Point 2, the DELIBERATE CORRECTION. The note is
S2 (should-fix) — Point 3, the pin. Confirmed in the diff. Observations of the third grade (no effect on correctness or the contract), accepted as deviations unless a later head moves these files anyway:
CI on this head at 2026-11-28T06:58Z. Failure: Open on this head: S1, S2. No finding of the first grade. A delta review of the fixes is owed. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): REWORK at head Review summaryShape.
Why REWORK.
What the record settles.
Gates. CI was still running at 06:58Z. 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
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 3865f31 · 2026-11-28T07:19Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: Delta record on the record 7235658537 (head ① Derived judgments
② Semver level
S1 (should-fix): closed The changeset ③ Boundary flags
④ Design judgment
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 The DELIBERATE CORRECTION, re-confirmed on this head. The note is 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: No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT (delta) at head Review summaryRecords. 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 DELIBERATE CORRECTION. The record re-confirms the correction of 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 Gates. CI at 07:24Z had 30 success, Next: not governed, so the area lands it on all-green apart from the confirmed |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP Landing · area o1-C · head
State: ready + auto-merge; #38058 closes on merge via |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · b460542 · 2026-11-28T08:59Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: Second delta record, on the records 7235658537 (head ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
The DELIBERATE CORRECTION, re-confirmed on this head. The note is 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: No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): ACCEPT (delta, merge only) at head Review summary
Next: this goes to seat 1 for the Tier H landing, which needs a seat record and an authorized approval. |
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Seat record · 2026-11-28T09:46Z · PR #38208 (Fixes #38058) · head 维护者速读
Seat opinion: land. 席位核对 — ACCEPT · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwoXEE1amuRAGHdPBs Approval request · merge-queue narrowing leg (edits the pending #38013 note) · PR #38208 (Fixes #38058) · head @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
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. |
|
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 |
Fixes #38058
Clause-②: yes (widening) —
@objectstack/metadata-coreaddsknowledgeServiceNotInScope,KnowledgeServiceNotInScope,KnowledgeSourceSaveDoorand the optionaldoorinput onauthoredKnowledgeSourceRefusal;@objectstack/runtime's exportedDomainHandlerDepsadds the optionalclassifyServiceOrLoud, which makesClassifiedServiceLookupreachableMetadata-protocol: none
维护者速读
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).
@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 intoundefined, so a host whose scopedknowledgefactory serves no instance for the request's environment was told "this deployment runs no knowledge service" and sent to the stack'srequires. Both statements are false for that host.DomainHandlerDepsgains an optionalclassifyServiceOrLoud. It is the same chain, scope travel and loud rejections, and it returns the classified answer. Optional for the same reason asisRequestKernelReady: 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 typeClassifiedServiceLookupmoved from a module-local alias inhttp-dispatcher.tstodomain-handler-registry.ts, and it is not added to the package index.resolveKnowledgeServiceForSave(packages/runtime/src/knowledge-service-lookup.ts), maps the classified answer for the predicate. A scope miss becomesknowledgeServiceNotInScope(scopeId), a frozen value branded withSymbol.for, new in@objectstack/metadata-core. The/metasave (dispatcher transport), the MCPsave_metadata_drafttool and the package duplicate all call it. The MCP door is included because it reads the same deps member and had the same collapse.authoredKnowledgeSourceRefusalanswers that value with its own503 SERVICE_UNAVAILABLEsentence. 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 namerequires: ['knowledge'].KnowledgeServicePluginregisters 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.authoredKnowledgeSourceRefusaltakes an optionaldoor: 'save' | 'duplicate',saveby default. Withduplicate, 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/metasave's sentences are byte-identical to before; the existing pins on both transports and the MCP door stay green unchanged.OpenAuthoringWriter.itemSaveRefusaljsdoc is reworded so that it reads as sentences.@objectstack/spec).surfaceandacceptanceCriteriaof semantic migration entryknowledge-source-save-refused-without-knowledge-servicenow name only a deployment whose stack neither declaresrequires: ['knowledge']nor ships aknowledgeSourcesentry. A stack that ships a source also mounts the service:mountedBy: { collection: 'knowledgeSources' }inpackages/spec/src/kernel/platform-capabilities.ts.DELIBERATE CORRECTION of a pending release note:
.changeset/37983-knowledge-source-save-needs-the-service.md, the## FROM → TOline. The corrected sentence: "A deployment whose stack neither declaresrequires: ['knowledge']nor ships aknowledgeSourcesentry, where authors save knowledge sources → addrequires: ['knowledge']to the stack, restart, then save the source."check-empty-changesetis 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/runtimeand@objectstack/spec.Read first (by risk):
packages/metadata-core/src/knowledge-source-save-admission.ts: theisKnowledgeServiceNotInScopebranch, andDOOR_WORDING. The save row must keep today's bytes.packages/runtime/src/domain-handler-registry.ts: the new optionalclassifyServiceOrLoudon an exported interface.packages/runtime/src/knowledge-service-lookup.ts: the mapping, and the fallback for a deps without the member.Tests
All runs are at head
b85886609dunless marked otherwise.metadata-core:knowledge-source-save-admission.test.tshas two new cases.503 SERVICE_UNAVAILABLE. The pin covers the first sentence, and the message has no "runs no knowledge service" and norequires. 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.tsadds a realObjectKernelwith aServiceLifecycle.SCOPEDknowledgefactory.'platform', and nothing is saved.runtime:packages-knowledge-source-gate.test.ts.cannot be copied, andduplicate the package again. It has no "save the source" or "Nothing was written", and "nothing was copied" occurs exactly once.scripts/ablation-replace.mjs: the lineif (isKnowledgeServiceNotInScope(service)) return noKnowledgeServiceInScopeRefusal(...)was deleted andmetadata-corerebuilt.ablation-dist-preflight --absentreported 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 emptygit diff HEAD. The rebuild put the marker back indist/index.js(count 1), and the cases went green (Tests 3 passed).metadata-corebuild 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 typecheckandpnpm --filter @objectstack/runtime typecheckboth exit 0. The runtime run includescheck:test-typecheck.Acceptance notes
DomainHandlerDepsis an exported runtime interface. The new member is optional and additive, follows theisRequestKernelReadyprecedent, and adds nothing to the package index. No spec contract or authorable key moves.Nothing was written; try again., in@objectstack/service-knowledgeadmitAuthoredSource) 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.PUT /meta/:type/:nameresolves the service throughRestServer.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 --commandsderived 97 commands at68bf4ec548. The set was re-derived after the helper moved, atb85886609d, and is identical. All 97 ran under the verify lock after apackages/specrebuild. 93 exited 0. The four others:node scripts/check-empty-changeset.mjs --base origin/mainexit 1: the DELIBERATE CORRECTION above, red by design.pnpm check:route-envelopeexit 1: the helper first lived underdomains/. It was moved beside the dispatcher, and the gate re-ran exit 0 atb85886609d.pnpm --filter @objectstack/cli exec vitest run test/migrate-meta-engine-guidance.test.tsexit 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-loadsexit 3, PREREQUISITE NOT MET: it needs every package'sdist/. NOT MEASURED locally; CI reads it.node scripts/check-nul-bytes.mjsexits 0 atb85886609d. Every other family is CI's.Rework at
3865f313b1(L1 7235665356): theClause-②line above and in the changeset now readsyes (widening)with the named additions (the level stays patch), andClassifiedServiceLookupwith its jsdoc moved above theDomainHandlerDepsdoc block. Re-run at3865f313b1:pnpm --filter @objectstack/runtime typecheckexit 0 (check:test-typecheck OK);knowledge-source-save-admission.test.ts11 passed; runtimemeta-save-capability-gate,packages-knowledge-source-gate,mcp-authoring,scoped-service-miss-attribution191 passed;check-adr-0087-registrationandcheck-changeset-no-majorexit 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
packages/specholds no runtime logic.pnpm lintis CI's.main, one pull request.packages/spectouched: no generated artifact moved (a migration entry's prose only;check:upgrade-guideandcheck:spec-changesgreen locally).content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code