Skip to content

docs(approvals): unbreak the role-word ratchet after the lifecycle walkthrough#3130

Merged
os-zhuang merged 1 commit into
mainfrom
docs/role-ratchet
Jul 17, 2026
Merged

docs(approvals): unbreak the role-word ratchet after the lifecycle walkthrough#3130
os-zhuang merged 1 commit into
mainfrom
docs/role-ratchet

Conversation

@os-zhuang

@os-zhuang os-zhuang commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

问题

#3113 合并的审批 walkthrough 把 approvals.mdx 的保留词 "role"(ADR-0090 D3)从 5 处推到 9 处 → check-role-word ratchet 失败。当前从 main 切出的每个 PR 都因此红(#3121 就是这么撞上的)。

根因其实是重复

细看发现:该页 80 行之前的 §3 已经有一个更好的 callout 讲同一件事(position vs better-auth 成员层级,还给出了 os lint 规则名 approval-role-not-membership-tier)。我在 walkthrough 里等于把它重写了一遍——保留词计数就是这么涨的。

修复

删掉重复的 callout,改为一行指针(点名所有 approver kind + 链到原 callout,这也正是读者读到那儿需要的)。计数回到基线原值 5 → 基线零改动

本地 node scripts/check-role-word.mjs ✅ OK (49 baselined files, no new occurrences)。

反思

我上一轮引入的回归:写"警告某个词是陷阱"的段落时,自己踩了那个词的闸门,而且还重复了页面已有的内容。ratchet 的设计是对的——它逼出的正解不是"把基线调高",而是"你本来就不该写这段"。

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jul 17, 2026 1:44pm

Request Review

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation labels Jul 17, 2026
…g the ratchet

#3113's lifecycle walkthrough re-stated a warning the page already makes
better 80 lines up (§3 The approval node: position vs the membership tier,
including the `os lint` rule that flags it). The duplicate pushed the
reserved-word count (ADR-0090 D3) from 5 to 9, so check-role-word failed
on every PR cut from main since — #3121 tripped over it.

Removing the duplicate and pointing at the original brings the count back
to exactly the baselined 5: **no baseline change needed**. The walkthrough
keeps a one-line pointer that names the approver kinds and links to the
existing callout, which is what a reader needs at that point anyway.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 26e82b3 into main Jul 17, 2026
14 of 15 checks passed
@os-zhuang
os-zhuang deleted the docs/role-ratchet branch July 17, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant