Skip to content

lint object/missing-name-field 谓词不读 nameField,却仍采信 ADR-0079 已退役的 titleFormat——照平台自己的迁移建议做反而多得一条告警 #6108

Closed

Description

@yinlianghui

下游应用(hotcrm,@objectstack/* 17.0.0-rc.3)在 hotcrm#715 实施过程中发现,记录于此。同包内两条规则互相矛盾:

现象

object/missing-name-field 的谓词(node_modules/@objectstack/lint/dist/index.js,lintDataModel):

hasNameField = !!obj.primaryField || !!obj.titleFormat || fields.some(name-like)
  • 从不读 obj.nameField;
  • 却仍然采信 titleFormat——而同一个包里的 validate-record-title.ts 明确报告 titleFormat 已被 ADR-0079 退役,并指示迁移到 nameField。

净效果:一个照平台自己的迁移建议声明了 nameField 的应用,反而会得到一条新的 "records will display as raw IDs" suggestion。

下游实测面(hotcrm main)

6 处命中,4 处为误报——这四个对象都显式声明了 nameField:

对象 nameField
crm_campaign_member member_number
crm_event_attendee attendee_number
crm_contract contract_number
crm_forecast display_title

只有两个 line-item 对象(crm_opportunity_line_item / crm_quote_line_item)是真命中(确实没有 name 面)。

建议

谓词补上 !!obj.nameField,并考虑摘掉对已退役 titleFormat 的采信(或至少降为迁移期兼容并注明)。

查重:已在 objectstack 与 hotcrm 两仓按 missing-name-field / nameField / titleFormat / ADR-0079 检索 open issues,无既有单。

Refs: objectstack-ai/hotcrm#715(发现现场,PR objectstack-ai/hotcrm#1007)

Activity

  1. added
    domain:devxDomain lane — seat card indexed by label:pm:seat
    on Aug 7, 2026
  2. hotlong commented on Aug 7, 2026

    @hotlong
    Contributor

    Triage (maintainer-directed batch, 2026-08-07): routed domain:devx — the fix lands in packages/lint/src/data-model-rules.ts (hasNameField predicate: read nameField, drop the ADR-0079-retired titleFormat). Anchored by code read; triage seat may veto.


    Generated by Claude Code

  3. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Aug 7, 2026
  4. self-assigned this
    on Aug 7, 2026
  5. hotlong commented on Aug 7, 2026

    @hotlong
    Contributor

    认领(pm-dispatch devx 座位) — 本单进入派发(串行链:#6248 已于 13:2xZ 前合并,lint 面解锁)。


    Generated by Claude Code

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

Metadata

Metadata

Assignees

Labels

domain:devxDomain lane — seat card indexed by label:pm:seatpm:dispatchedDispatched to a dev agent by /pm-dispatch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions