You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ec9e8bb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(plugins)!: team and position recipients are read past 10,000 rows, and a failed holder read refuses instead of answering nobody
Sharing: TeamGraphService.expandUsers (sys_team_member) and the assignment
limb of PositionGraphService.expandPositionUsers (sys_user_position) read to
completion through keysetWalk; the user-scoped checks teamHasMember, holdsRole
and holdsPosition refuse a failed read instead of answering false. The queue
service keeps its declared posture (a failed member read contributes nobody)
on its holder check too.
Approvals: the team approver and the position assignment limb read to
completion through one readHoldersToCompletion beside the tier read.
Absence is judged once, by the new isObjectAbsentError in @objectstack/types.
Claude-Session: https://claude.ai/code/session_01ADHkmT6XzrVS2iPpNyXNYL
Co-authored-by: Claude <noreply@anthropic.com>
fix(plugins)!: team and position recipients reach every holder past 10,000 rows in sharing and approvals, and a team, position or role holder read that fails is refused loudly instead of answered with nobody
8
+
9
+
Clause-②: yes (narrowing)
10
+
Metadata-protocol: none
11
+
12
+
<!-- adr-0087: not-required (no-migration-prescription) No key of any schema is added, removed, renamed or re-shaped and no metadata changes: the team and position expansions read lists they already read, to completion, and the holder checks refuse a read that already failed. The one new export (isObjectAbsentError in @objectstack/types) is an addition. No author has anything to rewrite. -->
13
+
14
+
**BREAKING** only where a `sys_team_member`, `sys_user_position` or `sys_member` read fails: the team and position expansions and the user-scoped holder checks used to answer nobody (an empty list, or `false`) then, and now refuse.
15
+
16
+
This completes the family the role and membership-tier fix started. The team and position reads still read once with a 10,000-row bound and turned any read error into nobody.
17
+
18
+
-**Every holder, nobody else.** In plugin-sharing, `TeamGraphService.expandUsers` (`sys_team_member`, every `team` sharing recipient) and the assignment limb of `PositionGraphService.expandPositionUsers` (`sys_user_position`, every `position` sharing recipient) now read in pages of 10,000 ordered by id until the holders are exhausted. In plugin-approvals, the `team` approver and the assignment limb of the `position` approver (and every caller of the position expansion: escalation targets, reassign checks, `resolveAs` expressions) do the same. Past 10,000 holders, the holders past the 10,000th row used to get no grant and no approval slot. They now do.
19
+
-**Smaller groups are unchanged.** A team or position held by fewer than 10,000 people issues one read, as before, and answers the same set.
20
+
-**Loud, never short or empty.** A read that fails, or a page the driver returned without honouring the id cursor, now throws.
21
+
- Sharing, whole-rule passes: the expansion rejects, so that rule's reconcile or revoke pass fails, its callers log their existing per-rule warning, and the grants it already holds stay. Before, a failed team read answered `[]`, and a failed assignment read answered the `sys_member.role` holders alone, so the retired-recipient revoke took grants away from people who still held the recipient.
22
+
- Sharing, per-user recompute (a write to `sys_team_member` or `sys_user_position`): the holder checks `teamHasMember`, `holdsRole` and `PositionGraphService.holdsPosition` now refuse a failed read instead of answering `false`. The recompute logs `recipient membership re-evaluation failed` for that rule and user, and the user's grants stay. Before, an outage revoked that user's grants.
23
+
- Approvals: the approver slot falls back to its literal (`team:ID` or `position:NAME`) and logs `could not be expanded — a directory or read-filter lookup failed` with its `error`. Before, a failed team read logged "expanded to nobody", and a failed assignment read routed a `position` approver to its membership-tier holders alone, which looked like a complete slate.
24
+
-**Ownership queues keep their declared posture.** A queue member specification whose team or position read fails still contributes nobody, on the expansion and on the queue's holder check alike, and now logs it once. Whether a queue should refuse too is left to a ruling.
25
+
-**A missing object is still no holders.** A stack that never registers, or never creates, `sys_team_member`, `sys_user_position` or `sys_member` keeps answering no holders through it. That is judged by the new `isObjectAbsentError(error, readObject)` in `@objectstack/types`: the shared missing-table predicate for that object, or the engine's `OBJECT_NOT_FOUND` naming that object. Any other error, including an absence of a different object, stays loud.
26
+
27
+
**The remedy.** None is needed. A refusal means the membership table could not be read: fix that read, and the next expansion succeeds. A failed read is never cached.
this.warnOnce(`holds::${spec.type}::${spec.value}`,'[queue] a member specification could not be read for a holder check — it contributes nobody until it can',{
0 commit comments