docs(ci): 工作流清单按实际枚举,ci.yml 任务表重写,并补上反向断言 (#3212) - #3253
Merged
Conversation
…n the reverse direction `ci-cd-pipeline.md` opened with "11 GitHub Actions workflows" against a directory that held 13, and three of them had never been documented at all: `lint.yml` (a real PR gate), `cross-repo-issue-closer.yml`, and `changeset-guard.yml`. The `ci.yml` section listed five jobs, of which three (Lint, Build Core, and an unsharded Test) do not exist. - Replace the count with an enumerated inventory table: file, the name each workflow appears under in the checks list, its trigger, and whether it can block a merge. The number is gone on purpose — it was wrong three times. - Drop the ASCII overview box; it was a second hand-maintained copy of the same set and the older of the two drifted first. - Rewrite the `ci.yml` section against the real job keys (`changeset-check`, `type-check`, `test` as a 4-shard PR-only matrix, `test-coverage` on push only, `e2e`, `docs`, `dev-server`), plus an explicit "what is not in ci.yml" for the two jobs readers were sent to look for. - Add sections for `lint.yml` (errors gate, warnings do not) and `cross-repo-issue-closer.yml`, and its `CROSS_REPO_ISSUE_TOKEN` secret. #3197 pinned only the forward direction (every workflow the page names must exist); the reverse was left out because it would have gone red on exactly these omissions. It is added here: every file in `.github/workflows/` must be named in a heading on the page, with a failure message that tells the next author what to write. `changeset-guard.yml` landing between #3212 being filed and being fixed is why the snapshot alone is not enough. Fixes #3212 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVPjPzmmAJ2Ngtvgg5MSRa
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
…iagram The previous commit removed the ASCII overview box the comment cited as the sole reason for excluding fenced blocks. The exclusion is still right — the "Adding a New Workflow" section shows YAML for workflows that do not exist — so say that instead. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVPjPzmmAJ2Ngtvgg5MSRa
xuyushun441-sys
marked this pull request as ready for review
August 3, 2026 08:10
This was referenced Aug 3, 2026
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 #3212
content/docs/guide/ci-cd-pipeline.md与.github/workflows/脱节:开头写着 11 个工作流,目录里实际有 13 个;其中三个从未被记录(lint.yml、cross-repo-issue-closer.yml、changeset-guard.yml);ci.yml一节列的五个任务里有三个根本不存在。本 PR 只改文档 + 一个测试文件,没有动任何 workflow YAML —— 这个 issue 是让文档去追平现实,不是改现实。
1. 数字直接删掉,改成枚举清单
issue 里那个数字本身就已经过期了:文档写 11,issue 写 12,实测 13(
changeset-guard.yml是在 issue 提交之后加的)。三个不同的数说明手工维护的计数必然漂移,所以按 issue 自己给的备选方案(「或干脆不写数字」)办 —— 开头不再声明任何数量,改为一张 Workflow Inventory 表逐个列出:performance-budget.yml显示为 Bundle Analysis,changeset-guard.yml显示为 Changeset Bump Policy),只知道文件名的人在 PR 页面上找不到对应的检查lint.yml是真的门禁同时删掉了原来那张 ASCII 总览图。它是同一份清单的第二份手工副本,而且先漂的正是它(图里同样缺三个工作流)。同一份清单不该有两处需要同步维护的地方 —— 表格里已经有触发条件这一列,图不再提供额外信息。
另外补了两条最常被问的 path-filter 事实:
ci.yml/lint.yml都把**/*.md、content/**、docs/**、.changeset/**放进paths-ignore(所以纯文档或纯 changeset 的 PR 什么都不会跑),而changeset-guard.yml用的是反向过滤器,这正是它必须独立成一个 workflow 的原因。2.
ci.yml一节按真实 job key 重写原文写「Runs five parallel jobs: Test / Lint / Build Core / E2E Tests / Build Docs」,其中 Lint 是独立的
lint.yml、Build Core 不存在、Test 也不是那个形态。现在按实际的 7 个 job 列表,并写明各自的运行条件:test是 4 分片矩阵(fail-fast: false),且只在 PR 上跑;test-coverage是只在 push 上跑的未分片任务,Codecov 上传在这里;changeset-check校验的是每个包都在 changesetfixed组里,不是「PR 有没有带 changeset」—— issue 正文这一处的推测不成立,按脚本实际行为写;type-check、dev-server两个此前完全没被记录的任务补齐。另加一小节 What is not in
ci.yml:直说 Lint 在lint.yml、Build Core 不存在(包构建与体积检查归 Bundle Analysis),免得读者继续在ci.yml里找这两个不存在的东西。3. 补上反向断言(这一条不是可选项)
#3197 只钉住了正向:文档提到的每个
*.yml都必须真实存在。反向当时被有意略去,因为加了会立刻因本 issue 描述的遗漏而红。只修今天的快照没有意义 —— 下一个新增的工作流会静默地重演一遍。
changeset-guard.yml恰好在 issue 提交与修复之间出现,就是证据。所以scripts/__tests__/ci-cd-pipeline-doc.test.ts里加了:.github/workflows/里的每个.yml都必须在文档的某个标题里被点名。 要求的是标题而不是随便提一嘴 —— 埋在表格行或 ASCII 图里的文件名正是这一页沦落至此的方式;标题才能让工作流可被检索,也才逼作者真的写清楚它干什么。DOCUMENTATION_EXEMPT里登记豁免并写明理由。DOCUMENTATION_EXEMPT是空的,而且另有一条测试防止它烂掉:条目指向的工作流必须仍然存在,理由字符串不能是敷衍的短句。豁免必须是一次被评审看见的显式声明,而不是悄悄跳过文档。Sabotage 验证(断言必须真的会红)
① 新增一个未被记录的工作流 —— 临时建
.github/workflows/zz-sabotage-check.yml,验证后已删除:② 从文档里拿掉一个标题 —— 把
## Lint (lint.yml)临时改成## Lint,验证后已还原:③ 豁免列表的自检 —— 临时塞入一条指向不存在文件的豁免,验证后已还原:
最终测试结果
tsc --noEmit(针对该测试文件)与eslint scripts/__tests__/ci-cd-pipeline-doc.test.ts均退出 0;fumadocs-mdx重新生成通过,文档能正常解析。未加 changeset
纯文档 + 测试改动,不改变任何已发布包的行为;
@object-ui/site本身在.changeset/config.json的ignore列表里。按 AGENTS.md 的约定不需要 changeset。🤖 Generated with Claude Code
https://claude.ai/code/session_01NVPjPzmmAJ2Ngtvgg5MSRa