Skip to content

Commit 851a001

Browse files
os-zhuangclaude
andauthored
docs(docs-audit): record why CHANGELOG.md is NOT added to the drift exclusion (#4136)
#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. Claude-Session: https://claude.ai/code/session_01QoA8AV99Ss1RRkLLAYmDzq Co-authored-by: Claude <noreply@anthropic.com>
1 parent 20bc1ec commit 851a001

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
---
3+
4+
Docs only — no package changes, nothing to release.
5+
6+
Records why `packages/*/CHANGELOG.md` is **not** added to the docs-drift mapper's test-file
7+
exclusion (#4091). It reads as the obvious next narrowing and is a provable no-op:
8+
9+
- `chore: version packages` is the only PR class that mass-touches those files, and it runs
10+
no GitHub Actions — `changesets/action` opens it with the repo `GITHUB_TOKEN`, which by
11+
design triggers no workflow runs. Measured on #3910: one check run, Vercel's own app.
12+
The version bump is still verified, just post-merge (`ci.yml` / `lint.yml` on `push: main`,
13+
and `release.yml` gates publish on a green build).
14+
- `changeset version` writes `package.json` beside every `CHANGELOG.md` it appends to
15+
(45 vs 46 on page 1 of #3910's diff), so excluding the CHANGELOGs would leave the derived
16+
package-root set bit-identical anyway.
17+
18+
Written down so the next reader does not spend a PR rediscovering it as a gap.

scripts/docs-audit/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ the PR where it is right. The count of excluded files is reported in the summary
4141
pins the matcher against paths that must and must not match (`commands/test.ts` is
4242
implementation; `foo.conformance.test.ts` is not).
4343

44+
**And one deliberate non-exclusion:** `packages/*/CHANGELOG.md` stays counted, even though
45+
release notes define behaviour no more than a test does. Extending the exclusion there
46+
looks like the obvious next step and is a provable no-op, for two independent reasons:
47+
48+
1. The only PR class that mass-touches those files is `chore: version packages`, and it
49+
runs **no GitHub Actions at all**`changesets/action` opens it with the repo's
50+
`GITHUB_TOKEN`, and GitHub does not trigger workflow runs from `GITHUB_TOKEN`-authored
51+
events. Measured on #3910: one check run, from Vercel's own app. So this gate never
52+
sees a release PR to be noisy on. (The bump is still verified — `ci.yml` and `lint.yml`
53+
both run on `push: main`, and `release.yml` gates publish on a green build.)
54+
2. Even if it did run, `changeset version` writes `package.json` next to every
55+
`CHANGELOG.md` it appends to — 45 of the former against 46 of the latter on the first
56+
page of #3910's diff — so dropping the CHANGELOGs would leave the derived package-root
57+
set bit-identical.
58+
59+
A hand-edited CHANGELOG outside a release is also close to nonexistent in practice. Left
60+
counted, and recorded here so the idea is not rediscovered as a gap.
61+
4462
## 2. CI gate — `.github/workflows/docs-drift-check.yml`
4563

4664
On any PR that touches `packages/**`, runs `affected-docs.mjs` against the base branch

0 commit comments

Comments
 (0)