Skip to content

ci: remove the paused L0, smoke and quarantine gates - #5572

Merged
RealKai42 merged 2 commits into
mainfrom
ci/remove-l0-smoke-quarantine
Nov 26, 2026
Merged

RealKai42 merged 2 commits into
mainfrom
ci/remove-l0-smoke-quarantine

Conversation

@RealKai42

Copy link
Copy Markdown
Collaborator

Requirement or Bug

旧的各端 E2E 正在被 tests/e2e 替代。#5309 暂停旧门禁之后,主 CI 的 L0 汇总检查(L0 protected tests)一直以 if: ${{ !cancelled() && false }} 关着,E2E smoke 工作流只能手动触发,从那以后两者都没有运行过;但主 CI 的每个测试分片仍在记录 L0 结果、上传 l0-results-* 产物,没有任何作业读取。隔离清单的检查还在 pnpm lint 里跑,清单里的 9 条都在 2027-01-18 到期,到期后每个提交的 lint 都会红。

这个 PR 把 L0、smoke 和隔离清单三套机制连同它们的接线一起拆掉,仍在运行的用例都保留。「哪些测试必须过」以后通过「新 E2E 是否设为必选检查」重新决定,不在这个 PR 里做。

Bug Reproduction Steps

N/A

Root Cause

N/A

Code Changes

三套机制都是「点名」层:给已有测试打上标记,再用单独的检查核对被点名的测试存在、没被跳过、第一次就通过。拆掉点名层不删任何仍在运行的测试。8 条非 E2E 的 L0 用例去掉标题里的 [L0:…](其中两条还去掉 Vitest 的 smoke 标签)后,照常在主 CI 的测试分片里跑。它们所在的项目(agent-core-v2、kap-server、app-core、kimi-code-app、scenarios)都没有配置 Vitest 重试,所以「第一次就要过」这一条实际上不起作用:这些用例失败时分片本来就会红。点名检查真正额外提供的是「被点名的用例被删、被跳过或被改名时报出来」,这一项列在下面「会失去的保障」里。另有两个旧 E2E 文件,首轮用例已被新 E2E 覆盖,但原来 tests/AGENTS.md 规定带 L0 标记的用例要先改清单、在同一个 PR 里保留标记供 base 清单验收,所以一直留着;这次随清单一起删掉。

机制 删掉的文件 改掉的接线
L0 tests/protected.yaml、scripts/protected-smoke.ts 及其测试、scripts/vitest-l0-gate.mjs ci.yml 删 l0-gate 作业;测试分片去掉 L0 reporter、KIMI_L0_RESULTS 和 l0-results-* 上传;scripts/checks/registry.json 删 vitest-l0-gate.mjs 的登记和 ci.yml#l0-gate 的 fanIn;8 个测试标题去掉 [L0:…]
smoke .github/workflows/e2e-smoke.yml、scripts/vitest-smoke-reporter.mjs、apps/desktop/e2e/fixtures/smoke-reporter.ts 根 package.json 删 test:smoke;三个 vitest.config.ts 去掉 tags: [{ name: 'smoke' }],两个用例去掉 tags: ['smoke'];Playwright 配置去掉 smoke reporter 和 smoke project;run.mjs 去掉 --protected
隔离清单 tests/quarantine.yaml、scripts/checks/quarantine.mjs 及其测试 pnpm lint 去掉这一步,registry.json 删它的登记;Playwright 配置去掉 quarantine project 和按 @quarantine 排除的 grepInvert;run.mjs 去掉 --quarantine;9 个 spec 去掉 @quarantine 标签;desktop-e2e.yml 删 quarantine 作业和手动输入

说明文件跟着改:tests/AGENTS.md 删掉「已登记的 L0 用例」「从根目录运行现有用例」(只剩 smoke 命令和 L0 回归用例的单条命令)「Desktop 的临时隔离用例」三节,以及开头和冷恢复段落里提到 L0、smoke 的句子;tests/e2e/AGENTS.md 删掉「不在这里做的事」一节(两条都依赖这次删掉的机制)。.github/CODEOWNERS 删掉只为这些门禁加的 15 条。

关键决策

