Skip to content

fix(create-objectstack): name the help articles in the scaffold summary and descriptions - #38584

Merged
objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-qs81pg
Nov 29, 2026
Merged

objectstack-fleet[bot] merged 8 commits into
mainfrom
claude/project-thread-qs81pg

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Jianguo · project thread
Fixes #38483
Clause-②: no
Metadata-protocol: none

Supersedes #38568 (same commits, continued on this branch: seat 5's dev ran out of tokens, and seat 1 took the card over in claim 7255582169 and its amendment 7255673725). #38568 is closed (7256137004).

维护者速读

  • 用户能看到什么变化:新建项目的人在创建开始时看到的模板说明、创建完成时看到的「项目一开始包含什么」清单都写上了帮助文章;空白模板、入门示例应用、说明文档和入门教程里的简介也同步更新,入门示例的中文简介一并改好;入门教程里校验结果的对象数、字段数和视图数,以及脚手架说明里的目录树,也按带帮助文章的新模板改对了。
  • 为什么做:上一轮给新项目和入门示例加入帮助文章(该卡已关闭)时,这些描述没有跟着改,审核要求用一张卡收口。
  • 出错会怎样:只涉及提示文字、简介和两个内部检查的范围,出错时用户看到的清单或简介不准,不影响数据和启动,可以直接撤回。
  • 要你做什么:无

What changes

All three places were re-read on main at 4a43d6c first; none was already fixed.

  1. Scaffolder summary. npm create objectstack now prints an Articles line in "Your project starts with:", between Companies and Contacts and Tasks and Notes, pointing at src/objects/ and src/views/ and at the sample help articles in src/data/ (packages/create-objectstack/src/index.ts, the summary block only).
  2. Descriptions. The blank template's manifest.description (in objectstack.config.ts and objectstack.manifest.json) and the Starter's manifest.description now name the help articles in English. The Starter's zh-CN package description now reads 公司、联系人与知识文章,菜单中附带平台的任务和备注。, using the article object's existing zh-CN label. The blank template stays English-only, per the seat's rulings 7249604628 and 7251614638. A scaffolded project still drops the template's description from its own files, so this text reaches only the template's own readers.
  3. platform-objects template sweeps. managed-api-method-affordance-sweep.test.ts and platform-admin-affordance-standing.test.ts now exclude the scaffolder's template directory (packages/create-objectstack/src/templates/). They no longer use a path list that named only company and contact. The next template object is excluded with no edit. The control in the managed-api sweep is kept and widened. It checks four things: the directory matches at least one walked file; every match is an object file in a template's own src/objects/; the matches equal the template object files read off disk without the walk, with article.object.ts named; and the filter removes nothing outside the directory.
  4. The Template line and its mirrors (claim amendment 7254402109). The scaffolder prints the blank template's registry description as Template: blank — … on every run. That description now reads Companies, contacts and help articles, with tasks and notes from the platform in the menu — ready to extend, the same phrase as the manifest and config (packages/create-objectstack/src/template-registry.ts). It is mirrored in the package README's template table and in the two getting-started pages that quote it (your-first-project.mdx, build-with-claude-code.mdx). Also updated: the Starter's English app description (Companies, contacts and help articles, with tasks and notes), the examples/app-starter/package.json description, and the two index.ts comments that quote the template's own description.
  5. The tutorial's counts and the README tree (seat L1 REWORK 7255063318, commit 3df792a). content/docs/getting-started/build-with-claude-code.mdx said the blank template scaffolded only the companies and contacts, so the validate output read three objects and eighteen fields. The prose now names the help articles (article.object.ts, four fields, with its view and sample articles) and reads four objects and twenty-two fields; the validate block reads Data: 4 Objects 22 Fields and UI: 1 Apps 4 Views 1 Actions. Those numbers are measured, not summed: a fresh --template blank scaffold plus the page's own ticket files, through os validate (see Verification). The "What you get" tree in packages/create-objectstack/README.md now lists article.object.ts, a grid for articles beside the companies' and contacts' grid and board, a data/ entry for the seed, and articles in the menu.

Changeset .changeset/38483-scaffold-names-articles.md: patch on create-objectstack and @objectstack/example-starter (the latter is private and versioned only, the same pair the help-articles changeset used). It now also names the README tree. @objectstack/platform-objects gets no changeset: only its test files change.

Read first (by risk):

  1. packages/platform-objects/src/managed-api-method-affordance-sweep.test.ts, the isScaffoldingTemplate predicate and the "skips only scaffolding templates" control. A predicate that is too wide would silently stop sweeping real objects.
  2. packages/create-objectstack/src/scaffold-description.test.ts, the new derived summary pin and the Template line pin.
  3. packages/create-objectstack/src/index.ts, the summary block.

Tests

  • New describe in scaffold-description.test.ts (the file's existing real-CLI harness, now capturing stdout). It derives the expected entries from the template: every src/objects/*.object.ts must be named in the printed block by its pluralLabel, and the block must point at src/data/ while the template's src/data/index.ts exports a seed. A file with no pluralLabel fails loudly. Control: the derived list contains Companies, Contacts and Articles, so a moved directory cannot pass vacuously.
  • The same describe also holds the printed Template: blank — … line to the template: each object's plural label must appear in it (case-insensitive). So the registry description cannot drift from the tree either.
  • The template exclusion control in the managed-api sweep is described above. The standing test uses the same predicate.
  • Item 5 is prose and a docs code block with no pin; no ablation (no tested behaviour moved).
Ablations (prior rounds, at 9f2a6cf and 80f23ea; each restored; restore proved by blob equal to HEAD and an empty git diff HEAD)
  • Deleted the Articles summary line in index.ts (anchor 1 to 0): scaffold-description.test.ts went red, 2 failed / 4 passed. Message: "the summary does not name Articles, an object the template ships", and the src/data/ case failed too.
  • Added a temporary invoice.object.ts with pluralLabel: 'Invoices' to the template's src/objects/ (the "next object" case): red, 1 failed / 5 passed. Message: "the summary does not name Invoices, an object the template ships". File removed, status clean.
  • Renamed the article's pluralLabel to Invoices: red on the control (1 failed / 5 passed).
  • At 80f23ea, reverted the registry description to Companies and contacts, with …: red, 1 failed / 6 passed. Message: "the Template line does not name Articles, an object the template ships".
  • Narrowed isScaffoldingTemplate in the managed-api sweep back to company and contact only: "skips only scaffolding templates, and those still exist" went red, expected 2 entries to equal 3.
Suites (re-run at head 3df792a, after merging origin/main 3014176 in 08bb2af)
  • After a turbo build of the @objectstack/cli, create-objectstack, @objectstack/example-starter and @objectstack/platform-objects closures (71 tasks successful), under os-verify-lock:
  • create-objectstack test: Test Files 26 passed (26), Tests 411 passed (411); typecheck exit 0.
  • @objectstack/example-starter test (the boot test): Test Files 2 passed (2), Tests 14 passed (14); typecheck exit 0.
  • @objectstack/platform-objects test: Test Files 130 passed (130), Tests 2218 passed (2218); typecheck exit 0.
  • The merge of origin/main touched none of this PR's files; the delta against main is the same 14 files.

Acceptance notes

  • The claim was widened (amendment 7254402109) to fold in the Template line and its mirrors. That remainder was first reported here as same-family and is now item 4 above.
  • The Starter's zh-CN app description in starter.translation.ts now reads 公司、联系人与知识文章,菜单中附带平台的任务和备注。, the same wording as its zh-CN package description (second claim amendment).
  • With the path list gone, the cross-package input gate needs a quoted path to keep the platform-objects packages/**/*.object.ts glob held. The old two-path list was that witness. The control's named article.object.ts literal now holds it, and check:cross-package-test-inputs is green.
  • overlap-check names the bot-generated Version Packages PR chore: version packages (next) #38192, which bumps examples/app-starter/package.json's version on the line next to its description. That PR is regenerated from main, so the text conflict resolves on its next refresh. It also names fix(create-objectstack): name the help articles in the scaffold summary and descriptions #38568, which this PR supersedes; both merge cleanly with main.
  • Item 5 touches build-with-claude-code.mdx beyond the lines that quote the template description, as seat L1 7255063318 asked. Measuring it showed two things on that page this PR does not change: the page's own src/apps/support.app.ts beside the template's main.app.ts fails os validate ("An 'app' package must define at most one app", ADR-0019 D3), and the validate block's Runtime: 3 plugins line reads 0 plugins in an uninstalled scaffold. The counts above were taken with the template's single app. Both are older than the help articles and are left to the seat.
  • Not changed, per the seat's L1 nit: the Starter's English app description has no full stop while its zh-CN twin has one.

Verification

Two-minute check: pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/scaffold-description.test.ts should show 7 passed, including "names each template object by its plural label" and "names each template object in the printed Template line too".

How the tutorial's counts were measured (item 5)

At 08bb2af (built): node packages/create-objectstack/dist/index.js support-desk --template blank --skip-install --skip-skills in a scratch directory whose node_modules/@objectstack/spec links to this tree's packages/spec, then node packages/cli/bin/run.js validate there.

  • Fresh scaffold: ✓ Validation passed, Data: 3 Objects 18 Fields, UI: 1 Apps 3 Views (company 7 + contact 7 + article 4 fields).
  • Plus the page's four title= code blocks written verbatim (ticket object, Resolve action, ticket view, support app) and one export line each in the barrels, minus the support app's export (see the acceptance notes): ✓ Validation passed, Data: 4 Objects 22 Fields, UI: 1 Apps 4 Views 1 Actions.
Gates
  • At 3df792a, node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 117 commands (the docs families included). All 117 were run, each exit captured before any pipe; --ran reconciliation reads "117 derived famil(ies) accounted for — 117 run, 0 NOT-MEASURED (a DERIVED zero — all 117 recorded an exit code and none of them is 3)".
  • 113 exited 0 on the first pass. Four exited 3 with PREREQUISITE NOT MET in the fresh worktree, and each exits 0 once its prerequisite is met: check-plugin-teardown-shape --self-test after fetching its pinned fixture commit ("48 cases pass"); check:skill-examples, check:dual-build-cjs-loads and check:i18n-coverage after a full turbo build ("352 prose examples type-check"; "126 published require entry point(s) across 74 package(s) load"; "OK (15 config(s), 577 baselined untranslated string(s), none new)").
  • overlap-check --branch=HEAD before the push of 3df792a: "origin/main: merges cleanly"; fix(create-objectstack): name the help articles in the scaffold summary and descriptions #38568 merges cleanly; chore: version packages (next) #38192 (Version Packages) conflicts on examples/app-starter/package.json, see the acceptance notes.
  • CI-run families are read from this PR's check-runs, not re-run locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jSh8tZmU5uBqzpvg3o

…ry and descriptions

The "Your project starts with:" summary gains an Articles line, pinned
against the template's object files so the next object fails the pin
until the summary names it. The blank template's and the Starter's
descriptions name the help articles (zh-CN in the Starter only). The
platform-objects sweeps exclude the scaffolder's template directory
instead of a two-file path list, with the control kept.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
The literal keeps the package's declared object-file glob held for the
cross-package input gate and pins the exclusion's coverage of it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
…and its mirrors

The blank template's registry description (printed as the Template line
on every run), the package README and the two getting-started pages that
quote it, the Starter's English app description, its package.json
description and the two index.ts comments quoting the template's own
description now name the help articles. The summary pin also holds the
printed Template line to the template's object files.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEkQ5oQLfL8thb6wtUHnTb
… the README tree

The getting-started tutorial's validate output and its prose now read four
objects and twenty-two fields with four views (measured: a fresh blank
scaffold plus the page's ticket files), and name the help articles among
what the blank template scaffolded. The package README's "What you get" tree
lists article.object.ts and the src/data/ seed.

Claude-Session: https://claude.ai/code/session_01QsR2jSh8tZmU5uBqzpvg3o
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m dependencies Pull requests that update a dependency file 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 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 anchor(s) derived from 2 changed package(s); no hand-written page names any of them. ⚠️ 3 changed file(s) yielded no anchor (packages/create-objectstack/README.md, packages/create-objectstack/src/templates/blank/objectstack.config.ts, packages/create-objectstack/src/templates/blank/objectstack.manifest.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

What this run could not see
  • 3 changed file(s) yielded no anchor (packages/create-objectstack/README.md, packages/create-objectstack/src/templates/blank/objectstack.config.ts, packages/create-objectstack/src/templates/blank/objectstack.manifest.json) — pages documenting those are invisible to this run
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 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 — 19 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 696d02f587184095c7b36600c4395cac42dbdd08 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 696d02f587184095c7b36600c4395cac42dbdd08

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · zhuangjianguo · session_01QsR2jSyQBDMyRnrrWKy7WS

席位核对 — ACCEPT · delta L1 by seat repo:objectstack#1, review thread R1 · Head-sha 3df792a9f513218b9aec728f0222cb9fe2bf5b51 · 2026-11-29T13:14Z

Delta against L1 REWORK 7255063318 (seat 5, on #38568 at 3febf445f7). Seat 1 holds card #38483 by takeover 7255582169 and its amendment 7255673725; os-dev report 7256092343. This pull carries #38568's six commits unchanged, main merged in, and one commit for the REWORK.

  • What changed since the reviewed head. The two net diffs differ in three places and nowhere else: the tutorial content/docs/getting-started/build-with-claude-code.mdx, the "What you get" tree in packages/create-objectstack/README.md, and the changeset sentence that names the tree. Everything 7255063318 found to hold is byte-identical, so its reading stands.
  • REWORK item 1, closed. The tutorial now says the blank template leaves companies and contacts (seven fields each) and the help articles (article.object.ts, four fields, with its view and sample articles), and the counts read four objects and twenty-two fields. The validate block prints Data: 4 Objects 22 Fields and UI: 1 Apps 4 Views 1 Actions. I checked the sum against the template at this head: company 7, contact 7, article 4, plus the tutorial's ticket object 4, and one view file each.
  • REWORK item 2, closed. The README tree lists article.object.ts, says what the views are (a grid and a board for companies and contacts, a grid for articles), adds data/ as the seed of sample help articles, and names the articles in the menu line. Each matches the template's files at this head.
  • Checks at this head. 45 success, 18 expected skips, 0 pending, and one failed run that is stale. The one red in the list is the first run of the PR-body guards at 2026-11-29T12:49Z, when fix(create-objectstack): name the help articles in the scaffold summary and descriptions #38568 was still open with the same Fixes #38483. fix(create-objectstack): name the help articles in the scaffold summary and descriptions #38568 is closed (7256137004) and the guard's run of 2026-11-29T12:55Z on this head is green. check-expected-skips --pr 38584: all 18 skipped runs are in main's roster. Not governed (check-governed-merges --pr 38584: 0 of 14 paths).
  • Deviation kept. The changeset names @objectstack/platform-objects although only its test files change, as 7255063318 already accepted.
  • Not held. The nit of 7255063318 (the Starter's English app description says less than its zh-CN twin) was not part of the REWORK and is unchanged.
  • Out of scope, passed to the seat. The report's finding that the tutorial's support.app.ts beside the template's main.app.ts fails os validate has no carrier card; the seat is filing one.
  • Landing. Not governed, so it goes to the merge queue in this stroke. On merge the card closes by Fixes and pm:dispatched comes off create-objectstack: the scaffold summary, manifest descriptions and platform-objects template sweeps still describe a project without the help articles (after #38372) #38483.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 29, 2026 13:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 29, 2026
Merged via the queue into main with commit 75108ea Nov 29, 2026
64 of 65 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-qs81pg branch November 29, 2026 13:41
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…d while the knowledge service is not enabled (objectstack-ai#38599)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Jianguo** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbEfAFjBdY8togk8ou6SwAJF)_

Part of objectstack-ai#38369 (part 2 of 3; part 3, items 4–5, follows from `main`
after this merges)

Clause-②: no (narrowing) — a save door that answered 200 while the
service was held now refuses with 503 naming each missing half; no key
added
Metadata-protocol: narrowed
Skills-docs: follow-up objectstack-ai#38475

## 维护者速读

- 自托管部署如果运行时挂了知识服务但没启用(缺嵌入模型或知识存储),作者在设计器、元数据接口、MCP
里保存知识源,或把无包知识源移进包里,现在会被当场拒绝,并说明缺哪一半、怎么补;以前保存成功,但知识源只是挂着,从不建索引也搜不到。
-
属于知识库检索这条线,执行您对知识服务"挂载不等于启用"的裁决(作者保存时拒绝、四点全按推荐);这是三单中的第二单,第一单已合并,状态页和命令行文字是第三单。
- 只影响作者保存;安装应用包、种子数据、复制应用包照常,配齐两半或宿主自己挂载知识服务的部署不变;出问题可整单撤回。
- 要你做的:批准这次收窄(按审批流程)。

## What changes

Authority: the ADR-0161 K8 dated note on item 12 (◆ "an author's save",
◆ points 1 and 4), ruling record 7248214179 (amendment 7248231750,
points 1 and 4) and build note 3 of 7248592159. Card items covered: item
3.

- **The held refusal lives in the service's own verdict**
(`packages/services/service-knowledge/src/knowledge-service.ts`,
`KnowledgeService.admitAuthoredSource`). While the boot read a
runtime-composed service as not enabled (`heldReading()` set by PR 1),
an author's save is refused `503` with code `SERVICE_UNAVAILABLE`, ahead
of the identity check and every gate, and nothing is written. The
sentence names each half that is missing and the ruled remedy (point 4):
no embedder → "save an embedder provider, restart, then save" (as "…,
restart, then save the source."); the deployment's store not mounted →
it says so, that the boot's log names the reason, and "mount the
deployment's knowledge store, restart, then save"; both → both, in one
remedy. A provider saved without its key carries that cause in the
parenthesis beside the ruled words (build note 3). The engine's own
write (`isSystem`) is admitted, so a shipped source still installs and
is held. The package duplicate (`door: 'duplicate'`) is not refused for
it, as the note rules.
- **Every save door answers it unchanged**: `PUT /meta/:type/:name` on
both transports and the MCP draft save ask
`authoredKnowledgeSourceRefusal`, which forwards the service's verdict;
`POST /packages/:id/move-in` of a package-less source already asks it
with the save door (point 1), so it is refused with the save's remedy.
No door value is added.
- **No-service refusal**
(`packages/metadata-core/src/knowledge-source-save-admission.ts`, card
item 3's "gains 'and save an embedder provider'"). The save door's
sentence now reads "… restart the server, save an embedder provider and
restart again, then save the source again: the service is mounted when
the server starts, never while it runs, and the one the stack requires
serves only once an embedder is configured." The provider is saved after
the first restart because the `ai.embedder_*` keys are contributed by
the knowledge service itself (the note's "Alternatives not taken"), so
the card's literal "and save an embedder provider" beside the token
would name a step that cannot be done before the restart. The duplicate
door's sentence is unchanged (the note: "What it answers where no
knowledge service is registered … is unchanged").
- **ADR-0087**:
`packages/spec/src/migrations/entries/semantic/19.knowledge-source-save-refused-while-knowledge-service-not-enabled.ts`
(notice only, no D2 conversion: the fix is the deployment's
configuration). The changeset carries `registered` with that id.
- **Docs**: `content/docs/ai/knowledge-rag.mdx` (a "saved only while the
service is enabled" bullet, and the no-service fix gains the embedder
step); `content/docs/protocol/knowledge.mdx` (a "A service that is not
enabled saves no source either" paragraph after the no-service one,
which gains the embedder step).

## Tests

-
`packages/services/service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts`,
new describe inside PR 1's runtime-composed describe, booted on
`LiteKernel` (6 cases): no embedder (503, the ruled words, no store
half; system admitted; zero store calls); the duplicate door not refused
for the held state; a provider saved without its key (cause plus ruled
words); store not mounted (store half only, no embedder words); both
halves; controls (enabled through a host embedder, and a host-mounted
plugin: never refused for a held state).
- `packages/runtime/src/domains/packages-knowledge-source-gate.test.ts`,
new describe on a real `ObjectKernel` running `KnowledgeServicePlugin({
runtimeComposed })` with no embedder (5 cases): the boot reads it held;
`PUT /meta/knowledge_source/faq` refused 503 with the remedy,
`saveMetaItem` never called; `POST /packages/pkg-a/move-in` of the loose
source refused with the save's remedy, `moveIntoPackage` never called,
the engine's move goes on; `POST /packages/pkg-a/duplicate` copies;
control: host-mounted plugin, the same save and move-in go on.
- `packages/runtime/src/domains/meta-save-capability-gate.test.ts`: the
dispatcher PUT on a kernel registering a real `KnowledgeService` settled
held on the store half (store sentence, no embedder words, nothing
saved).
- `packages/runtime/src/domains/mcp-authoring.test.ts`:
`save_metadata_draft` with a real `KnowledgeService` settled held on the
embedder half (503, the ruled words, nothing written).
- `packages/rest/src/meta-write-door-capability-enumeration.test.ts`:
REST answers the service's held 503 verdict as sent (this package does
not depend on `@objectstack/service-knowledge`; the sentence itself is
pinned at the service and the runtime doors).
- `packages/metadata-core/src/knowledge-source-save-admission.test.ts`:
the save door's no-service sentence orders "restart the server, save an
embedder provider and restart again, then save the source again"; the
duplicate's names no embedder.

## Acceptance notes

- **Pending window.** Between `kernel:ready` and `kernel:bootstrapped`
the reading is pending; a save that arrived then would not be refused
for the held state (it is judged by the other gates, and the source is
then held like any other). The save doors are served after the boot
completes, so this is noted, not built.
- **Wording deviation, named above**: the no-service refusal puts the
embedder step after the first restart, not beside the token, because the
setting cannot be saved before the service is mounted.

## Verification

**Code head `83d6c45081`** (the next commit, `1ec1c93f`, only copies the
claim's Clause-② line into the changeset). Shared container; every build
and test ran through `scripts/pm/os-verify-lock.sh`. Branch off
`origin/main` `696d02f5`; `main` has gained three commits since (objectstack-ai#38584,
objectstack-ai#38582, objectstack-ai#38574), none touching a package this diff touches, so it is not
merged in.

- **Dogfood battery at `83d6c45081`**: closure build (`--filter
'@objectstack/dogfood^...' --filter '@objectstack/cli...' --filter
'@objectstack/lint...' --filter '@objectstack/client-react...'`) VERDICT
command-exit 0; `pnpm --filter @objectstack/dogfood test` VERDICT
command-exit 0 · Test Files 495 passed, 3 skipped (498) · Tests 4187
passed, 68 skipped (4255) · 0 failed.
- `@objectstack/service-knowledge` `pnpm test`: Test Files 24 passed,
Tests 812 passed. `@objectstack/metadata-core` `pnpm test`: Test Files
29 passed, Tests 1118 passed.
- Runtime door files (`packages-knowledge-source-gate`,
`meta-save-capability-gate`, `mcp-authoring`): 3 files, 191 passed. REST
`meta-write-door-capability-enumeration`: 82 passed.
- `typecheck` exit 0 for `@objectstack/spec` (after `build`, which
regenerates the migration registry with the new entry),
`service-knowledge`, `metadata-core`, `runtime` and `rest`. ESLint over
every changed `.ts` file: exit 0.

<details><summary>Ablation</summary>

At `83d6c45081`: the held guard in `admitAuthoredSource` was edited to
`if (false && this.held && options?.door !== 'duplicate')`.
`knowledge-settings-contribution.test.ts`: 5 failed / 48 passed (the
five held-save cases; the controls stayed green). Restored with `git
restore --source=HEAD --staged --worktree`; `git status --porcelain`
empty.
</details>

<details><summary>Gates</summary>

`dispatch-gates --ran` at `83d6c45081`: 122 derived families accounted
for, 121 run with exit 0, 1 NOT MEASURED: `check:dual-build-cjs-loads`
exits 3 (prerequisite: dist of packages outside this closure); CI runs
it. `pnpm --filter @objectstack/cli exec vitest run
test/migrate-meta-engine-guidance.test.ts` and `check:skill-examples`
first exited on a missing `create-objectstack` / `client-react` dist,
and passed (exit 0) after the closure build. Among the run:
`check-adr-0087-registration` (1 declared-breaking changeset,
`registered
knowledge-source-save-refused-while-knowledge-service-not-enabled`, new
here), `check-changeset-no-major`, `check-empty-changeset`, spec
`check:upgrade-guide`, `check:spec-changes`, `check:api-surface`,
`check:docs`, `check:doc-authoring`, `check-affected-docs`,
`check:adr-anchors`, `check:error-status-conformance`,
`check:type-check-debt`, `check:nul-bytes`. PR body gated before
opening: `check-changeset-no-major`, `check-adr-0087-registration`,
`check-closing-keyword-parity`, `check-partof-closing-keyword` exit 0.
`overlap-check` before each push: VERDICT clean against `origin/main`.
</details>

CI check-runs: not yet read (PR just opened).

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
- [x] 2. Every name I added uses the casing for its kind.
- [x] 3. No formatter ran; `pnpm lint` passes.
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset.
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed.
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English.
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01QsR2jREKp1JAmqK54ADBYS

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

2 participants