docs(approvals): drop reserved word "role" from lifecycle copy (ADR-0090 D3)#3132
Closed
os-zhuang wants to merge 1 commit into
Closed
docs(approvals): drop reserved word "role" from lifecycle copy (ADR-0090 D3)#3132os-zhuang wants to merge 1 commit into
os-zhuang wants to merge 1 commit into
Conversation
…090 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Closing as a duplicate of #3122, which fixes the same file for the same reason, was opened ~10 min earlier, and is already fully green. I missed #3122 before opening this — my mistake. #3122 is also the better fix on the 4th occurrence:
No action needed here; #3122 covers it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the red Lint & Type Check on
main. Docs-only — henceskip-changeset.What broke
#3113 (
25a19be72) added the approval-lifecycle walkthrough, including 4 new occurrences of the reserved word "role" incontent/docs/automation/approvals.mdx(5 → 9), without updatingscripts/role-word-baseline.json.pnpm check:role-wordhas failed on every push to main since — the last 4 runs oflint.ymlare red — so every open PR inherits a failing ESLint check and real failures are masked.Why not bump the baseline
Per ADR-0090 D3 the word is reserved-forbidden and new occurrences are banned;
--updateexists to ratchet the baseline down when a file improves. So the baseline stays at 5 and the copy is reworded.The fix
Three of the four were a duplicate. The new callout under The request opens, the run pauses restated the already-baselined
positionvsrolecallout ~80 lines above it on the same page — which says the same thing in more detail (it names theos lintrule). Removed in favour of a cross-reference.While rewording I also tightened the claim to match
expandApprovers(): an unresolvable approver entry does not leavepending_approversempty — it falls back to a literal<type>:<value>slot that no user matches, which is why the request stalls.The fourth documented
approverIdacceptingrole:<r>. That literal is real, but it is one of several (team:/department:/position:/role:/manager:), so naming only therole:form was both off-vocabulary and needlessly narrow. Generalized to<type>:<value>with aposition:finance_managerexample, matching the page’s existingfinance_managersample.The surviving 5 are the documented D3 exception — the better-auth boundary (
sys_member.role), which theroleapprover type genuinely resolves against viaexpandRoleUsers(). Left untouched.Verification
pnpm check:role-word→ exit 0, approvals.mdx back to 5,role-word-baseline.jsonunmodified.pnpm lint,check:doc-authoring,check:authz-resolver,check:release-notes→ all pass.(Local
eslintOOMs at the default heap on node 25 — an environment artifact, not this change; it is clean under--max-old-space-size=8192, and CI runs node 20.)<Steps>block keeps all 4 step headings after the callout removal, the rewordedapproverIdsentence renders (<type>:<value>survives MDX as inline code), and the new#3-the-approval-nodecross-reference resolves to the right heading — no console or server errors. Worth checking by hand since no CI job validates anchors.🤖 Generated with Claude Code