Skip to content

37415 跟进:资料包校验对外部对象的注入字段给出「无存储」提醒,并合并测试文件 #37432

Backlog

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

Filing gate: ② follow-up out of #37415. The source is seat 5's contract review on PR #37426 (record 7182623911, S2) and the seat's REWORK 7182630712. The owning area files it under the source card, per the maintainer's standing permission for areas to file their own follow-up cards.
Grading: area:ai · Task · p3 · reach: authors whose ai_context pack is rooted on, or lists, an ADR-0015 external object and names an injected column · evidence: read.

维护者速读

  • 做什么:外部数据源的对象,平台会在定义里加上负责人、创建时间等字段,但外部库里其实没有这些列。资料包写了这类字段时,校验应当提醒「这一列外部没有存储,读取时会落空」,和其他规则已有的提醒一致。
  • 谁受益:给外部对象写资料包的作者。
  • 不做会怎样:校验通过,但 AI 实际读不到这些字段,作者不知道原因。
  • 需要你做的:无。

What

  1. After PR fix(lint): a context pack may name a system column the platform injects #37426, validateAiContext (packages/lint/src/validate-ai-context.ts) judges a pack's names against the object with injected system columns merged, so an external object's injected owner_id / created_at / … pass. Those columns have no storage behind an external object, and the read degrades at query time. Wire the provenance check other rules already use (unprovisionedInjectedColumnsFor, as in authored-site-expression.ts) into every place the rule reads a field map. Use its own rule id (for example ai-context-field-unprovisioned, a warning), plus an os explain entry in rule-explanations.ts.
  2. Also update the os explain text of ai-context-field-unknown in rule-explanations.ts. It still says "a name the object does not define", and should say that injected columns count.
  3. Carried from the same review: once 37203 跟进:get_record_context 无权的关联子对象改为省略、真实通道交出可查询字段,并补筛选排序的双通道比对 #37361 (PR fix(service-record-context): get_record_context leaves out an unserved related child; both MCP doors supply queryableFieldsOf and their page cap #37412) has landed, fold packages/services/service-record-context/src/__tests__/injected-system-columns.test.ts (added by PR fix(lint): a context pack may name a system column the platform injects #37426) into record-context-tools.test.ts as a top-level describe. That follows AGENTS.md's one-harness rule. The new file existed only because 37203 跟进:get_record_context 无权的关联子对象改为省略、真实通道交出可查询字段,并补筛选排序的双通道比对 #37361 held the shared file.

Acceptance

  • A pack naming an injected column on an external object gets the new warning, and the same pack on a non-external object gets none. Both are pinned.
  • The new rule id has an os explain entry, and the ai-context-field-unknown explanation matches the rule.
  • The injected-column executor pins live in the shared harness file, and the separate file is gone.
  • Clause-②: no, Metadata-protocol: none.

Blocked by: PR #37426 and PR #37412 on main.
Parent: #37415
Size: S
Dedupe (objectstack, is:issue): ai-context-field-unprovisioned 0 · validate-ai-context external unprovisioned 0.

Activity

  1. added
    pm:blocked
    area:ai
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Scope note from seat 5's delta review on PR #37426 (record 7182700579, N2): while folding the injected-column pins into the shared harness, add one executor pin for a related list rooted on a sys_* object whose child carries injected sys_user references (owner_id / created_by / updated_by). That pins the link resolution the lint rule now mirrors (resolveRelatedLink over the published definition).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:aipm:blockedpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions