Repository navigation
Description
repo:cloud#1 · os-warren · session_01JQwxbW5anP6GDaVi5LKi2U
Filing gate: ③ maintainer-directed (topic child). Source: topic #37000; maintainer 2026-11-25 「现在拆阶段三」 (decision card in the project thread) and 「#4 只负责在手任务,你接手专题剩余任务」. Reviewed by an independent Fable pass before filing.
Grading: area:build · Feature · p2 (topic) · reach: every package that ships a knowledge_source, and every source saved at runtime · evidence: read.
维护者速读
- 问题:知识源写错了对象名或字段名,或者指向一个不允许检索的对象(系统对象、API 不开放检索的对象),现在要等到检索时才发现「怎么搜不到」。
- 做什么:
os validate和发布时就检查并报出来,报错写明是哪个对象、哪个字段、为什么不行。 - 谁受益:写应用包的作者和用 AI 搭建的作者,错误在发布前就看到。
- 需要你做的:无。
What
Carries ADR-0161 (docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md) Execution row "rows 4, 5, 5b": K4's reference checks ("refused when the object or a named field does not exist (the lint and os validate checks are row 4)") and "A packaged item meets the gates that need no principal in os validate and at publish (row 4)". The precedent is validateAiContext (packages/lint/src/validate-ai-context.ts, PR #37173) and its at-publish wiring (PR #37247, #37176).
- A rule file
packages/lint/src/validate-knowledge-source.ts, registered inpackages/lint/src/authoring-rules.tsbesidevalidateAiContext(:1984) and exported frompackages/lint/src/index.ts, each rule with anos explainentry inpackages/lint/src/rule-explanations.ts(theai_contextentries start at :6008). Reference checks, against the stack'sobjects:source.objectnames no object;- a
source.contentorsource.metadataFieldsmember names no field of that object; - a member names a credential-class or
internalfield, which the index never carries (K5: skipped even when named) — the author hears that it will be skipped (an addition past the Execution row, under ADR-0078).
- The gates that need no principal (K4, the gates of PR fix(service-knowledge): knowledge search asks the object's API exposure and the caller's field-level read rules per source #36850 as
packages/services/service-knowledge/src/knowledge-source-admission.tsstates them):- the object's API exposure refuses
search(canServeApiOperation(enable, 'search'),packages/spec/src/data); - a system object without
enable.aiReadable(isAiReadExposed,packages/spec/src/data/ai-read-exposure.ts).
Reuse those predicates; do not restate them. The disabled-package gate and the field-queryable gate need an environment or a principal and stay at save (row 3a).
- the object's API exposure refuses
- At publish. Map
knowledge_sourceto its collection inpackages/lint/src/runtime-gate.ts(theai_contextrow is :312, and its comment states the rule: no mapping ahead of its rule), so the runtime publish door reports the same rule ids and messagesos validateprints. Follow the refuse-or-warn verdict theai_contextrow took and state it. - Severity. A missing object or field, and both gates, are errors: such a source can never serve a hit. The credential/
internalmember is a warning. State each in the PR.
Rulings carried (ADR-0161 K10): embedding is egress, so the check reads the explicit content list (no wildcard exists after row 3a); no key is added.
Acceptance
os validateon a package whose source names a missing object, a missing content field, a missing metadata field, an object withapiEnabled: false, an object whoseapiMethodsomitsearch, or asys_*object withoutenable.aiReadableprints one finding each, with the rule id and the object or field named; a clean source prints none.- A credential-class field in
contentprints the warning. - The same source published at runtime reports the same rule ids and messages.
os explainanswers each rule id.- The authoring-rule wiring test and the lint suite are green.
- Container run per AGENTS.md.
Out of scope
- The type, its loader, the named permission and source admission at save as the authoring principal (disabled package, field-queryable): row 3a.
- The Studio form that shows these reports: row 5. Teaching the rules in
skills/objectstack-ai: row 5b. - Whether a source that names a field withheld by the field-egress declaration is refused at authoring: the field-egress topic (ADR-0161 K5).
Blocked-by: #37304 (row 3a).
Parent: #37000. Reader: domain:spec lane (packages/lint).
Dedupe: knowledge source lint 361 (open hits are unrelated lint and seat cards; none checks a knowledge source) · "knowledge" "os validate" 82 (open: #37000, unrelated) · knowledge os validate object unknown 102 (open: none on knowledge).
Activity
objectstack-fleet commentedon Nov 25, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
First touch 2026-11-25T14:33Z. Confirmed as filed: Feature · area:build · domain:spec · p2,
pm:blockedon #37304 (row 4). It is a row of topic #37000, so it routes to repo:objectstack#1 (maintainer 13:49Z 「继续专题 开发 37000」). The body'sBlocked-by:line already reads in line form.