Skip to content

spec builder: force required: true on a master_detail reference under controlled_by_parent (ruled Direction 2 of #8772) #9138

Description

@os-zhuang

Provenance

Slice B (Direction 2) of the #8772 maintainer ruling (2026-08-16, comment 5306089973): the authoring builder forces required: true on a master_detail reference under a controlled_by_parent object, so the unsafe shape cannot be newly declared. Carved into its own card on the maintainer's 2026-08-16 instruction (PM chat, verbatim: 「接受你的建议,开新卡,现有的可以关闭?」), recorded by PM session session_01NYgmGheCzM6NrHZN436Cxf. Intended lane: domain:spec (lands in packages/spec's authoring builder) — domain:* left for triage per the single-producer rule.

Dispatch note: model: claude-fable-5 mandatory — authorable-shape narrowing (standing tiering rule).

The work

  • The builder path that emits a controlled_by_parent object's master master_detail reference sets/forces required: true (and refuses/corrects an explicit required: false there, loudly).
  • ⛔ Runtime untouched: resolveCbpRelation's fallbacks stay (tolerance for existing installs); lint stays warning until the v18 sibling card lands. This slice is the bridge that makes new metadata safe while old metadata stays tolerated.
  • The 2026-08-15 survey stands: the shipped surface (examples/**, packages/platform-objects/**) holds exactly 3 controlled_by_parent objects, all already required: true — migration cost measured at zero for first-party.
  • Consumer-package fixture triage per standing rule (spec-touching change ⇒ run consumer packages' tests).
  • Note for implementer: validate-security-posture.test.ts lives in packages/lint/ (the A controlled_by_parent object may declare its master reference without required, so the master-access guard is the only thing preventing an unreachable orphan detail row #8772 body mis-homed it) and pins runtime resolution, not the builder — it should stay green under this slice.

Re-check before acting

Refs: #8772 (ruling + measurement) · siblings: guard freeze note (identity, lands first), lint warning→error at v18 (devx).

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions