Skip to content

feat(examples): the Starter and blank template help articles as a knowledge source, served only where retrieval is enabled - #39617

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

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/project-thread-fy1tqa

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread
Fixes #38374
Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:基础模板和空白模板里的帮助文章多了一个知识源;配了嵌入参数并重启的私有部署可以按语义检索已发布文章,没配时安静地不生效、不列出检索工具,复制应用包照常成功。
  • 为什么做:替自托管用户把模板自带的帮助文章接上知识检索;接替另一个席位搁置的草稿(它当时被两处平台缺陷挡住,现已修好)。
  • 出错会怎样:只影响新建项目和基础模板里的这一个知识源,可直接撤回。
  • 要你做的:无。

Supersedes draft PR #39340 (seat os-bill, head ca114a3): its three commits are cherry-picked onto current main unchanged, plus one new test case.

What changes

  • examples/app-starter/src/knowledge/articles.knowledge-source.ts (new) and its blank-template mirror: biz_articles / blank_articles over the article object. source.content: ['body'] (not title), no adapter, source.where: { status: 'published' }, source.metadataFields: ['category'], source.split: { strategy: 'markdown' } (service-knowledge: a markdown section that fits maxChars is still cut into several passages #38351 was ruled A and landed in PR feat(service-knowledge): under the markdown split, a section that fits is one passage #38439, so the plain markdown split, no maxChars/minChars pair).
  • Both configs list it in knowledgeSources; neither adds requires: ['knowledge'].
  • The parity test holds the two sources equal (modulo the namespace), with a one-value control, and checks both configs list it.
  • The template's starter.test.ts: a no-embedder case (no WARN/ERROR line mentioning knowledge during the boot; MCP lists record tools but no search_knowledge) and an embedder case (a small word-hash embedder through extraPlugins; every published ## section is found under [article title, section title]; the draft's sections never answer).
  • The Starter's boot.test.ts, two new boots: a host that asks for knowledge with no embedder (the installed copy duplicates, its source copied and held, no tool listed), and, new in this PR, a host with no knowledge service at all (no requires): the duplicate answers 200 with success: true, failed: [], and the source among copied, per ruling A (7380897321).
  • Both READMEs: how to enable search on a self-hosted deployment (save the embedder provider under Settings, AI, Embedder; restart) and that the article bodies are then sent to that provider.
  • One changeset (create-objectstack, patch), kept from feat(examples): the Starter help articles as a knowledge source, in the blank template too #39340 and re-read against the final diff.

Tests

Local runs at 30cab79

Acceptance notes

Verification

  • objectstack validate on the Starter and on a copy of the blank template: "Validation passed", exit 0 each.
  • node scripts/ci/publish-starter-marketplace.mjs --dry-run after building the Starter: exit 0, bundle knowledgeSources 1.
  • Derived local gates (dispatch-gates --commands at 30cab79): 68 derived, 64 exit 0, 4 NOT MEASURED: check:dual-build-cjs-loads and check:i18n-coverage (exit 3, dist outside the Starter closure), check:query-options-erasure and check:type-check-debt (stopped by a 280 s local timeout). CI runs all four. --ran reconciliation: 0 UNRUN.
  • Scaffold E2E is CI's home for the template's starter.test.ts.

Read first: examples/app-starter/test/boot.test.ts (the last describe, new here), packages/create-objectstack/src/templates/blank/starter.test.ts (the two knowledge cases), packages/create-objectstack/src/blank-template-starter-parity.test.ts.

Two-minute check: pnpm --filter @objectstack/example-starter test. Expected: 21 passed, including "duplicating the installed starter succeeds, the source copied unserved and no seed refused".

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibxcR6c7HbmBNjEvJHy

… the blank template too

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CY1DVmttnuNH77G3ht
…dder, and found by search with one

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CY1DVmttnuNH77G3ht
…nowledge service copies the source unserved

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxcR6c7HbmBNjEvJHy
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. ⚠️ 2 changed file(s) yielded no anchor (packages/create-objectstack/src/templates/blank/README.md, packages/create-objectstack/src/templates/blank/objectstack.config.ts), 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
  • 2 changed file(s) yielded no anchor (packages/create-objectstack/src/templates/blank/README.md, packages/create-objectstack/src/templates/blank/objectstack.config.ts) — pages documenting those are invisible to this run
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • 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 — 1 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 1589bd854bee9cb801c1119608c3bbce257aa571 → packageMentionDocs.

Which tree this was computed on

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

node scripts/docs-audit/affected-docs.mjs --json 1589bd854bee9cb801c1119608c3bbce257aa571

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

…hat it declares a source

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxcR6c7HbmBNjEvJHy
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibvPFnj3TkGq8ps2Jgv

L1-a · ACCEPT · #39617 @ 8e4654c404 · Area: ot-p1 · read 2026-12-04T11:04Z

Not governed, not Tier H. The zone lands it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxRrrjrsQAWAcsbV46

Landing · 2026-12-04T11:04Z · zone ot-p1 · head 8e4654c404 · L1-a ACCEPT 7409605537; no L2 owed (Clause-②: no, Metadata-protocol: none, no spec or governed path).

Probe Reading
check-governed-merges.mjs --pr 39617 NOT governed; 491 changed lines (+477 / −14) ≤ 3000
landing-k.mjs --pr 39617 OK — K = 5 < 15, no new locale pack under a label PR, no shared book moved under this PR's

State: ready + auto-merge through the merge queue under the maintainer's standing landing line on seat post #39520 (「复审通过的 PR 座位自己落地」). On MERGED, Fixes #38374 closes the card.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review December 4, 2026 11:05
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge December 4, 2026 11:05
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit 27bfd02 Dec 4, 2026
61 of 62 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-fy1tqa branch December 4, 2026 11:58
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

Development

Successfully merging this pull request may close these issues.

examples/app-starter and the blank template: a knowledge source over the help articles, served only where knowledge retrieval is enabled

2 participants