Commit e979418
docs(approvals): drop reserved word "role" from lifecycle copy (ADR-0090 D3)
#3113 added the approval-lifecycle walkthrough with 4 new occurrences of the
reserved word "role", taking approvals.mdx from 5 → 9 and turning check:role-word
red. Lint & Type Check has failed on every push to main since, so every open PR
inherits a failing ESLint check.
ADR-0090 D3 bans NEW occurrences — the --update path is for ratcheting the
baseline DOWN — so the baseline stays at 5 and the copy is reworded instead.
Three of the four were a duplicate: the new callout under "The request opens"
restated the baselined `position` vs `role` callout ~80 lines above it, which
already says the same thing in more detail (it names the os lint rule). Replaced
with a cross-reference to it. The claim is also tightened to match
expandApprovers(): an unresolvable entry does not leave `pending_approvers`
empty, it falls back to a literal `<type>:<value>` slot that no user matches.
The fourth documented `approverId` accepting `role:<r>`. That literal is real,
but it is one of several (`team:` / `department:` / `position:` / `role:` /
`manager:` per approval-service.ts), so naming only the `role:` form was both
off-vocabulary and needlessly narrow. Generalized to `<type>:<value>` with a
`position:finance_manager` example, matching the page's existing finance_manager
sample.
The surviving 5 are the documented D3 exception — the better-auth boundary
(`sys_member.role`), which the `role` approver type genuinely resolves against
via expandRoleUsers().
Verified: check:role-word exits 0 at 5 occurrences with the baseline untouched;
eslint, check:doc-authoring, check:authz-resolver and check:release-notes pass;
page rendered in the docs site — Steps block intact and the #3-the-approval-node
cross-reference resolves.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent fdc244e commit e979418
1 file changed
Lines changed: 8 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
141 | 137 | | |
142 | 138 | | |
143 | 139 | | |
| |||
150 | 146 | | |
151 | 147 | | |
152 | 148 | | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
157 | 153 | | |
158 | 154 | | |
159 | 155 | | |
| |||
0 commit comments