Skip to content

37177 跟进:资料包校验对平台注入字段(owner_id)误报 ai-context-field-unknown #37415

In progress

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

Filing gate: ② follow-up out of #37177. The source is the os-dev report on PR #37409 (comment 7181165779), acceptance note "Possible defect, not fixed here". 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 · Bug · p3 · reach: authors whose ai_context pack names a platform-injected column (owner_id and the other injected system columns) · evidence: measured (the warning) + read (the cause).

维护者速读

  • 做什么:资料包里写了平台自动加的字段(比如负责人 owner_id),校验却警告「字段不存在」。查清运行时是否真的带出这个字段,再让校验和运行时说同一句话。
  • 谁受益:写资料包的作者,不会被误报干扰。
  • 不做会怎样:作者看到误报,可能删掉其实有用的字段。
  • 需要你做的:无。

What

Measured on the #37409 scratch stack: os validate warns ai-context-field-unknown for owner_id in a pack's fields on an object that does not declare owner_id itself. Read: packages/lint/src/validate-ai-context.ts fieldMapOf builds the map from the object's declared fields only; it does not apply applyInjectedSystemColumns (packages/metadata-core/src/injected-system-columns.ts), which other lint paths use (see authored-site-expression.test.ts, the applyInjectedSystemColumns(FLOW_EXT) case).

  1. Measure first: does get_record_context carry an injected column named in fields (or a related entry's fields / where / orderBy) at run time?
  2. If yes, judge the pack's names against the object with injected columns applied, in every place the rule reads a field map. If no, keep the warning and say in its message that the column is not served to the pack.

Acceptance

  • A test pins the lint verdict for owner_id on an object that does not declare it, and that verdict matches the measured runtime answer.
  • Clause-②: no, Metadata-protocol: none.

Parent: #37177
Size: S
Dedupe (objectstack, is:issue): ai-context-field-unknown owner_id 0 · validate-ai-context injected 0.

Activity

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim: PM loop round 5 · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」; concurrency per area 3, 2026-11-25T23:33Z) · 2026-11-26T03:00Z
    Session: session_01Utp6CbeF2saT6wUBV4E9uc
    Account: os-bill
    Area: ai-36996
    Branch: claude/issue-37415-ai-context-injected-columns
    Worktree: objectstack-issue-37415
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/lint/src/validate-ai-context.ts and packages/lint/src/validate-ai-context.test.ts; a measuring test under packages/services/service-record-context/src/__tests__/ (a new file only, read-only use of the service); root .changeset/. Stop on breach and report.
    Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: packages/lint (validate-ai-context fieldMapOf reads declared fields only) produces the warning | no platform path covers it | authors whose pack names an injected system column, at save and os validate
    Premise: holds — on origin/main ecbe854bd: fieldMapOf builds the map from object.fields only; @objectstack/lint already depends on @objectstack/metadata-core (applyInjectedSystemColumns).
    Serial constraints cleared: sibling #37361 (in flight) owns record-context-tools.ts, door.ts, sentences.ts and the existing service tests; this card adds a new test file only and never edits them. #37364 (PR #37396) owns body-outline.ts and the spec citation files; not touched.
    Pre-claim deps: none
    Prior rulings read: none on this rule; source PR #37409 report 7181165779 and contract review 7181290305 ③.

  3. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Scope note, from PR #37412 (#37361) and seat 5's L2 record 7181694279: the same defect shows on a related entry's orderBy with the registry-injected created_at. Measured on PR #37412's real-kernel harness: the executor and both MCP doors read the list ordered by created_at on an object that does not declare it, while validateAiContext warns ai-context-field-unknown and says the list is left out of every answer. So for created_at in orderBy the runtime answer is "carried", and the lint must agree. The in-flight dev already has this; it rides the same PR.

  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:ai · Bug · priority:p3 · pm:dispatched · size S; rationale: pack validation reports ai-context-field-unknown for platform-injected columns such as owner_id. It is a false warning to authors with nothing refused, so p3.

    Confirmed as filed. Seat 5 holds it.

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

Metadata

Metadata

Assignees

Labels

area:aipm:dispatchedpriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions