Repository navigation
fix(platform-objects, lint): the Business Unit page and the readScope hint say what needs the enterprise edition - #30622
Conversation
…me the enterprise requirement Claude-Session: https://claude.ai/code/session_01Utp6CYwoPbRRkiyph2ufCw Co-authored-by: Claude <noreply@anthropic.com>
…equires read in the key-surface pin Claude-Session: https://claude.ai/code/session_01Utp6CYwoPbRRkiyph2ufCw Co-authored-by: Claude <noreply@anthropic.com>
…rprise requirement Claude-Session: https://claude.ai/code/session_01Utp6CYwoPbRRkiyph2ufCw Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 2 package(s): 14 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 6 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 6 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 55fb1cd9814020de03bc77895a563c3333932b7e && git checkout 55fb1cd9814020de03bc77895a563c3333932b7e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 1c5cee6736518291d86148cd69124542dfc0d021 fe3d2a1ed33cdd09dad25b51e40d784b01ed6670 && git checkout -B drift-repro 1c5cee6736518291d86148cd69124542dfc0d021 && git merge --no-ff fe3d2a1ed33cdd09dad25b51e40d784b01ed6670
node scripts/docs-audit/affected-docs.mjs --json 1c5cee6736518291d86148cd69124542dfc0d021
|
|
domain:server#6 · os-bill · session_01Utp6CXCS98uhsFQYk64epE 席位记录 · 2026-11-05T18:44Z · Head-sha
|
Requested by Bill · project thread
domain:server#6 · os-bill · session_01Utp6CXCS98uhsFQYk64epE (dev: card thread session_01Utp6CYwoPbRRkiyph2ufCw)
维护者速读
os validate的security-private-no-readscope提示在项目没声明hierarchy-security时只建议org,并写明另外三个范围需要企业包。packages/lint/src/validate-security-posture.ts(hierarchyScopesCompile那段)、packages/platform-objects/src/identity/sys-business-unit.object.ts(description 与 timezone)、zh-CN.objects.generated.ts两处中文。pnpm --filter @objectstack/lint exec vitest run src/validate-security-posture.test.ts -t hierarchy-security,预期 2 条通过;无requires时 hint 只建议'org'并点名@objectstack/security-enterprise。Refs #30210 (rows 1, 2)
Clause-②: no
Metadata-protocol: none
Skills-docs: none (
git grepofskills/**for business unit, readScope and security-private-no-readscope: 6 hits inskills/objectstack-data— SKILL.md lines 73 and 388, rules/security.md lines 178 and 252, one eval; none states a sentence this diff makes false)What changes
sys_business_unit.description(the page text) said units are "used to scope data and reports". It now says what a unit does in the open edition (a sharing rule can share records with a unit, or a unit and the units under it; members get that access and lose it when they leave — measured on the card) and that letting a permission set read every record of a unit (read scopeunit) needs the enterprise edition. The compile refusal (validateHierarchyScopeCapabilityinstack.zod.ts) is unchanged, as the card asks. zh-CN value hand-written;enregenerated bypnpm i18n:extract.sys_business_unit.timezone(same reading assys_organization.timezone, corrected in One organization shows three names (Branding, the Organization record, the product chrome) and two timezones (Edit Organization, Localization) — one place for each, or say which wins (hotcrm#2194 T2-U20, R2-T2-U10) #25347). The help now says it changes no date calculation and names Settings → Localization → Default timezone, mirroring the organization's help. en + zh-CN. No field change.security-private-no-readscopehint (packages/lint, run byos validate/os lint). The rule now reads the stack'srequires— the same declarationdefineStackreads before refusing a hierarchy scope. Withhierarchy-securitydeclared, the hint is unchanged. Without it, the hint offersreadScope: 'org'or wideningsharingModel, and says'own_and_reports','unit'and'unit_and_below'needrequires: ['hierarchy-security'], which@objectstack/security-enterpriseprovides. A stack with norequires(the runtime metadata door hands none) gets the requirement named too. Same grants fire, sameinfoseverity.Not built here: row 3 (Timezone on Edit organization) is measured only, per the order — removing a
sys_organizationfield narrows an accept set and is the owning lane's ADR-0049 removal. Row 4 (hide Parent Organization / Sort Order on one organization) stopped asneeds_decision: field and field-groupvisibleWhenbind onlyrecord/previous/parentat authoring (FIELD_RULE_BOUND_ROOTS,packages/lint/src/validate-expressions.ts), and fields carry norequiresFeature, so hiding needs a new metadata capability. Both readings and the row 4 options are in the os-dev-report on the card.Tests
packages/platform-objects/src/identity/sys-business-unit-edition-copy.test.ts(new): the description names sharing rules and the enterprise edition and drops the scoping claim; the zh-CN description says 共享规则 / 企业版; the Timezone help (en, zh-CN) says it changes no date calculation and names Localization's Default timezone.packages/lint/src/validate-security-posture.test.ts: two cases in the existingsecurity-private-no-readscopeblock — withouthierarchy-security, the hint offers'org'before any hierarchy scope and names the requirement in the same sentence as all three; with it, every scope is offered and the enterprise package is not named. The validate-expressions / validate-security-posture 也有同形的 spec 不声明键的??别名读法(#5009 建议 3 的核对结果) #5017 key-surface meta-test now listsrequiresamong the keys read offstack(declared byObjectStackSchema).Red on main 2ffdb64, green on the fix
Ablation (once): the requires read replaced by true
Acceptance notes
packages/cli/src/**for the advisory; it lives inpackages/lint. The seat's amendment 6662593558 addedpackages/lint/src/validate-security-posture.tsand its tests.pnpm i18n:extractrewrote onlyen; ja-JP / es-ES kept their existing values (their source-hash ledgers do not cover these keys), andcheck:i18n/check:i18n-stale-fillare green.sys_business_unit's docblock lists abu:approver prefix in the approval engine;plugin-approvalshas no such prefix onmain. A code comment, not admin-facing — left alone.Verification
All local readings on head fe3d2a1 (after merging origin/main bdbaf80, which carries #30551; the delta vs main is exactly the 7 files of this PR).
pnpm i18n:extractafter the merge wrote no change.dispatch-gates: 59 derived families, 59 run, 0 NOT-MEASURED; plus both packages' test and typecheck and pnpm lint — 64/64 exit 0
CI families are read from this PR's check-runs, not re-run here.
Generated by Claude Code