docs(ci): live-e2e allowlist 改为指向 package.json,不再手抄 spec 名单 - #3508
Merged
Conversation
…listing specs The allowlist's single source of truth is the `test:e2e:live:ci` script in package.json. Its spec names were hand-copied into live-e2e.yml's header comment and content/docs/guide/ci-cd-pipeline.md, and both went stale the moment #3487 promoted saved-view-filter.spec.ts (four specs, both copies still said three). Replace each enumeration with a pointer to the script. Fixes #3488 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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 #3488
问题
allowlist 的唯一真身是
package.json的test:e2e:live:ci脚本,它现在是 四个 spec:这份名单被按 spec 名逐个手抄在另外两处,两处都停留在 PR #3487 之前的三个:
.github/workflows/live-e2e.yml:3-4(头部注释)an allowlist of e2e/live specs (screen-flow, action-modal, master-detail — ...)content/docs/guide/ci-cd-pipeline.md:233-234runs the allowlisted live specs (pnpm test:e2e:live:ci — screen-flow, action-modal, master-detail)这不是一次性失误,而是结构性的:
live-e2e.yml自己的政策就是 "a few at a time" 地长这份名单(见其 "Growing the allowlist" 段),名单被设计为会反复变更;逐名手抄等于给每次晋级都埋一次静默漂移。而 workflow 头部注释恰好是下一个 agent 判断"这条 lane 到底跑了什么"的第一手材料。改动:去枚举,改指路
按 issue 分诊结论走"最省事"方向 —— 两处都删掉逐名枚举,改成指向
package.json,漂移源直接消失。未加对齐脚本(issue 里的另一个方向,已被分诊排除):为一条
continue-on-error: true的非门禁 lane 的注释新增一道 CI 门禁,成本不划算。这里换来的是"没有第二份名单可以漂移",而不是"用门禁看住第二份名单"。.github/workflows/live-e2e.yml—— 仅头部注释,job / steps / env 一字未动:content/docs/guide/ci-cd-pipeline.md—— 仅## Live E2E段:"What it does" 段去掉括号里的三个名字,另起一段 Which specs are in the allowlist 写清名单以脚本为准、以及为什么这里不复制。两处都保留了原有的行文风格(YAML 注释 ~74 列硬换行;markdown 段落宽度不变)。验证
方向先预测再跑:这是注释 + 散文改动,不应有任何测试改变方向。为了证明"没有东西在门禁这份名单"(也就是 issue 的前提),before / after 都跑了一遍:
pnpm exec vitest run scripts/ --maxWorkers=2Test Files 14 passed (14)/Tests 204 passed (204)pnpm docs:check-linksDocs links are valid.exit 0node scripts/check-control-bytes.mjsOK (scanned 3686 tracked text file(s); skipped 85 binary)git checkout origin/main -- <两个文件>还原)docs:check-links改前一并绿,正是本 issue 的前提得到确认:没有任何测试读这份枚举,所以它才能悄悄漂移三个 spec 的量而 CI 全程无感。
scripts/__tests__/ci-cd-pipeline-doc.test.ts钉的是这一页的别的性质(workflow 清单双向、ci.yml job 表、size 预算数字),不含 live-e2e 的 spec 名单 —— 改后它依然全绿,说明本改动没有踩到它任何一条断言(尤其是"页面不得出现不存在的*.yml文件名":本 PR 未新增任何.yml提及)。另外:YAML 改的是注释,仍用
yaml.safe_load实解了一遍确认结构未变 ——jobs: ['live-e2e'],steps: 15,continue-on-error: True,env三项原样。被改文件也做了超出门禁扫描面的控制字符自查(grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f]',无命中)。无 changeset
按仓库门禁的实际要求判断,而不是猜:
check-changeset-fixed.mjs只查fixed组成员资格,不检查 PR 是否附带 changeset(这一页第 68 行自己就是这么写的);check-changeset-no-major.mjs只在有 changeset 且标了major时报错。本改动是 CI 注释 + 文档页,不属于任何已发布包,对用户不可见。本分支基于
origin/mainf995a45,该提交上pnpm type-check:scripts已经是红的:即 #3504,止血 PR #3505 尚未合入。本 PR 一个
.ts文件都没碰,红的不是这次改动;#3505 落地后 update branch 即恢复。范围外发现(未改)
.changeset/live-e2e-lane.md:29是第三处出现三个 spec 名的地方:故意不动:它措辞是 "Allowlist start",描述的是这条 lane 落地当时的状态,是历史陈述而非对当前名单的断言,写下时正确、现在依然正确;而且 changeset 是某个 PR 的定稿记录,不该被后来的 PR 追改。已在给 PM 的报告里记一笔。
Generated by Claude Code