docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564) - #14976

Queued
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847
Queued

docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)#14976
hotlong wants to merge 25 commits into
mainfrom
claude/discussion-13564-a38847

Conversation

@hotlong

@hotlonghotlong commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds ADR-0131 (Proposed); amends ADR-0126 (regimes stand at environment scope; reserved org column withdrawn; not superseded), ADR-0005 (per-organization overlay axis retired), ADR-0017 (sys_view_definition inert, retired) and ADR-0105 D10 (withdrawn). Staging (D14): before 17.3 only the activation ledger's reserved column is dropped (#15024) and #14949's NULL screen reverted (#15030); everything else is the v18 line. Three sentences:

  1. Metadata is the registry, in two provenances. A managed package is code: edited in code only, changed by publishing a new version, never materialized as rows; its definitions are sealed while the customer's choices live beside them as environment-level state — ADR-0126's overlay (presentational types), disable + clone (behavioural types) and extend, so a standard package such as HotCRM stays customizable and upgradeable. Metadata authored at runtime — Studio, the cloud build agent, or a template package copied once into the database — is saved in the database and edited in the UI; it is the environment's, and its ledger carries no organization column. Template packages are refused on shared-DB multi-tenant deployments.
  2. A row with an organization column exists only when an organization authored it — assignments (this user holds this position or set), business units, sharing rules, business data — NOT NULL, referencing registry items by name. The catalog itself (positions, permission sets, capabilities) has one home, the environment registry: single-tenant admins author it there (the organization is the environment); shared-DB tenants assign but do not define. The four catalog tables retire (ADR-0094 completed).
  3. A table with no organization column is deployment-level or code-level, governed by permission, not by a wall.

Consequences: NULL has nothing left to mean (D1); one predicate for Layer 0 and every driver (D8); a missing stamp is a refused write (D9); seeders, per-organization catalog machinery, the four catalog tables and the #13491 ledger retire (D13); sys_metadata loses its column with no split because no per-organization metadata remains (D6); the position→permission-set binding becomes PositionSchema.permissionSets (D3/D4); #13636 / PR #14923 superseded (§1.6); no platform organization and no complete seal (§5, rejected alternatives).

Maintainer rulings, verbatim in the record's header — among them 「数据库中不应该有允许 org_id 为空的状况」「既然不让改,又要求每个租户 seed 一遍,好像很蠢」「我宁可先不让他编辑」「创业阶段,应该定一套最稳定可靠的方案」「代码推送过来的元数据就只能在代码中修改…studio 界面上配置的元数据…可以在界面上修改」「先完全封死。flow 也先不让改…模版形式直接进库…单库多租户禁止安装…受管软件包…不让改」.

What this PR is and is not

Open questions for the merge decision (§6)

Four of five were accepted as proposed on 2026-09-04 (「接受你的建议」) and folded into D5/D6/D7; the position→permission-set binding was ruled a definition (new key PositionSchema.permissionSets, sys_position_permission_set retires; §5 records the rejected org-level reading). One remains:

  1. Existing customized template rows: keep as Default Organization overrides, or accept loss under the startup posture? Ruled when C4 is cut.

Post-17.2 audit verdicts are recorded in §7; #15024 (activation ledger column fix) and #15030 (#14949 NULL-screen revert) are filed for landing before 17.3; PR #14923 closed unmerged; PR #15023 (supersede) closed — ADR-0126 is amended here instead.

Refs #13564 · #13636 · #10103 · #13491 · #2734 · #12699 · #11665 · #12150 · #14484 · #14547 · cloud#1239 · cloud#1664

🤖 Generated with Claude Code

…zation_id, a platform organization owns deployment-level rows, sharing is declared
Proposed record cut from the maintainer's 2026-09-03/04 ruling on #13564 (verbatim
「或者说我们数据库中,不应该有允许 org_id 为空的状况」/「认可这个方向,起草 ADR 和分阶段的卡」).
Docs-only; empty changeset. Governed surface — hand-merge only (Prime Directive #14).
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actionsgithub-actionsBot added size/l documentation Improvements or additions to documentation tooling labels Sep 3, 2026
hotlongand others added 3 commits September 4, 2026 00:23
…n owner, org-axis red lines stand
Answers the maintainer's 2026-09-04 question 「集团多组织架构考虑了吗」: fixes the owner ADR-0105
D10's reserved 'platform-global' template rows must take (never NULL — platform organization or
group root, declared), keeps D6's red lines, adds §6 Q6.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… template rows / layered master data)
Maintainer rulings 2026-09-04, verbatim: 「不考虑集团级模板行,作废相关需求」「不考虑 分层主数据」.
D12 no longer offers an owner choice; §6 Q6 removed; ADR-0105 status line, D10 paragraph and
Phase 2 list annotated withdrawn.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…hen an organization authored them, no platform organization
Rewritten on the maintainer's 2026-09-04 rulings (verbatim in the record): declared metadata is
never seeded; Studio/build-agent metadata is DB-resident and UI-editable with no organization
column; organization-level template editing stays closed (copy-on-write if ever opened);
references by name, registry-first; deployment-level state has no column; #13636 / PR #14923
superseded (§1.6); the platform organization of the first draft is recorded as a rejected
alternative.
Refs #13564#13636
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong changed the title docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id, a platform organization owns deployment-level rows, sharing is declared (Refs #13564)docs(adr): ADR-0131 — organization ownership is total: no NULL organization_id; declared metadata stays in code; rows only when an organization authored them (Refs #13564)Sep 3, 2026
hotlongand others added 6 commits September 4, 2026 01:07
…nto the two provenances; activation ledger has no reserved column
Maintainer 2026-09-04: 「代码中定义的元数据运行时不可修改,要修改就软件包重新发版本;不想用的可以停用;想改的可以复制
一个重新改」. Restates ADR-0126 O/C/E against code vs Studio provenance; amends ADR-0126 D3's
'org column reserved, written NULL' (a nullable column is the shape D1 forbids); adds §6 Q6 on a
disable switch for views/dashboards.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es are copied in and editable, refused on shared-DB multi-tenant; ADR-0005 overlay axis and ADR-0126 O/C regimes paused
Maintainer 2026-09-04, verbatim: 「你这么说还不如先完全封死。flow 也先不让改。然后软件包应该有两种安装方式,有一种是
模版形式直接进库,那就是所有都可以修改。但是单库多租户禁止安装这种模版软件包;有一种是受管软件包,什么都以软件包中
的为准,就是不让改。」 sys_metadata needs no split (no per-organization metadata remains); C12 template
install mode added; ADR-0126 and ADR-0005 carry amendment notes.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…achinery is removed before the next release, not sealed
Maintainer 2026-09-04: 「ADR-0126 已经开发完了吗?还没发版本呢」. Measured: #12158/#12296, #12156, #12419
landed on main from 2026-08-26; last release 17.2.0 tagged 2026-08-23 (npm serves 17.2.0). No
compatibility obligation ⇒ remove (ADR-0049), §6 Q7 resolved, epic #12150 superseded.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…gistry); assignments are organization rows; the four catalog objects retire
Maintainer 2026-09-04: 「角色、岗位、权限集,Setup 里组织自建的是组织级。这个说的是单库单租户吧,单库多租户我可以禁止
他们创建。但是你要支持我绑定到人员。」 Single-tenant Setup creation = environment metadata write
(ADR-0094 D3 redirect); shared-DB tenants assign but do not define; sys_user_position /
sys_user_permission_set reference by name; sys_position, sys_permission_set,
sys_position_permission_set, sys_capability retire (ADR-0094 completed). One source at selection.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…d source, no cross-source uniqueness
Follows D3 (one catalog home). Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…vert, everything else on the v18 line
Maintainer 2026-09-04: 「ADR-0126 可以先作废,我发 17.3,然后后续这么大的改动应该放到 v18吧?」 D14 rewritten;
§1.7 keeps ADR-0126's survey findings; C0 (revert #12296/#12419/#12156 before 17.3) added; §6 staging
question resolved.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 01:50
… not the name; sys_http_delivery and sys_email are tenant data (#13565, #11741); sys_metadata_activation is reverted before 17.3
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rganization first; the seed loader's sys_ exemption is withdrawn (#14547 root)
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… declaration, settings, grant row, overlay axis) and the post-17.2 audit verdicts; one open question remains
Maintainer: 「接受你的建议」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
os-sales pushed a commit that referenced this pull request Sep 3, 2026
…1 anchor
`check-adr-anchors` is red on the previous head: this branch cited `ADR-0131`
22 times and `docs/adr/0131-*.md` does not exist — ADR files stop at 0130 and
PR #14976 (which would author it) is open and draft. The gate treats an
unresolvable ADR id as a citation squat: whoever later writes a real ADR-0131
would retroactively falsify every one of those citations at once (#6634).
No legitimate forward-reference form exists. The gate's only citation exemption
is CROSS_REPO_QUALIFIERS (objectui / object-ui / cloud), so a repo qualifier is
skipped but `ADR-0131 (PR #14976)` is not — the qualifier must be a sibling
repo, not a PR. Its allowlist is shrink-only and documented to stay empty.
⛔ Deliberately NOT done: no allowlist entry, and no `docs/adr/0131-*.md`
created here — that file belongs to PR #14976 and `docs/adr/**` is governed.
Every citation now reads "the v18 org-ownership decision (PR #14976)", keeping
the decision letters (D8 / C1) that carry the actual meaning. Issue and PR
references (#14547, #14949, #10103, #13564) are untouched — they resolve.
Substance is unchanged; the ADR id can be restored once #14976 lands.
check-adr-anchors now exits 0: "OK (53 anchored file(s) … 31871 citation(s)
across 4202 file(s) resolve)".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AUF1NoViznQK32gqpK8wS8
…05 keeps, what this record decides, the costs
Maintainer 2026-09-04: 「你目前新的 ADR 有重新考虑集团版的规则吗?帮我具体列一下」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ied: no writer/reader in framework, never referenced by objectui); ADR-0017 §3.4/§3.6 amended
Maintainer 2026-09-04: 「现在就核实」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 3 commits September 4, 2026 10:26
…eclared vocabulary today; add PositionSchema.permissionSets, migrate junction rows into definitions, §6 Q2 records the alternative reading
Verified 2026-09-04: no binding key in PositionSchema/PermissionSetSchema; only isDefault→everyone
(ADR-0090 D5); packages suggest, never own (D9); bindings exist only as sys_position_permission_set rows.
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…n, ruled; the org-level binding table recorded as a rejected alternative
Maintainer 2026-09-04: 「ok」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ability) and Setup (security-admin authority, open under single, refused under a wall); Setup editor parity is a C9 acceptance criterion
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@hotlonghotlong added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 4, 2026
os-zhuang pushed a commit that referenced this pull request Sep 4, 2026
…ecord that does not exist on this branch (check-adr-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 4 commits September 4, 2026 10:50
…set label instead (#4898)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… behavioural items are not customizable under managed; the supersede shape recorded for a future pull
Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es stand at environment scope (amended, not superseded); the standard-package scenario; C0 re-scoped to the column fix
Maintainer 2026-09-04: 「所以 ADR-0126 不能简单的关掉」「hotcrm 是标准的软件包,客户安装之后能根据业务需求实现具体的
定制」「同意」. Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ceremony (plan / backup / apply / post-check) with a boot refusal behind it, never an automatic boot step
Maintainer 2026-09-04: 「我建议 18.0 的主要考虑是客户数据变化比较大,而且需要手工执行升级脚本。」 Refs #13564
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
hotlongand others added 2 commits September 4, 2026 11:46
…e:line anchor (check-adr-symbol-anchors)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mption is withdrawn (C1); its eight objects are C7's first named fate-3 members
Maintainer 2026-09-04: 「同意」. Refs #13564#14096
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 04:50
@os-zhuang
os-zhuang added this pull request to the merge queueSep 4, 2026
Any commits made after this event will not be merged.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/lskip-changesetPR has no user-facing published change; bypasses the changeset gatetooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hotlong@os-zhuang