Skip to content

Commit 8ecf4bc

Browse files
committed
docs(plugin-sharing): tighten two comments in the membership recompute
Claude-Session: https://claude.ai/code/session_01KqkTQNLcxVc588eZpJmp1r Co-authored-by: Claude <noreply@anthropic.com>
1 parent 59ff12f commit 8ecf4bc

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎packages/plugins/plugin-sharing/src/recipient-membership-recompute.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ async function boot() {
186186
/** The account ids `userId`'s own read path admits. */
187187
const readable = async (userId: string): Promise<string[]> => {
188188
const filter = await sharing.buildReadFilter(OBJECT, member(userId));
189-
expect(filter).not.toBeNull(); // a member context never bypasses — else this reads nothing
189+
expect(filter).not.toBeNull(); // a member context is always filtered — else this measures nothing
190190
const rows = (await ql.find(OBJECT, { where: filter as any, context: SYSTEM } as never)) as any[];
191191
return rows.map((r) => String(r.id)).sort();
192192
};

‎packages/plugins/plugin-sharing/src/recipient-membership-recompute.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@
3232
* membership table to watch.
3333
*
3434
* The position expansion also unions `sys_member.role`, the ADR-0057 D4
35-
* transition source. The holder check reads it — a user who still holds the
36-
* position there keeps the rule's grants when an assignment row goes — but its
37-
* writes are not watched here: its values are the closed set of membership
38-
* grades (ADR-0108), not business positions.
35+
* transition source, and so does the holder check: a user who still holds the
36+
* position there keeps the rule's grants when an assignment row goes.
3937
*
4038
* ## Cost: scoped to one user and to the rules that name the recipient
4139
*

0 commit comments

Comments
 (0)