Repository navigation
autonumber 业务标识字段默认不唯一,可铸重号 —— 裁定:默认唯一(租户复合形状),显式退出才不唯一 #13894
Description
Activity
- added a commit that references this issue
on Sep 3, 2026 zhuangjianguo commented
on Sep 3, 2026 CollaboratorMore actionsLanding reconciled —
domain:specseat,session_0174WZTU6XcFcS7g2kykC53i(seat post #6017), 2026-09-03T15:48Z.PR #14904 MERGED 2026-09-03T14:48:27Z as
f8e8f035— contract review PASS at tier by the director seat (14904#issuecomment-5527202464, a take-over of the stalled in-seat review after the dispatching session went off shift), ready + auto-merge by the same seat. Probed onorigin/main9786d39(15:38Z):packages/spec/src/data/field.zod.ts:2047readspatch.unique = field.type === 'autonumber' ? 'organization' : false;and theuniquedescribe at:960carries the autonumber-default sentence with the explicitunique: falseopt-out. Card closed viaFixes;pm:dispatchedwas stripped at 15:20Z (label set read back =domain:spec).The dev report's two open questions (5523180672) are answered inside that PASS: the ADR-0120 D4 posture is kept (an accepted maintainer decision, not reopened — a loud, remedied degrade satisfies constraint 2); hotcrm's ten autonumber fields are parsed declarations, so the default reaches them once a published
@objectstack/speccarries it — the cross-repo unlock for hotcrm#1301 is an installable release plus a hotcrm bump, not this merge. Filed by the dev, unassigned, for triage: #14901 (sub-issue of this card — the hand-written field-types row) and #14902 (engine lane — a plain unique index over existing duplicates throws the raw driver error at boot). The dispatching session's cloud devsession_017xqRv7A8HiJdKxsVm1UCuMis scoped to that session's account and cannot be archived from this seat — recorded here, not carried as a successor debt.
Generated by Claude Code
- added a commit that references this issue
on Sep 4, 2026 - added 3 commits that reference this issue
on Sep 9, 2026 - added a commit that references this issue
on Oct 7, 2026
按维护者裁定上行立卡(2026-08-31,hotcrm#1301 决裁批 #19-hotcrm ②,批复「其他同意」采纳呈报「定性业务标识符 + 平台路线」)。
平台级 declared ≠ enforced(实测)
unique而实际从未声明);crm_case.case_number显式声明了unique: true并获得租户复合唯一索引(COALESCE(organization_id,'__global__'), case_number),其余八个可铸重号;ACC-000009被发出两次,受害字段正在那八个之列;相关计数器分裂另见 Seed loader writes untenanted rows while the REST path stamps an organization — one single-tenant install runs two autonumber scopes and mints duplicate business identifiers, silently (17.0.0 GA) #8686 / The #8686 boot warning asserts an active duplicate-minting hazard for the benign zero-organization first boot, and its object list is a mid-seed race snapshot — it has now generated three consumer cards #12395;裁定方向
autonumber 字段默认
unique,租户复合形状照case_number既有样板;显式声明退出才不唯一。设计约束(实现 + 复审判断)
__global__row is deleted unconditionally, and an already-allocated business identifier is re-issued #12394(烧号重发)/Seed loader writes untenanted rows while the REST path stamps an organization — one single-tenant install runs two autonumber scopes and mints duplicate business identifiers, silently (17.0.0 GA) #8686(计数器分裂)的修复交互写进 PR —— 默认唯一会把那两类缺陷从「静默重号」变「响亮拒绝」,这是意图的一部分;packages/spec/src/**预期命中 + 内容肢:已发布 autonumber 契约行为变化),契约复审档位,changeset 标行为变化;Refs: hotcrm#1301(九字段测量)· hotcrm#1292(被措辞误导的前卡)· #12394 · #12395 · #8686 · #13848。