docs(docs-audit): record why CHANGELOG.md is NOT added to the drift exclusion - #4136
Conversation
…xclusion #4091 dropped test files before deriving the changed-package roots, because a test cannot make an implementation-accuracy doc stale. `packages/*/CHANGELOG.md` is the obvious next candidate by the same argument — release notes define behaviour no more than a test does — and extending the exclusion there is a provable no-op. Measured before writing anything down: - `chore: version packages` is the only PR class that mass-touches those files, and it runs no GitHub Actions at all. `changesets/action` opens it with the repo's GITHUB_TOKEN, and GitHub does not create workflow runs from GITHUB_TOKEN-authored events. #3910 carries exactly one check run, from Vercel's own app — `ci.yml` matches that PR unconditionally and still never fired. So the drift gate never sees a release PR to be noisy on. - Even if it did, `changeset version` writes `package.json` beside every `CHANGELOG.md` it appends to (45 against 46 on page 1 of #3910's diff), so dropping the CHANGELOGs would leave the derived package-root set identical. The bump is not unverified, just verified later: `ci.yml` and `lint.yml` both run on `push: main`, and `release.yml` gates publish on a green build — worth stating so the absent PR checks are not read as a hole. Recorded in the README beside the exclusion it neighbours, so the next reader does not spend a PR rediscovering it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QoA8AV99Ss1RRkLLAYmDzq
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
|
是什么失败的不是 ESLint 本身,是同一个 job 里的 本 PR 的 diff 只有两个 markdown 文件。在本地对我的 HEAD(= 成因:两个 PR 隔 3 分半交叉合入
后者的账本是对着前者落地之前的树写的。守卫本身工作正常 —— 它抓到的正是一条失效声明,这就是「声明了但扫不到」那条臂存在的理由。 不由我修#4133 已经在做,作者正是 #4122 的作者,诊断一致(其 PR body 里已把这条竞态归到自己名下),而且范围更完整:删条目 + close #4117 + 修检查器的一个假阴性。我重复修会和代码所有者在飞的更好方案撞车,所以只报不动手。 本 PR 除此之外全绿( 顺带一条现场验证: Generated by Claude Code |
…-flow-submit-jfpjy4
纯文档,无代码改动。把一个「看起来显然该做、实测是空操作」的后续记下来,省掉下一位读者的一个 PR。
背景
#4091 让 drift 映射器在推导变更包根之前丢掉测试文件 —— 测试观察行为、不定义行为,改不出实现文档的陈旧。按同一条理由,
packages/*/CHANGELOG.md是下一个显然的候选:发布日志定义行为的程度还不如测试。我本来准备把它做掉。先量了一下,结论是不该做 —— 两条彼此独立的理由:
1. 唯一会批量动这些文件的 PR 类型,压根不跑 Actions
chore: version packages由changesets/action用仓库自带的GITHUB_TOKEN开出,而 GitHub 不会为GITHUB_TOKEN产生的事件创建 workflow run。实测 #3910:一个 check run,来自 Vercel 自己的 App,零个 Actions。这不是路径过滤的问题 ——
ci.yml是pull_request: branches: [main]、无路径过滤,那个 150 文件的 PR 它无条件匹配,仍然一次没跑。所以 drift 这道闸门根本没机会在 release PR 上吵。2. 就算跑了,包根集合也一模一样
changeset version在每个追加了CHANGELOG.md的包旁边同时写package.json(#3910 diff 第一页:45 个 package.json 对 46 个 CHANGELOG.md)。package.json不在排除范围内,所以丢掉 CHANGELOG 之后推导出的包根集合逐位相同。另外,在 release 之外手改 CHANGELOG 的提交实际上近乎不存在。
顺带澄清一件容易误读的事
「version PR 上没有任何 check」看着像个洞,其实不是:
ci.yml和lint.yml都挂在push: main上,release.yml也把 publish 卡在一个绿色的pnpm run build之后。版本 bump 是被验证的,只是验证发生在合入之后而不是之前 —— 而 bump 只改版本号和内部依赖区间,坏区间会直接让 install/build 挂掉。所以我没有为此开 issue:那正是我这个会话里已经拦下三次的假报形状。验证
node scripts/docs-audit/affected-docs.mjs --self-test→ 14 cases passorigin/main→0 docs affected by 0 changed package(s),即 fix(tooling): docs-drift stops flagging docs for tests-only changes #4091 为「守卫自身被守卫」预期的那条良性结论scripts/docs-audit/**,所以 drift 工作流会在它自己身上跑一遍,并贴出0 changed package(s) ✅🤖 Generated with Claude Code
https://claude.ai/code/session_01QoA8AV99Ss1RRkLLAYmDzq
Generated by Claude Code