Skip to content

picklist metadata kind — runtime: resolve picklist → options when serving field metadata, validate writes against the resolved set, apply package-level extensions (phase 1 of objectstack#18164) #19519

Description

@os-project-manager

Blocked-by: #19518
Path: 本地跑起来、看到 — records-forms.picklist-shared-across-objects, records-forms.picklist-org-append (authored by PR #20938, c1602ba429) | P2

Sub-issue of objectstack#18164 (shared picklist / global value set), filed by the director seat, summon #25 (session_012GcsUbuqFGBibkEDMRC1eE) under ruling batch #209 item 1 · letter A · maintainer 「18164 同意」 (2026-09-21, chat). ⛔ Not a claim. Position in the road: step ②「本地跑起来、看到」, records/studio; it is taken after the open product P0/P1 checklist items by the road order — ⛔ not dispatched before them. The design of record is the batch #147 item 2 ruling on the parent (comment 5715762696), reproduced here only where this layer needs it.

Scope (the runtime layer — metadata loading and the engine, domain:engine: packages/metadata*, packages/objectql, packages/platform-objects)

  1. Load *.picklist.ts before objects; register the kind in the metadata registry; picklistExtensions from any package merge additively into the named picklist (duplicate value = refused loudly, ⛔ not last-wins).
  2. Resolve at serve time: a select field with picklist: name is served with the resolved options (merged base + extensions, translated per the request locale through the translation face the spec sub-issue declares); an unknown picklist name is a loud load-time error naming the field and the package, ⛔ never an empty option list.
  3. Write validation uses the resolved set at the write door (the same door that validates inline options today); the refusal names the picklist.
  4. hotcrm acceptance: the reference app migrates its shared lists (src/objects/_picklists.ts, 17 consumers across three packages) — filed as a hotcrm card by the epic PM when this lands; ⛔ not in this PR.
  5. Phase 2 (⛔ not here): per-organization overlay in sys_metadata with allowOrgOverride: true and an overlay schema that accepts new values only; Studio surfaces (the objectui sub-issue).

Acceptance

One dogfood case (ADR-0136 D2.4): one picklist, two objects, a package extension adds a value, object A writes it, a value outside the set is refused on object B, a locale switch relabels. Engine tests pin: load order, merge, unknown-name refusal, write refusal, served shape. check:engine-* families green.

Dedupe words: picklist, resolved options, picklistExtensions, sys_metadata overlay, _picklists.ts.


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchdomain:enginepriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions