Skip to content

[Decision] Shared master data across the managed suites (hotcrm, hotsrm, production): conventions now, a thin registry app later, or one shared party model #35328

Done
2 of 2 issues completed

Description

@os-warren

Ruled: 7000155587 · letter A · 2026-11-19T04:54Z

维护者速读

  • 问题: 一家客户同时装 CRM、SRM 和以后的生产套件时,同一家公司、同一个物料会各存一份,互相不认,无法跨套件问数和串流程。今天还没有客户同时装两个套件。
  • 选项: A 只约定匹配键,按编码对齐,客户无感,约 3 个 PR。B 加一个只读的薄登记应用,各套件挂关联,但要先补平台能力,约 12–20 个 PR。C 合并成统一的往来单位主数据,要迁移已冻结的对象,以月计。
  • 推荐 A,并写明转 B 的触发条件。 理由:现在没有客户会撞上,而 B 依赖的跨应用关联今天在构建时就会被拒。
  • 不裁的后果: 生产套件开工时会自建第三份物料和工厂,匹配键各写各的,以后只能人工对账。

你要做的: 回一个字母,比如「A」。另需同时确认:生产套件复用 hotsrm 的物料和工厂,还是自建并按键对齐(这一条要在 hotsrm v0.7 冻结前定)。

Filing gate ②: a decision only the maintainer can make. Source: maintainer — 「立一个平台决策卡」 and 「你用fable帮我综合分析一下」 (2026-11-19, project thread Plan marketplace apps from open-source references). Filed by thread session session_01JQwxbZH5uwQm82itbUnyZX. Analysis-tier: fable.
Grading: area:package · type: none (decision card) · p2 · reach: no customer runs two suites today · evidence: read (ADR text and lint source; no build/install run).

Business context

  • Managed suites live in separate repos: hotcrm (sell side, @objectstack 18.6.0), hotsrm (buy side, 18.3.0; core + industry packs + customer private layer; core API names frozen, 28-object freeze at v0.7), and a planned production-execution suite for the only EE customer today, who also wants supply chain. A second customer will use CRM.
  • Each repo owns its master data: crm_account / crm_product vs srm_supplier / srm_material / srm_plant. Across suites there are no shared keys today.
  • Beneficiary: any customer that installs two suites; first expected when the production suite meets hotsrm at the EE customer.

Governing text

  • ADR-0141 D1: a declared dependency opens the reference at the save door, but "the build still refuses a declared lookup into another artifact … Closing that gap at build is deferred by the ruling on validate/lint/build refuse a lookup or record_change trigger to an object provided by a package in manifest.dependencies — the publish gate already resolves that closure #25805" (docs/adr/0141-inter-app-dependency-declared-checked-before-install.md, D1).
  • packages/lint/src/validate-object-references.ts:60-70: a lookup resolves only in the stack's own objects or its artifact's packages[].
  • ADR-0146 D10: a vendor package may add fields to another package's object (objectExtensions); customer customization goes to the .custom package (__c fields); base fields allow display-only changes.
  • ADR-0005: no environment overlay of objects or fields.
  • Only type: app is customer-installable (packages/spec/src/kernel/plugin.zod.ts:110-118); install refuses a missing dependency with 422 DEPENDENCY_MISSING (packages/metadata-protocol/src/protocol-package-install.ts:377-388; cloud service-cloud/src/routes/package-install/install.ts).

Options

What Customer effect Effort
A (recommended) A key contract, no shared package: party key = country + credit code / registration no; item key = ERP material no; plant key = plant code. hotsrm already has these fields; hotcrm adds a country basis for registration_number and an ERP number on products. Cross-suite questions match by key. None visible; matching is as good as the keys (hotcrm keys are optional today). ~3 PRs: hotsrm contract doc + pinning test, hotcrm fields, production-suite first card cites the contract. No platform change.
B A thin read-only registry app (party, item), derived from suite objects by a find-or-create flow; each suite adds a lookup to it. Suite objects stay the editing surface. One extra required app per install; a single registry for cross-suite questions. 12–20 PRs: reopen #25805 (build-time cross-artifact lookup), new repo, align suite versions, sync flows, backfill. Fallback (compose the registry into each suite) likely collides on namespace when a second suite installs (packages/objectql/src/registry.ts:1130-1170, inferred, not run).
C One shared party model (customer and supplier are roles of one record, as Odoo res.partner / SAP Business Partner). Best consistency; every business field falls under the base-field customization limits. Months; breaks hotsrm's frozen core; the shared-platform-master-data alternative was rejected in ADR-0141 (#25403).

Four facets

os-decision-facets

Recommendation

A now, with B's trigger written down: the first customer that installs two suites whose master data does not come from one ERP, or the production suite deciding to own its master data instead of reading it from ERP.
Confidence gaps (any could flip it): no build/install was run for "two artifacts + dependency + lookup"; the fallback's namespace collision is inferred; no data on how often a customer is also a supplier; the production suite's object list has not been read (if it owns materials rather than reading ERP, lean B).
Self-check: looking at ① alone gives B; do ②③④ flip it — yes: no customer pull, B's lookup is refused at build today, and it adds a repo and sync flows.

After the ruling (for A)

  1. objectstack, 0 PRs: a capability probe — two minimal apps, dependency + cross-artifact lookup, build and install, plus the fallback's namespace collision; record results on validate/lint/build refuse a lookup or record_change trigger to an object provided by a package in manifest.dependencies — the publish gate already resolves that closure #25805 as B's cost sheet.
  2. hotsrm, 1 PR: the key contract doc and a test pinning it (fields already exist).
  3. hotcrm, 1 PR: country basis for registration_number, an ERP number on products; still not unique.
  4. Production suite: its first card cites the same key contract.
    Before hotsrm v0.7 freezes: whether the production suite reuses srm_material / srm_plant (composed into one artifact per hotsrm ADR-0002) or owns its own and aligns by key; whether the key field names freeze as the cross-suite contract; and that adding party / item lookups later counts as additive, so deferring B is not locked out by the freeze.

Dedupe: "[Decision]" shared master data across suites (85 hits), base_party OR "identity registry" OR "cross-suite" (159 hits), party OR "master data" suite hotsrm OR hotcrm (5108 hits, top 10 read) — no open card on this question; nearest closed: #25805, #32585, #31362.

Reader after ruling: the objectstack package lane for the probe; the hotsrm and hotcrm repo seats for their PRs.


Generated by Claude Code

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Activity

  1. added
    priority:p2
    needs-user-decision
    on Nov 19, 2026
  2. os-warren commented on Nov 19, 2026

    @os-warren
    CollaboratorAuthor

    Ruling: A — key contract only; each suite owns its own party/item records; no shared base package.

    Maintainer, 2026-11-19T04:54Z (in the planning thread): 「我觉得用户不同,管理的人不同,权限不同,各自独立数据好像没什么问题,而且客户大概率不会同时上多个模块,只是需要考虑多个套件之间是否考虑有数据关联或者同步的方案。」

    Reading: different users, owners and permissions per suite make independent data acceptable, and customers will rarely run several suites at once. What remains open is how suites link or sync when one does. That is a design question for a follow-up, not a reopening of this card.

    Post-ruling steps stand as written in the body. One addition is being discussed with the maintainer and is not filed yet: a cross-suite linkage/sync pattern. The candidate rests on two rules:

    No bidirectional sync is proposed.


    Generated by Claude Code

  3. removed
    needs-user-decision
    on Nov 19, 2026
  4. os-bill commented on Nov 19, 2026

    @os-bill
    Collaborator

    Ruling on the open follow-up: cross-suite linkage. All five recommendations accepted.

    Maintainer, 2026-11-19T05:46:53Z (project thread), answering the five-point recommendation: 「同意」. The analysis behind it ran on Fable and was read-only, at main 05e0eb8.

    This adds to ruling A above and does not reopen it.

    1. One owner system per entity.
      • Customer → hotcrm.
      • Supplier → hotsrm.
      • Material and plant → the customer's ERP when there is one, otherwise hotsrm.
      • A legal entity that is both customer and supplier keeps one record on each side. The two are recognised by the party key only and are never synced.
    2. No cross-suite sync is built now. The contract records the pattern instead: single owner, one-way, matched by contract keys, and a copy never pushes back. No bidirectional sync.
    3. The production suite reuses srm_material / srm_plant. It composes into one release artifact with hotsrm (ADR-0130), and its bills of material and work orders look those objects up directly. No platform change is needed.
    4. What freezes before hotsrm v0.7:
      • the key field names, their meaning and their normalisation (trim, upper-case);
      • uniqueness per organization: a composite unique index on country + credit code / registration no. for parties, and single-field unique on material no. and plant code. hotsrm keys are required; hotcrm keys stay optional but are unique when filled.
      • Uniqueness rests on unique / indexes, not on field.externalId, which nothing reads (packages/spec/src/data/field.zod.ts:2818).
      • Adding party / item lookups later counts as additive.
    5. Units (Units of measure on the platform: a standard unit list, quantity fields that carry their unit, and conversion #35339). Before the freeze, srm_material.uom stores a UN/ECE Rec 20 code instead of free text. When the platform unit list lands, it adds validation only and leaves stored values unchanged. A quantity that crosses suites carries its unit code. hotcrm order lines gain an optional unit code field. The field naming follows whatever Units of measure on the platform: a standard unit list, quantity fields that carry their unit, and conversion #35339 settles.

    Flips to watch. Item 3 falls back to "own objects aligned by key, with sync built first" if any of these turns out true:

    • the EE customer does not run hotsrm;
    • the EE customer wants the two suites in separate deployments;
    • the EE customer has no ERP.

    None of these has been checked yet.

    Readers.

    • hotsrm seat, before v0.7: the key contract doc, owner table and sync pattern; the unique indexes after checking existing data for duplicates; uom as a Rec 20 code; the optional package split.
    • hotcrm seat: the party key fields (optional, unique when filled) and an optional unit code on order lines.
    • Production suite: its first card starts from one artifact with hotsrm.

    These suite cards belong in their own repos, and this record is their source.

    Deferred until a customer needs them (not filed):

    • BatchRecord.externalId is declared but never read (packages/metadata-protocol/src/protocol-batch-data.ts:474). It needs enforce-or-remove under ADR-0049.
    • A same-environment bridge package. It first needs a probe of whether flow record nodes can write another app's objects.

    Full analysis: project file card-35328/linkage-analysis.md.


    Generated by Claude Code

  5. objectstack-fleet commented on Nov 19, 2026

    @objectstack-fleet
    Contributor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: a decision card for the maintainer (shared master data across the managed suites); rationale: area:package. needs-user-decision is added so nothing dispatches it before his letter.

  6. added
    needs-user-decision
    on Nov 19, 2026
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    Contributor

    repo:hotcrm#2 · sunhaolin · session_017xRBcV3h25dAMNWki8e1ns

    Ruling confirmed · 2026-11-25T09:02Z

    Maintainer, verbatim (hotcrm seat 2's session session_017xRBcV3h25dAMNWki8e1ns, 2026-11-25): 「5 确认」. It answers the seat's question 「确认 A 不变、结卡吗?」. That question followed a read-only Fable re-analysis (four axes, effort high, at objectstack main d62f9e9c).

    Ruled:

    • The 2026-11-19 ruling A (comment 7000155587) stands unchanged.
    • So do the five accepted follow-ups (7000955097).
    • The card closes. needs-user-decision was re-added by triage after the ruling (7001540570) and comes off in the same stroke.

    Asked and not answered. These are not ruled and are recorded here so they are not lost. Each needs its own card or the maintainer's word:

    1. Does the starter app's 「公司」 (专题:起步应用(公司、联系人、任务、备忘)与平台任务/备忘第一步 #36941) join the key convention?
    2. Does hotclm's clm_party join the same convention, with unified field names?
    3. Who carries A's execution, and when? The re-analysis found none of it landed six days on: no hotcrm or hotsrm commit cites this card.

    The re-analysis also proposed three measurable restart triggers for option B:

    They are recorded as a proposal, not a ruling.

  8. removed
    needs-user-decision
    on Nov 25, 2026
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:packagepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions