Repository navigation
feat(examples): the Starter help articles as a knowledge source, in the blank template too - #39340
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
… 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
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CY1DVmttnuNH77G3ht
📓 Docs Drift Check3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them. What this run could not see
Coarse fallback — 1 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 a607e662f09b90662b1d0d197055931d4dec9033 && git checkout a607e662f09b90662b1d0d197055931d4dec9033
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ccc0838e804151f3923399b79fb58f93473aba23 ca114a34b9af6ec89a34b89b83ed6ce3c19e1779 && git checkout -B drift-repro ccc0838e804151f3923399b79fb58f93473aba23 && git merge --no-ff ca114a34b9af6ec89a34b89b83ed6ce3c19e1779
node scripts/docs-audit/affected-docs.mjs --json ccc0838e804151f3923399b79fb58f93473aba23 |
Fixes #38374
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
examples/app-starter/src/knowledge/articles.knowledge-source.ts(new) and its blank-template mirror:biz_articles/blank_articlesover the article object.source.content: ['body'](nottitle), noadapter,source.where: { status: 'published' },source.metadataFields: ['category'],source.split: { strategy: 'markdown' }(the markdown split on main keeps a section that fitsmaxCharsas one passage, so nomaxChars/minCharspair).knowledgeSources; neither addsrequires: ['knowledge'].starter.test.ts: a no-embedder case (noWARN/ERRORline mentioning knowledge during the boot; MCP lists record tools but nosearch_knowledge) and an embedder case (a small word-hash embedder throughextraPlugins;search_knowledgeis listed; every published##section is found under[article title, section title]; the draft's sections never answer).boot.test.ts: a second boot on a host that asks for knowledge and has no embedder. The installed copy duplicates with its knowledge source copied, and the service holds both sources with an empty tool list.create-objectstack, patch).Tests
Local runs at ca114a3
pnpm --filter @objectstack/example-starter test(lock VERDICT command-exit 0): Test Files 2 passed, Tests 17 passed.pnpm --filter @objectstack/example-starter typecheck: exit 0.pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/blank-template-starter-parity.test.ts: 15 passed.pnpm --filter create-objectstack typecheck: exit 0.starter.test.ts, run from a copy of the template against this checkout's packages: 5 passed, 1 failed. The failing case is the no-embedder log assertion, red on a platform defect named under Acceptance notes; the embedder case is green.tsc --noEmitin a scaffold of this branch installed from the registry: exit 0; control (one injected type error) exit 2.Acceptance notes
kernel:bootstrapped.resolveRecordSync(packages/services/service-knowledge/src/knowledge-service-record-sync.ts) skips only oncethis.heldis set, so the batch is handed to the turso adapter, which has no embedder yet, and the boot prints:WARN [knowledge] a batch of 4 record syncs of source 'blank-blank_articles' failed (knowledge-turso has no embedder ...). The template's no-embedder case pins the card's "no warn" acceptance and stays red until that is fixed in service-knowledge, which is outside this card's file surface. Reported to the dispatching seat for a card.503 SERVICE_UNAVAILABLEnamingbiz_articles. That is the duplicate door's existing contract for a deployment with no service. Before this PR the Starter carried no source, so its duplicate was not asked. Reported to the seat, not pinned here.copiedCount: 13, failedCount: 3. Each of its three seeds is refused on re-save with "Unrecognized key(s) on this seed:name". This does not involve the knowledge source. Reported to the seat.Verification
os validateon the Starter: "Validation passed", exit 0. On a copy of the blank template: "Validation passed", exit 0.node scripts/ci/publish-starter-marketplace.mjs --dry-runafter building the Starter: exit 0, bundleknowledgeSources 1.check-plugin-teardown-shape --self-teston a shallow clone,check:dual-build-cjs-loadsandcheck:i18n-coverageon dist outside the Starter closure). Those three run in CI.Read first:
packages/create-objectstack/src/templates/blank/starter.test.ts(the two new cases),examples/app-starter/test/boot.test.ts(the second describe),packages/create-objectstack/src/blank-template-starter-parity.test.ts(exportedConsts).Two-minute check:
pnpm --filter @objectstack/example-starter test. Expected result: 17 passed, including "duplicating the installed starter copies the source".Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CY1DVmttnuNH77G3ht