Repository navigation
feat(platform-objects,spec): a single-organization deployment can rename its organization - #25661
Conversation
…ame its organization Rename Organization (name and logo, never the slug) moves its gate from multiOrgEnabled to the organization capability, and PUBLIC_AUTH_FEATURES books its row under `organization` in the same change. Under `single` it was the one organization's only possible name door and it was hidden. Edit Organization, Create, Delete, Switch and Leave stay multi-org only. The name field's help names the door in all four bundles. Pins: the action gate (with update_organization as control), the gate-matrix row, the multiOrg roster test (now filters rows by gate), and a single-boot dogfood pin that offers, refuses a plain member, and renames. Maintainer ruling 6384629949. Claude-Session: https://claude.ai/code/session_01JJZRJcjTF4oBQK7333oAnR Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 7 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 4 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 144 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 92ffe4401dbdd7c59da1a8b16e69cd727632cadb && git checkout 92ffe4401dbdd7c59da1a8b16e69cd727632cadb
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin baae6ed14e90e357b6e437e62aed01f0f1be9649 d613a6d86bb2c1bf9b03da51ef531e0d7d1bd9e8 && git checkout -B drift-repro baae6ed14e90e357b6e437e62aed01f0f1be9649 && git merge --no-ff d613a6d86bb2c1bf9b03da51ef531e0d7d1bd9e8
node scripts/docs-audit/affected-docs.mjs --json baae6ed14e90e357b6e437e62aed01f0f1be9649
|
Contract reviewServed-tier: Face: schema — ① Derived judgments
② Semver levelTwo changesets, ③ Boundary flags
Implemented-by: VERDICT: PASS Generated by Claude Code |
席位核对 · ACCEPT · 2026-10-24T14:25Z
Generated by Claude Code |
Requested by Sales · project thread
Fixes #25347
Clause-②: yes
Metadata-protocol: none
Ruling-ref: 6384629949 (maintainer ruling A, 「25347 同意」). Claim of record:
6384658457on the card (card thread; the first PR #25464 landed the help and Branding half as832a84eb). Branchclaude/project-thread-xvfy21is the harness-pinned branch for this session. It names no issue, so the Duplicate Fix Guard's branch-name hint will not match, and the claim is the identity record.Why
Under the
singleposture the one organization could not be renamed anywhere.update_organizationandrename_organizationwere both gated onmultiOrgEnabled, and the generic edit form keepsnamereadonly (ADR-0092 D4). So the record kept "Default Organization" for good, which is the third name in the card's report. Renaming the one organization changes nothing about tenancy, so it is not a multi-organization action.What changes
sys_organization.rename_organization(name and logo, never the slug):requiresFeaturemoves frommultiOrgEnabledtoorganization. Its membership grades are unchanged: owner and admin, the samerequiresMembershipReach: 'update_organization'. better-auth'sorganization/updatestill decides at the door.update_organization(it also sends the slug),create_organization,delete_organization,set_active_organizationandleave_organization. Undermultinothing changes.PUBLIC_AUTH_FEATURES: the'sys_organization.actions.rename_organization'row moves frommultiOrgEnabled.gatedInputstoorganization.gatedInputs.feature-gate-guard.test.tschecks the registry against the declarations in both directions, so the row and the gate land together, as in feat(platform-objects): sys_organization declares a record_header invite action; leave_organization folds to the overflow and names what is lost #24216, feat(platform-objects): sys_organization declares a name/logo-only rename action at the record header #24317 and feat(spec, platform-objects): declare features.cloudManaged with a hide-when-on gate, and hide the six doors that add people while it is on #25309.sys_organization.name's help now names its door: "Change it with Rename Organization at the top of this record." en was regenerated bycheck-i18n-bundles --write. The zh-CN, ja-JP and es-ES leaves were translated by hand, using each bundle's own label for the action.Outside the claim's file surface
This card is
domain:services. One file belongs to the spec lane:packages/spec/src/kernel/public-auth-features.ts. It changes by +5 / −3: one row moved between twogatedInputslists, with its comment. Maintainer ruling6384629949on #25347 puts it in this PR, for this card only; standing rule G is not decided. A cross-lane declaration is posted on spec seat post #6017. The spec face owes aCONTRACT_REVIEW_TIERcontract review before the queue. The build ismode:cloud, because the surface spanspackages/spec/src/**and another package.Pins
sys-organization-rename-action.test.ts: the gate case now pinsrename_organizationon(reach) && features.organization != false, withupdate_organizationonmultiOrgEnabledas the control.platform-objects.test.ts:rename_organizationis now${ADMINS} && ${ORG}.MULTI_ORG.sys-organization-name-timezone-help.test.ts: a new case checks that the name help names Rename Organization and that the action carries that label.packages/qa/dogfood/test/organization-rename-single.dogfood.test.ts. On a booted plain showcase (single), on the wire:organization: true,multiOrgEnabled: false. The seeded admin holds an owner or admin grade.celEngineagainst the served metadata and sessionpositions. The five multi-organization actions stay hidden.YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION, and the name is unchanged.Ablation:
sys-organization.object.ts,public-auth-features.tsand the four bundles were restored fromorigin/mainin the worktree only, and spec and platform-objects rebuilt.Tests and gates (head
d613a6d8, base49653f91)pnpm --filter @objectstack/spec test:Test Files 716 passed (716),Tests 21725 passed | 1 todo.pnpm --filter @objectstack/platform-objects test:Test Files 94 passed (94),Tests 1344 passed (1344). This run includesfeature-gate-guard.test.ts.organization-rename-single,organization-rename-door,org-record-admin-reachandorg-change-slug-bound-action(dogfood):Test Files 4 passed (4),Tests 18 passed (18).dispatch-gates --commands: 91 families. All 91 exited 0, and--ranreports 91 run, 0 NOT-MEASURED.check-i18n-bundles,check:i18n-stale-fill, andcheck-adr-0087-registration --base origin/main(no breaking changeset) all passed.git merge-treeonto the latestorigin/mainis clean.!andClause-②has no(narrowing)arm.Overlap
Two open PRs touch neighbouring lines, and neither asserts anything about this action:
sys_user.actions.create_user.params.organizationIdnear the moved row inmultiOrgEnabled.gatedInputs.invite_user'ssuccessMessageinsys-organization.object.ts.Whichever lands second needs only a text merge.
Acceptance notes
None new. The first PR's notes still stand: there are two built-in product names (
OS_PRODUCT_NAMEandOS_APP_NAME), andsys_business_unit.timezone's help promises an inheritance that no code implements.Changesets:
.changeset/25347-rename-organization-single.md(@objectstack/platform-objectspatch) and.changeset/25347-rename-organization-auth-feature.md(@objectstack/specpatch).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01JJZRJcjTF4oBQK7333oAnR