Repository navigation
docs(sharing): OWD 表对齐注册对象全集,zh 两页带到 #699 的实测口径(#790, #791) - #811
Merged
Merged
Conversation
…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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
yinlianghui
marked this pull request as ready for review
August 5, 2026 21:04
This was referenced Aug 5, 2026
Closed
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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一字未动。#791 半 —— zh 两页带到实测口径
先读英文页现状,以它为对账基准,逐处对齐:
test/parent-derived-reach.test.ts| 活动 | 只有自己的 |#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 那一半:
Events行、四个版本没人发现的通道)。英文页不在此列 —— 它已被上方那条规则用 stack 派生的pluralLabel检查,比 ledger 强,不需要在这里退化成 authored 判据。两条规则,各管一类页面。test/parent-derived-reach.test.ts与controlled_by_parentderivation ignores the master's ownership and share grants — children are readable (and writable) regardless of parent access objectstack#5386。这条钉的是同步移动,不是真值 —— 真值由parent-derived-reach.test.ts对着引擎实测钉住。sharing-and-security 的 zh-Hans / zh-Hant 停在 PR #699 之前:仍承诺「看得到父记录才看得到子行」,相关列表表还缺 Events #791 的缺陷正是英文页在 docs: controlled_by_parent 可达范围按实测改写(#694 本仓侧纠偏) #699 动了、两个中文页没动,而当时没有任何东西是红的。不扩的一条,理由写在文件头:内置共享规则表(第 1、2 条规则)仍只读英文页 —— 它的对象列与授予列也是翻译过的,需要再加一张 access-word ledger,而两份中文表今天逐条核对下来零漂移。按 observation-class 立单为 #809,不在本 PR 里猜。
反向验证(五个方向,都是先声明方向再跑)
活動OWD 行crm_event;数词规则保持绿(Event 不是 parent-derived)1 failed | 28 passed:crm_event: …zh-Hant.mdx (zh-Hant) has no "活動" rowCompetitor幽灵行放回英文页1 failed | 28 passed:…sharing-and-security.mdx (en): row "Competitor" names no object this app registers1 failed | 28 passed:crm_event_attendee: …zh-Hans.mdx (zh-Hans) has no "活动参与者" row—— 全程没有任何 count 失败活动行1 failed | 28 passed:…the related-list table has to cover every account child in the ledger … - "crm_event"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 的体例一致。验证
测试数 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)
profiles的 zh-Hans / zh-Hant 也停在 docs: controlled_by_parent 可达范围按实测改写(#694 本仓侧纠偏) #699 之前,仍承诺「联系人跟随客户」。与 sharing-and-security 的 zh-Hans / zh-Hant 停在 PR #699 之前:仍承诺「看得到父记录才看得到子行」,相关列表表还缺 Events #791 同缺陷类、不同页面;本 PR 的文件面只授权动 profiles 的 Competitor 残留行。src/里一个都不存在;setup.mdx的 Day 5 清单把它当可执行步骤。顺着 battlecard 查到,需要先定调(文档跟元数据 or 元数据跟文档)。finding。crm_campaign_member属于营销活动却叫「活动成员」。本 PR 新增的「活动」行正好落在它旁边,把撞车摆到了同一张表上。属src/**,边界外。Generated by Claude Code