docs(ai): knowledge-rag example declares adapterConfig, not the undeclared options key - #19261
Merged
os-try-charles merged 1 commit intoSep 20, 2026
Merged
Conversation
…lared options key
`content/docs/ai/knowledge-rag.mdx` configured its `ragflow` knowledge source with
`options: { datasetId }`. `KnowledgeSourceSchema` declares `adapterConfig` and is a plain
`z.object` with no `.passthrough()`, so the key is dropped before any adapter sees it.
Since #19251 (card #18973, ruling batch #160 item 2, letter A) `extractRagflowOptions`
reads `source.adapterConfig` with no fallback, so a source copied from this page is
refused by name at the first upsert / search / delete:
RAGFlow adapter requires source.adapterConfig.datasetId on source '<id>'
One line, one page. No spec change and no ADR-0087 conversion: `options` was never a key
`KnowledgeSourceSchema` accepted, so nothing an author could declare is removed.
Claude-Session: https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk
Co-authored-by: Claude <noreply@anthropic.com>
os-try-charles
marked this pull request as ready for review
September 20, 2026 08:01
os-try-charles
deleted the
claude/issue-19252-knowledge-rag-adapterconfig
branch
September 20, 2026 08:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #19252
content/docs/ai/knowledge-rag.mdx:37configured itsragflowknowledge source with the undeclaredoptionskey.KnowledgeSourceSchema(packages/spec/src/ai/knowledge-source.zod.ts) declaresadapterConfigand is a plainz.objectwith no.passthrough(), so the key is dropped before any adapter sees it. Since #19251 landed (card #18973; maintainer ruling batch #160 item 2, letter A: 「the spec wins」),extractRagflowOptionsreadssource.adapterConfigwith no fallback, so a source copied off this page is refused by name at the firstupsert/search/delete.One line, one page:
No
packages/specchange and no ADR-0087 conversion, exactly as the ruling states:optionswas never a keyKnowledgeSourceSchemaaccepted, so nothing an author could declare is removed.Is :37 the only carrier? — measured, not assumed
All readings taken on this branch at
6ec845878, overcontent/docs/:grep -rn "options: { datasetId" content/docs/(pre-fix tree)content/docs/references/ai/knowledge-source.mdx:83spellsadapterConfig⇒ the outlier is this page, not the docs treedatasetIdanywhere undercontent/docs/⇒ 1 hit (the same line) ⇒ the one-hit reading is a reading, not a dead searchgrep -rn -A3 "options:" content/docs/filtered todatasetIdcontent/docs/file namingKnowledgeServicePlugin/adapter: 'ragflow'/adapter: 'memory'/KnowledgeSource(10 files) read for a source literaloptionsoptions *:occurrence undercontent/docs/(41 lines) readField.selectoption lists, batchoptions.atomic, i18n option maps or a dashboard widget — none is a knowledge source⇒ this is a single-carrier card, and the single carrier is fixed here. The rest of
content/docs/**is clean on this defect.The corrected example parses, and the old spelling is shown dropping
A throwaway script (⛔ not committed; removed,
git diff HEADempty afterwards) lifted theproduct_docsliteral out of the page by content — not retyped — and parsed it against the builtKnowledgeSourceSchema:(one byte-level edit to the transcript above: the script's own placeholder brackets around the MISSING line are rendered here as square brackets, because this repo's rule is that angle-bracket-shaped fragments are spelled out in words before they go into a GitHub body — fences do not protect them.)
KnowledgeSourceSchemais a plainz.object, so the old spelling stillsafeParses green with zerounrecognized_keys;optionssimply is not in the post-parse keys andadapterConfigfalls back to its{}default. The loud part arrives one layer later, at the adapter's named refusal. That is precisely why a reader could copy this page and get no warning until the first call.Verification
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(no paths — derived from the real change set vs merge base7d0f911da) ⇒ 39 commands. All 39 run, all 39 green. Four first refused withPREREQUISITE NOT MET/ unbuilt-package (exit 3, exit 1 — ⛔ not findings):check:doc-formula-expressions,check:doc-security-posture,check:docs-transcript-drift(@objectstack/lint,@objectstack/formulaunbuilt) andcheck:skill-examples(@objectstack/client-reactdistheld no declarations). Those four packages were built, and all four gates re-run green.check:nul-bytesgreen; plus an out-of-gate self-scan for control bytes on the changed file — no match.pnpm --filter @objectstack/docs run postinstall(fumadocs-mdx, the docs collection compile) exit 0, working tree clean afterwards.6ec845878): ① the inspected population read from eslint's own config isfiles: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'](and['**/*.{ts,tsx,mts,cts}']) —.mdxappears in nofilesentry; ②eslint --no-inline-config --format json content/docs/ai/knowledge-rag.mdx⇒ 1 file entry, 0 errors, its one message beingFile ignored because no matching configuration was supplied.; ③ invariance for untouched files:eslint.config.mjsdeclares noparserOptions.projectand noprojectService, so type-aware linting is off and this diff cannot move any untouched file's verdict. ⇒ the diff's only file lies wholly outside eslint's population; the repo-widepnpm lintsweep is CI's run.Test Core,Build Docs) — CI's own shell in CI's environment, no local invocation exists — and the two workflow-valued families (check-shard-attestation,check-test-completeness).changeset
skip-changeset. The criterion is whether anything published moves, not whether a changeset exists. Measured:content/docs/**is consumed only byapps/docs(@objectstack/docs,"private": true, nofiles[]), and a scan of everypackage.jsonin the repo found zero packages whosefiles[]ships anything undercontent/. ⇒ no published artifact moves.Acceptance notes
os:checkmarker, socheck:skill-examples(258 marked blocks across 106 files; 216os:checkmarkers undercontent/docs/) never type-checked it, which is why the wrong key could sit in a published page uncaught. ⛔ Out of this card's surface and ⛔ not one of the three fileable classes (it is a coverage gap, not a reproducible defect — the block is correct as of this PR). Successor: the next card that extends the compile-checked prose corpus intocontent/docs/ai/..changeset/18973-ragflow-reads-declared-adapter-config.md:13also contains the stringoptions: { datasetId: … }. It is the before side of that changeset's migration example — correct as written, and ⛔ deliberately not touched.🤖 Generated with Claude Code
https://claude.ai/code/session_017ef78bLdybu3AffehKkhfk
Generated by Claude Code
Generated by Claude Code