决策 选择 没选 理由
desktop-e2e.yml 只删 quarantine 作业、workflow_dispatch 的 quarantine 输入和开头注释里讲 L0 smoke 门禁的句子;registry.json 里它的 coversJobsExcept 去掉 quarantine。工作流仍能手动触发 整个工作流一起删 旧 Desktop 旅程还没迁完,删这个工作流放到旧目录清空之后的收尾 PR。它的自动触发现在是注释掉的;如果以后要恢复,原隔离的用例会让 main 变红并触发跟踪 issue,恢复前要先把它们迁走或删掉
Playwright 的 smoke project 删掉,其他 project 不再 dependencies: ['smoke'] 留作空分组 @smoke 只标在 core-turn.spec.ts 的第一条上,这个文件删掉后 project 是空的,依赖它不起任何门控作用
turns-transcript 对 gate-turn-engine 的依赖 去掉 保留 gate-turn-engine 只有 lifecycle-model-errors.spec.ts 一条,原来被 @quarantine 排除,这个 project 实际上是空的,turns-transcript 总会跑。这条用例已知会红,保留依赖的话它一红,turns-transcript 的 29 条就全部不跑。去掉依赖保持原来的实际行为
测试分片和 release.yml 里排除旧 TUI 的 --exclude 不动 一起去掉 去掉就等于让旧 TUI E2E 重新在 CI 跑;等 apps/kimi-code/test/e2e/tui 删掉时一起去掉
检查脚本测试里的 core-turn.spec.ts、vitest-l0-gate.mjs、tests/protected.yaml 等路径 不动 换成别的路径 它们只是路径分类的样本字符串,测试不读这些文件。select-vitest-targets.mjs 里 ^scripts/vitest- 这条规则现在匹配不到文件,`^tests/[^/]+.(?:md

阅读指南

  1. .github/workflows/ci.yml:分片的测试命令只剩 default 和 github-actions 两个 reporter,l0-gate 作业整段删除。
  2. apps/desktop/e2e/playwright.config.ts、apps/desktop/e2e/run.mjs:旧 Desktop 套件改完后的 project 结构和参数。
  3. .github/workflows/desktop-e2e.yml、scripts/checks/registry.json:手动工作流的最小改动和对应的接线登记。
  4. tests/AGENTS.md、tests/e2e/AGENTS.md:删掉的说明。

可以略读:整文件删除、8 个测试标题、9 个 @quarantine 标签、.github/CODEOWNERS,以及 node scripts/checks/legacy-e2e.mjs --update、node scripts/checks/test-doubles.mjs --update 降低的两份基线(只删了两个已删文件的条目)。

删测说明

删掉的用例 原来守什么 为什么删 现在由谁守
apps/desktop/e2e/core-turn.spec.ts › a first turn in a new workspace streams, finishes and survives a relaunch Desktop 新工作区里首问流式完成,重启后对话还在 已被新 E2E 覆盖 首轮:tests/e2e/scenarios/files/read-and-edit.spec.ts;回合进行中先显示部分回复:tests/e2e/scenarios/turn/stop-mid-turn.spec.ts;重启:tests/e2e/scenarios/conversation/continues-after-restart.spec.ts。三个场景都在 TUI、Web、Desktop、ACP 上跑。没有迁的:在应用里点「New project」建项目、再信任工作区这条路径(新 E2E 的 Desktop 驱动用 --workspace= 直接打开工作区),以及侧栏加载状态这类界面细节
apps/desktop/e2e/core-turn.spec.ts › a prompt submitted before the first project survives project creation and is sent after trust 还没有项目时提交的提示,在建项目、信任工作区之后才发出,而且不丢 不迁:低频;新 E2E 启动时就给定了工作区,不走建项目和信任 无
apps/desktop/e2e/core-turn.spec.ts › a prompt survives dismissing the sign-in prompt before the first session 第一个会话之前关掉登录提示,输入的提示不丢 同上 无
apps/kimi-code/test/e2e/tui/conversation/first-turn.test.ts › submits the first prompt from the terminal and displays the answer TUI 里键入首问、回车后显示回答 已被新 E2E 覆盖 tests/e2e/scenarios/files/read-and-edit.spec.ts 的 TUI 那一遍

会失去的保障

  • core-turn.spec.ts 后两条是这两个行为的最后一处覆盖:「没有项目时提交的提示在建项目、信任后发出」和「关掉登录提示后提示不丢」以后坏了,不会有测试报出来。第一条里「在应用里建项目、信任工作区」的路径也一样。请维护者在这里确认接受。
  • 被点名的用例被删、被跳过或被改名时,不再有专门的检查报出来。这个检查从 ci: temporarily pause previous e2e gates #5309 起已经停了,这一项和现状相比没有新的损失。
  • CODEOWNERS 里指向 7 个保留文件的条目也删了(三个 tests/scenarios 用例、app-core 回放、引擎首轮、playwright.config.ts、run.mjs)。这个路由今天还在起作用:改这些文件的 PR 以后不会自动请求三位维护者评审。这是相对现状的真实变化,维护者想保留的话只要把这几行加回去。

Behavior Changes and Affected Users

行为 之前 之后 谁依赖旧行为 退路
主 CI 测试分片的产物 每个分片用 vitest-l0-gate.mjs 记下全部用例结果,上传 l0-results-<n>(保留 3 天) 不再记录、不再上传;跑的用例和选测不变 无,没有作业读这些产物 不需要
L0 protected tests 作业 在 ci.yml 里,条件带 && false,从 #5309 起不运行 删除 无。main 的分支规则只要求 PR 和 1 个批准,没有必过的状态检查 不需要
E2E smoke 工作流、pnpm test:smoke 只能手动触发,#5309 之后没有运行记录 删除 想手动跑首轮 smoke 的维护者 直接跑对应文件,例如 pnpm exec vitest run --reporter=agent packages/agent-core-v2/test/integration/conversation/first-turn.test.ts tests/scenarios/conversation.test.ts;跨面的首轮跑 tests/e2e
pnpm lint 里的隔离检查 核对 tests/quarantine.yaml 和 @quarantine 标签;2027-01-18 之后每个提交都会失败 删除 无 不需要
手动运行旧 Desktop 套件(pnpm --filter kimi-code-app run e2e、e2e:headless,以及 desktop-e2e.yml 的分片) 默认排除 9 条 @quarantine 用例;先跑 smoke project,它失败时依赖它的 project 跳过;smoke reporter 在选中的 smoke 都没通过时让整次运行失败 9 条原隔离用例回到默认运行,已知会红,之后会迁到 tests/e2e 或删掉;没有 smoke 门控;turns-transcript 不再依赖 gate-turn-engine(原来是空的),原隔离的 lifecycle-model-errors 红了也不会让它跳过 手动跑旧套件的维护者 用 --grep-invert 或指定 spec 文件排除
run.mjs 的 --quarantine、--protected 被识别,设置 KIMI_E2E_QUARANTINE、KIMI_E2E_PROTECTED 不再识别,原样传给 Playwright,Playwright 报 unknown option 并退出 带这两个参数的手动命令 去掉这两个参数
desktop-e2e.yml 的手动触发 有 quarantine 布尔输入,勾上后另起一个只看结果的作业跑隔离用例 没有输入,也没有这个作业 手动触发这个工作流的维护者 默认的分片已经包含原隔离用例
8 条保留用例的标题和标签 标题以 [L0:<id>] 开头;其中两条带 Vitest 的 smoke 标签,可以用 --tagsFilter=smoke 选出 去掉前缀和标签,断言不变 按 -t 'L0:' 或 --tagsFilter=smoke 选测的本地命令 按文件或新标题选
.github/CODEOWNERS 15 条为 L0、smoke 门禁和首轮、回放、冷恢复用例自动请求三位维护者评审 删除,其中 8 条指向这次删掉的文件;保留 /.github/CODEOWNERS、/package.json、tests/e2e 和 prompt cache 相关的条目 改 tests/scenarios/{conversation,replay,cold-recovery}.test.ts、packages/app-core/test/replay/first-turn.test.ts、引擎首轮用例、apps/desktop/e2e/playwright.config.ts 和 run.mjs 的 PR,不再自动请求这三位评审 分支规则的 require_code_owner_review 是 false,不影响合并;需要时手动请求评审

产品代码、配置项、环境变量、KAP 契约文件都没有改动,CLI、Desktop、Web、VS Code、ACP 的用户没有可观测的变化,所以按 gen-changesets 的规则不写 changeset。

验证

本机 macOS 上运行:

  • pnpm lint:0 退出。其中 guards 报 21 个检查接线、1 个汇总任务;legacy-e2e 报 98 条用例、64 个文件;instructions 的引用全部可解析。
  • node --test 'scripts/checks/*.test.mjs':124 个通过。node --test scripts/select-vitest-targets.test.mjs:12 个通过。
  • pnpm exec vitest run --reporter=agent 跑改了标题的 7 个文件(packages/agent-core-v2/test/integration/conversation/first-turn.test.ts、packages/agent-core-v2/test/agent/fullCompaction/fullCompaction.test.ts、apps/desktop/tests/main/browser/browser-overlay.test.ts、packages/kap-server/test/apiSurface.test.ts、packages/app-core/test/replay/first-turn.test.ts、tests/scenarios/conversation.test.ts、tests/scenarios/replay.test.ts):219 个用例全部通过。
  • tests/scenarios/cold-recovery.test.ts:6 个用例全部通过。在这之前本机 1 分钟负载在 60 到 140 之间时跑了 3 次,每次有 1 到 5 条因为 KAP 子进程 30 秒内没输出就绪行而失败(stderr 为空);负载降到 20 以下后再跑,全部通过。这次只改了它的标题。
  • 类型检查:pnpm exec tsc --noEmit -p 跑 packages/agent-core-v2、packages/kap-server、tests/scenarios、apps/kimi-code,都通过;pnpm --filter kimi-code-app run typecheck(含 packages/app-* 和 apps/desktop/e2e)通过。
  • pnpm --filter kimi-code-app run e2e --no-build --list:列出 62 个文件里的 95 个用例,包括 9 条原隔离用例,没有 core-turn.spec.ts;按 project 分是 app-shell 53、approvals-state 11、gate-session-api 1、gate-turn-engine 1、turns-transcript 29。带 --quarantine 时 Playwright 报 error: unknown option '--quarantine' 退出。
  • 用 yaml 解析改过的 ci.yml 和 desktop-e2e.yml:作业分别是 build,test,test-standalone-suites,test-windows,lint,typecheck 和 plan,journeys,result,alert。本机没有 actionlint,没有跑。
  • rg 确认仓库里没有 [L0:、@quarantine、@smoke、test:smoke、KIMI_L0_RESULTS、KIMI_E2E_PROTECTED、KIMI_E2E_QUARANTINE 的残留;只剩检查脚本测试里作为路径样本的字符串。

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue (external PRs: issue must have a maintainer's /approve).
  • I have added tests that prove my feature works.
  • The behavior-change table above is complete, and every removed behavior or flipped default is named in the changeset and either has an escape hatch or was explicitly approved by a maintainer in this PR.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

The L0 gate in ci.yml has been switched off with `&& false` since the
legacy E2E entry points were paused (#5309), and the E2E smoke workflow
only runs on manual dispatch. The test shards still recorded L0 results
and uploaded them as artifacts that no job read. The quarantine check
still runs in `pnpm lint`, and all nine entries in tests/quarantine.yaml
expire on 2027-01-18, after which lint would fail on every commit.

- Delete tests/protected.yaml, scripts/protected-smoke.ts and its test,
  scripts/vitest-l0-gate.mjs, the l0-gate job, and the shard reporter,
  env and upload that fed it. Drop the `[L0:...]` prefixes from the
  eight kept tests; they keep running in the main CI shards as before.
- Delete the E2E smoke workflow, `pnpm test:smoke`,
  scripts/vitest-smoke-reporter.mjs, the Desktop smoke reporter, the
  Playwright `smoke` project and the dependencies on it, `--protected`
  in run.mjs, and the Vitest `smoke` tag from the three configs and the
  two tests that used it.
- Delete tests/quarantine.yaml, scripts/checks/quarantine.mjs and its
  test, its lint step and registry entry, the Desktop quarantine project
  and grepInvert, `--quarantine` in run.mjs, the quarantine job and
  input in desktop-e2e.yml, and the nine @quarantine tags. Those nine
  journeys now run in the default Desktop suite, which only runs by
  hand. turns-transcript no longer depends on gate-turn-engine, whose
  only journey used to be quarantined, so it still runs when that
  journey fails.
- Delete apps/desktop/e2e/core-turn.spec.ts and the TUI first-turn
  test. tests/e2e runs the first turn (files/read-and-edit) and the
  restart (conversation/continues-after-restart) on every surface. The
  other two core-turn cases, a prompt sent before the first project and
  a prompt kept after dismissing the sign-in prompt, lose their only
  coverage. Lower the legacy-e2e and test-doubles baselines.
- Remove the CODEOWNERS entries and guide sections that only existed
  for these gates.
@changeset-bot

changeset-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 80c28c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T16:30:40.809381Z 80c28c4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@pkg-pr-new

pkg-pr-new Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@80c28c4
npx https://pkg.pr.new/@moonshot-ai/kimi-code@80c28c4

commit: 80c28c4

…arantine

# Conflicts:
#	apps/desktop/e2e/lifecycle-restore.spec.ts
#	apps/desktop/e2e/settings-agent-defaults.spec.ts
#	apps/desktop/e2e/settings-appearance.spec.ts
#	scripts/checks/baselines/legacy-e2e.json
#	tests/quarantine.yaml
@RealKai42
RealKai42 merged commit 488dbc1 into main Nov 26, 2026
29 checks passed
@RealKai42
RealKai42 deleted the ci/remove-l0-smoke-quarantine branch November 26, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant