Repository navigation
feat(policy): add the analyst role below member - #2543
Merged
Merged
Maple Review Bot / Maple / review
completed
Nov 13, 2026 in 2m 21s
Confidence 6/10 · 1 issue to address
🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
1 warning −1 · tests covered · risk high −1
Adds an analyst role below member and makes an unknown Clerk role read as analyst instead of member, with an empty role list still reading as member. The ladder change is sound and well tested; the Members page still mislabels the role until #2549.
Rolegainsanalystat rank 0, belowmemberroleOfreads an unknown Clerk role asanalyst, notmemberhighestRoletakesArr.max(byRank); an empty role list still reads asmemberholdersPhrase("member")now names admins, engineers and members
Before merge
- Manual · Create the
org:analystClerk org role before #2549 assigns it:roleOfmatches the key exactly
Still open from earlier reviews
- 🟠 Warning · F1 · An
observermember renders as Member in the Members page and cannot be promoted to member ·packages/domain/src/policy/roles.ts:46
What was checked
roleOfonly ever sees Clerk keys:tenant.rolescarriesorg:*(packages/auth/src/index.ts:780), pinned key roles too (apps/api/src/routes/v2/api-keys.http.ts:138)Arr.maxreturns the element, as its existing callers assume (packages/alerting-core/src/oncall.ts:331), sohighestRolestill returnsRole- No permission has
min: "analyst", so the newholdersPhrasebranch changes no denial message today
6fab3c2 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading