Skip to content

docs(sharing): OWD 表对齐注册对象全集,zh 两页带到 #699 的实测口径(#790, #791) - #811

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-790-owd-table-full-set
Aug 5, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-790-owd-table-full-set

Conversation

@yinlianghui

Copy link
Copy Markdown
Contributor

Fixes #790
Fixes #791

零行为变更:OWD、sharingModel、sharing rule、profile 授权值全部逐字节未动,本次只改文档散文与测试。src/** 一行没碰。

前提复核(在最新 main 上,两单分别)

git fetch origin main @ 131daf9(#795 与 #797 之后),以编译后 stack 为准(17 个注册对象)。

#790 —— 成立。 三语 OWD 表都还有 Competitor 行(en:40 / zh-Hans:40 / zh-Hant:40),crm_competitor 不在 stack 里;三语都没有 crm_event 行,而 crm_event 确实是 private:

crm_event                  private
crm_event_attendee         controlled_by_parent

profiles.mdx:40 的 competitor 战卡残留也还在 —— 而且不止 :40::48(Sales Rep「and file a new competitor they ran into」)与 :65(Marketing User)是同一残留,三语各三处,共九处。

#790 的一个额外确认:删掉 Competitor、补上 Event 之后,这张表恰好就是 17 个注册对象,一个不多一个不少。这正是把守卫从 parent-derived 子集扩到全集的前提 —— 表确实是全对象清单。

#791 —— 成立。 git log 显示两个中文页最后一次实质改动仍是 9f748ab(#677),早于 #699(0899b4f7);#795 只往表里加了一行 + 改了数词。#791 点名的五处口径 + 相关列表表缺 | Events | 行,逐条复核后全部仍在。

改了什么

#790 半 —— OWD 表 = 注册对象集

  • 三语各删一行 Competitor、各补一行 Event(Private,理由措辞照 crm_task 那行写:「Personal activity items, like tasks」/「个人活动条目,与任务同类」)。
  • profiles 三语的九处 competitor 战卡残留一并清掉。说明:单派单文件面写的是「profiles.mdx(仅 Competitor 残留行)」,我按「残留行」这个类别做,而不是按行号 —— 只清英文页会当场造出一个新的三语漂移。除这九行外 profiles 一字未动。
  • 守卫从 parent-derived 子集扩到 全对象集派生(详见下节)。

#791 半 —— zh 两页带到实测口径

先读英文页现状,以它为对账基准,逐处对齐:

位置 之前(#699 之前的旧口径) 现在
「由父级控制」在实践中 · 读 你能看到其父记录你能看到的那些行 本版本计算出来的结果是组织范围,而不是按父记录收窄(含实测两例)
同上 · 写 需要对父记录有编辑权限 同一过滤解析父记录,所以写入闸门同样宽
同上 · 新增段 无 指向 objectstack-ai/objectstack#5386 与 test/parent-derived-reach.test.ts
OWD 表 联系人 / 活动成员 / 活动参与者 三行 「可见性跟随客户」「成员关系跟随活动」/ #795 的结构口径 与英文行同款,指向该节
相关列表表 联系人行 全部 —— 因此跟随客户 全部 —— 而且不只是这个客户的:本版本中派生为组织范围
相关列表表 缺 Events 行(#592 欠账) 补 | 活动 | 只有自己的 |
第 4 层 手工共享 子记录随之跟随 手工共享不给派生子记录带来任何东西
这些层级如何组合 · 第 4 条 记录的父记录对他们可见 今天无论父记录是否可见都会授予
给用户的提示 · 第 2 条 只有联系人跟随客户 联系人是唯一从不会被扣下的,因为派生到组织范围

#795 补的两行中文当时按结构写以避免自相矛盾;整页口径带平之后,这两行已对齐英文行的实测口径。两个 H3 小节标题同时按英文页的形状收短(「…在实践中意味着什么」→「…在实践中」),使正文里的斜体指路引用能像英文页一样直接写标题。

守卫:从 parent-derived 子集 → 全对象集

test/sharing-coverage.test.ts 底部整块重写,#795 的解析基建(tableAfter、按语言 authored 的 ledger、数词表、反真空两端)全部保留并在其上扩展。

派生的是什么:行集与每行的 OWD 值。每个注册对象必须恰有一行(重复行点名报错),该行第二格必须写出对象真正 ship 的 sharingModel;任何一行都不能写一个本 app 不注册的对象。authored 的是什么:每个对象的三语行标签(ROW_LABEL,17 × 3)—— 理由同 #795:这些页面自己翻译对象标签,且本 app 根本没有 zh-Hant 语言包。

sys_* 按 docs-object-coverage.test.ts 的判据排除(平台对象由平台文档负责)。今天 stack 里一个都没有,所以该过滤不改变任何结果;它在那里是为了将来平台若开始注入 sys 对象,这张表不会变成平台手册。

#795 的两条 parent-derived 专用规则被更强的规则吸收后删除,而不是留着空转:一行给 private 对象写「由父级控制」现在栽在 OWD 值检查上,一行写着谁也不注册的对象现在栽在幽灵行检查上 —— 无论那一格写什么。数词规则原样保留:它数的是 parent-derived 对象,因为表下那句话数的就是它们,而它从 stack 取数、永远不从表格行数取数。

另加两条覆盖 #791 那一半:

不扩的一条,理由写在文件头:内置共享规则表(第 1、2 条规则)仍只读英文页 —— 它的对象列与授予列也是翻译过的,需要再加一张 access-word ledger,而两份中文表今天逐条核对下来零漂移。按 observation-class 立单为 #809,不在本 PR 里猜。

反向验证(五个方向,都是先声明方向再跑)

方向 预测 实测
1. 删掉新补的 zh-Hant 活動 OWD 行 只有该页行规则转红,点名 crm_event;数词规则保持绿(Event 不是 parent-derived) 1 failed | 28 passed:crm_event: …zh-Hant.mdx (zh-Hant) has no "活動" row
2. 把 Competitor 幽灵行放回英文页 只有该页幽灵行规则转红 1 failed | 28 passed:…sharing-and-security.mdx (en): row "Competitor" names no object this app registers
3. 删掉 zh-Hans 的 parent-derived 行(活动参与者) 该页行规则红,数词规则仍绿(数词从 stack 取,不从行数取) 1 failed | 28 passed:crm_event_attendee: …zh-Hans.mdx (zh-Hans) has no "活动参与者" row —— 全程没有任何 count 失败
4. 删掉 zh-Hans 相关列表表里新补的 活动 行 只有中文相关列表规则转红 1 failed | 28 passed:…the related-list table has to cover every account child in the ledger … - "crm_event"
5. 把 #699 之前的旧承诺放回 zh-Hans(「读 —— 你能看到其父记录你能看到的那些行」) 只有可达范围口径规则转红;没有任何行移动,所以任何行规则都看不见它 1 failed | 28 passed:…zh-Hans.mdx (zh-Hans): no sentence matching /本版本计算出来的结果是组织范围,而不是按父记录收窄/

方向 2 是这次扩面买到的东西:那一行是 Public Read-Only,与 parent-derived 毫无关系,#795 的守卫对它完全不可见。方向 3 与方向 1 合起来证明「数词独立于行数」——删掉一个 parent-derived 行也不会让数词跟着一起错,两者钉在同一个派生集上。方向 5 是 #791 这一半的意义所在:在这条规则之前,那次改写没有让任何测试变红。

五个方向的预测与实测都写进了 test/sharing-coverage.test.ts 的文件头,与 #795 的体例一致。

验证

pnpm validate    ✓ Validation passed — 17 Objects 344 Fields(13 条 warning 全为既有的 approval/field-group 提示)
pnpm typecheck   ✓ tsc --noEmit 无输出
pnpm lint        ✓ 13 warning(s), 14 suggestion(s)(与 main 同)
pnpm build       ✓ dist/objectstack.json (1918.6 KB)
pnpm test        ✓ Test Files 63 passed (63) / Tests 1540 passed | 1 skipped (1541)
pnpm hygiene     ✓ no raw control bytes in source files(242 files)

测试数 1534 → 1540:该文件的 23 条变成 29 条。

改动文件的控制字符自扫(grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]',含 changeset)零命中。changeset:.changeset/owd-table-registered-object-set.md(patch,docs + test),站内路径一律反引号、无 markdown 链接语法(link-check 扫 .changeset/)。

越界发现(均已单独立 issue,先搜重后立,未 assign)


Generated by Claude Code

…ng the zh pages to the measured reach (#790, #791)

The Org-Wide Defaults table disagreed with the compiled stack in two
directions: it listed `Competitor`, whose object went with the demo-only
module (and took four dangling profile grants with it), and it had no row
for `crm_event` at all. Both fixed in all three locales, plus the same
stale competitor battlecard wording on the Profiles page.

The two Chinese pages were also stuck before PR #699: they still promised
"you see the rows whose parent you can see", which is the intent of
Controlled by Parent and not what this release computes. Every place they
carried it now says what the English page has said since that measurement,
and their related-list tables gained the Events row the English one has
carried since #592.

test/sharing-coverage.test.ts widens #710's guard from the parent-derived
subset to the whole registered-object set — one row per object, stating
the sharingModel it ships, no row for anything the app does not register,
on each of the three pages. Two further rules cover the Chinese pages'
related-list tables and pin all three pages to the same measured reach.

Zero behaviour change: no OWD, sharingModel, sharing rule or profile grant
is touched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hotcrm Ignored Ignored Aug 5, 2026 9:00pm

Request Review

@github-actions github-actions Bot added the ci/cd CI plumbing and the verification pipeline label Aug 5, 2026
@yinlianghui
yinlianghui marked this pull request as ready for review August 5, 2026 21:04
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit a98ddaa Aug 5, 2026
10 checks passed
yinlianghui added a commit to yinlianghui/hotcrm that referenced this pull request Aug 10, 2026
…ch (objectstack-ai#807) (objectstack-ai#820)

PR objectstack-ai#699 rewrote the Sales Representative block on profiles.mdx after
test/parent-derived-reach.test.ts measured what the ADR-0055 derivation
does. The two Chinese pages did not follow, so they promised the opposite
of what ships: contacts "follow the account" (measured: a rep reading one
account reads both accounts' contacts) and line-item control scoped to
"their own deals and quotes" (measured: a rep reading no quote at all
still reads every quote's lines).

Rewrites both bullets on profiles.zh-Hans.mdx and profiles.zh-Hant.mdx
against the English page, reusing the vocabulary the corrected sharing
pages settled on, and carrying the same cross-reference into
"Controlled by Parent, in practice". The English page is untouched.

Extends test/sharing-coverage.test.ts to pin the claim in all three
locales, on the parsing infrastructure objectstack-ai#811 left behind: a bullet-list
reader beside the existing table reader, an authored-per-locale claim
ledger, the same anti-vacuum discipline, and a derived precondition that
the three objects those bullets describe still ship controlled_by_parent.
Five reverse-verification directions, predicted then measured, are
recorded in the file header.


Claude-Session: https://claude.ai/code/session_01VHrPAGEgFDoHjphqYG4BMa

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline

Projects

None yet

2 participants