Commit 35d0ff2
docs(approvals): drop duplicated role warning, generalize approver literal (#3113 lint fix)
`lint.yml` has been red on main since #3113: the reserved-word ratchet
(ADR-0090 D3) caught content/docs/automation/approvals.mdx growing 5 → 9
occurrences of "role". Every open PR inherits the failure.
The four new occurrences are NOT a fifth legitimate boundary needing a
baseline bump — three of them are a near-verbatim duplicate of the callout
80 lines earlier, and the fourth is an over-narrow API description:
- The lifecycle Steps repeated the "type: 'role' is not a position" warning
that "3. The approval node" already carries (and carries better — it names
the `approval-role-not-membership-tier` lint rule). Kept the fact the
lifecycle section actually needs (an unresolved approver list parks the run
forever) and cross-referenced the authoritative warning instead.
- `approverId` was documented as accepting `role:<r>`. The runtime falls back
to a generic `` `${a.type}:${a.value}` `` literal for EVERY approver type
(approval-service.ts expandApprovers), and the REST layer only splits on
commas — it never validates the prefix. `<type>:<value>` is the accurate
contract; `role:<r>` described one arbitrary instance of it.
Net: same information, one authoritative home, no accuracy lost, and the
baseline stays at 5 rather than freezing 4 avoidable occurrences.
Deliberately NOT rewording the surviving 5: `role` there is the better-auth
org-membership tier (`sys_member.role`), which is D3's single documented
exception. It is live, not deprecated — spec `ApproverType` still enumerates
'role' alongside 'position' (approval.zod.ts, asserted in approval.test.ts)
and `expandRoleUsers` resolves it against `sys_member.role`. Renaming a
third-party identifier we do not own would make the docs wrong.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 3a8ce9d commit 35d0ff2
1 file changed
Lines changed: 9 additions & 10 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 | + | |
| 137 | + | |
141 | 138 | | |
142 | 139 | | |
143 | 140 | | |
| |||
150 | 147 | | |
151 | 148 | | |
152 | 149 | | |
153 | | - | |
154 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
| |||
0 commit comments