Repository navigation
Description
maintainer · os-bob · session_012dn2Abw1d1dVAyngaACxQF
Filing gate: ③ maintainer-directed (topic parent). Source: maintainer. Key words (maintainer, 2026-11-29, this session): 「去查主流相关平台的代码,从长远角度考虑提出最优方案。」「然后用 fable 评审」「立新的专题卡,用 fable 分拆任务,然后立刻交给5号座位优先派发」. The design was reviewed by an independent Fable pass, which rejected the first draft (physically merging child records into one parent document) and produced the version below; the child split is a second Fable pass.
Grading: area:ai · topic parent (no type) · p1 (the maintainer's 「优先派发」) · reach: every app that writes its own passages as child records of a parent (policy → clause, contract → article, manual → section, ticket → message) and indexes them on a hosted plan · evidence: read from the code (objectstack 63acc6c, cloud 0c0f05a, brightrule 07e21ac).
维护者速读
- 问题:应用自己切段的正式做法已经有了:把段写成子对象记录,知识源用
whole(一条记录一段),段级元数据、命中指向子记录、按子记录复查权限、按父记录groupBy今天都能用。唯一缺的是额度把「一条记录」当「一个文档」计。BrightRule 约 6 万条条款 = 6 万文档,超 Business 的 1 万文档上限;按制度算约 2 千份。 - 做什么:知识源声明「文档单位」
documentBy(指向父记录的字段,须在metadataFields里)。索引结构不变,仍一条记录一个文档;cloud 按父记录去重计文档数;granularity: 'record'且没给groupBy时默认按它聚合。 - 不做:把子记录物理合并成父文档(检索新鲜度校验、段 id、事件同步、全量重建游标都要重做,约 3–4 周加一次大版本,检索上没收益);平台进程内执行应用切分代码;JSON 段数组字段。
- 计价语义(本卡即裁定):对外的「文档」= 知识源声明的文档单位;段数照实计,仍是成本上限。
Why (read from the code)
- A document is one source record:
documentIdFor(source, recordId)(packages/services/service-knowledge/src/knowledge-service.ts), and cloud countsCOUNT(DISTINCT document_id)(cloudpackages/objectos-runtime/src/knowledge-passage-cap.ts:242). - Apps already deliver their own passages as child records: BrightRule's
brightrule_policy_clausewithsplit: { strategy: 'whole' }(src/knowledge/policy-clause.knowledge-source.ts). Per-passage metadata, the hit'ssourceRecordId, the per-record permission re-read andgroupBy(knowledge-service.ts:2593) all work today. - Mainstream platforms separate the billed unit from the indexed unit (Azure AI Search index projections: one parent file, many index documents) and accept app-cut passages through a passage contract (Dify's knowledge-index node, Elasticsearch
semantic_textwithchunking_settings.strategy: none, RAGFlow's add-chunk API, Bedrock's custom-transformation Lambda). In ObjectStack the child record is that contract; what is missing is the unit. - Design with the survey and the rejected option: project file
知识库切分设计/平台知识库自定义切分-长期方案.md(v2).
Children
| # | Repo | Card | Blocked-by |
|---|---|---|---|
| 1 | objectstack | #38537 — documentBy: spec key, validation, record-search default grouping (its reader) |
none |
| 2 | objectstack | #38538 — Studio form, docs and skill text for documentBy |
1 |
| 3 | cloud | objectstack-ai/cloud#5211 — Bump the framework pin to the release carrying documentBy |
#38537 + an objectstack release |
| 4 | cloud | objectstack-ai/cloud#5212 — The knowledge document cap counts documentBy parents, not records |
3 |
| 5 (row) | brightrule | policy_clause declares documentBy: 'policy'; drop the interim merged-markdown source. App repo, done by the BrightRule project, not a fleet card |
4 deployed + the 20k passage hold lifted (objectstack#38056 / cloud#5190) |
Rules every child keeps
- A key lands with its first reader in the same PR (ADR-0049): card 1's reader is the search default.
documentBychanges no index content: it stays out of the index fingerprint and the recipe hash, and adding it triggers no rebuild.- The index stays one record = one document (ADR-0161 K1 unchanged).
passagesPerDocumentstays per physical record. - Only sources that declare
documentBychange behaviour.
Done when
- A source declaring
documentBy: 'policy'with 60 records under 3 parents counts as 3 documents against the cloud cap; a source without it counts as today. search_knowledgewithgranularity: 'record'and nogroupByreturns one hit perdocumentByvalue for such a source; explicitgroupByis unchanged.- The pinned fingerprint hashes are unchanged.
- BrightRule ships
documentBy: 'policy', and its Business environment counts about 2k documents, not 60k.
Exception note (pm:epic on a server line): opened by the maintainer's words above; territory = packages/spec/src/ai/knowledge-source.zod.ts, packages/spec/src/ai/knowledge-source.metadata-form.ts, packages/services/service-knowledge/src/knowledge-service.ts (search grouping), packages/services/service-knowledge/src/knowledge-search-scope.ts (parent-link rule), packages/lint/src/validate-knowledge-source.ts, content/docs/**/knowledge*; cloud packages/objectos-runtime/src/knowledge-passage-cap.ts.
Reader: repo:objectstack#5 (the seat holding #37000 and #38346), on the maintainer's word 「立刻交给5号座位优先派发」; cards 3–4 (cloud) go to repo:objectstack#1 on the maintainer's word 「cloud任务让1号座位,1号可以处理 cloud」 (2026-11-29T09:22Z).
Related, not children: #38346 (knowledge splitting: this is quota and grouping, not splitting), #37000 (knowledge platform topic), objectstack#38056 and cloud#5190 (the 20k passage hold), cloud#5209 (Enterprise caps).
Dedupe (open and closed): objectstack documentBy 0 · objectstack knowledge document unit count 105 (none on the counted unit; nearest #38413, bulk-import sync) · cloud knowledge document cap 8 (#5197 closed, the caps themselves; #5209 open, Enterprise tier) · cloud documentBy 0.
Generated by Claude Code
Activity
source.documentBy); record search groups by it by default #38537documentBy#38538objectstack-fleet commentedon Nov 29, 2026
triage#1 · zhuangjianguo · session_01QsR2jRH2X4frz9bBiZHNk4
Triage: topic parent (
pm:epic, maintainer-opened) · area:ai · no type (a topic takes none) · p1 as the maintainer set it · never dispatched. Children #38537 and #38538 are attached; routed to repo:objectstack#5 as the body says.