Repository navigation
ci: remove the paused L0, smoke and quarantine gates - #5572
Conversation
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.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
…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
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 清单验收,所以一直留着;这次随清单一起删掉。tests/protected.yaml、scripts/protected-smoke.ts及其测试、scripts/vitest-l0-gate.mjsci.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:…].github/workflows/e2e-smoke.yml、scripts/vitest-smoke-reporter.mjs、apps/desktop/e2e/fixtures/smoke-reporter.tspackage.json删test:smoke;三个vitest.config.ts去掉tags: [{ name: 'smoke' }],两个用例去掉tags: ['smoke'];Playwright 配置去掉 smoke reporter 和smokeproject;run.mjs去掉--protectedtests/quarantine.yaml、scripts/checks/quarantine.mjs及其测试pnpm lint去掉这一步,registry.json删它的登记;Playwright 配置去掉quarantineproject 和按@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.ymlquarantine作业、workflow_dispatch的quarantine输入和开头注释里讲 L0 smoke 门禁的句子;registry.json里它的coversJobsExcept去掉quarantine。工作流仍能手动触发smokeprojectdependencies: ['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 的--excludeapps/kimi-code/test/e2e/tui删掉时一起去掉core-turn.spec.ts、vitest-l0-gate.mjs、tests/protected.yaml等路径select-vitest-targets.mjs里^scripts/vitest-这条规则现在匹配不到文件,`^tests/[^/]+.(?:md阅读指南
.github/workflows/ci.yml:分片的测试命令只剩default和github-actions两个 reporter,l0-gate作业整段删除。apps/desktop/e2e/playwright.config.ts、apps/desktop/e2e/run.mjs:旧 Desktop 套件改完后的 project 结构和参数。.github/workflows/desktop-e2e.yml、scripts/checks/registry.json:手动工作流的最小改动和对应的接线登记。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 relaunchtests/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 trustapps/desktop/e2e/core-turn.spec.ts›a prompt survives dismissing the sign-in prompt before the first sessionapps/kimi-code/test/e2e/tui/conversation/first-turn.test.ts›submits the first prompt from the terminal and displays the answertests/e2e/scenarios/files/read-and-edit.spec.ts的 TUI 那一遍会失去的保障
core-turn.spec.ts后两条是这两个行为的最后一处覆盖:「没有项目时提交的提示在建项目、信任后发出」和「关掉登录提示后提示不丢」以后坏了,不会有测试报出来。第一条里「在应用里建项目、信任工作区」的路径也一样。请维护者在这里确认接受。tests/scenarios用例、app-core 回放、引擎首轮、playwright.config.ts、run.mjs)。这个路由今天还在起作用:改这些文件的 PR 以后不会自动请求三位维护者评审。这是相对现状的真实变化,维护者想保留的话只要把这几行加回去。Behavior Changes and Affected Users
vitest-l0-gate.mjs记下全部用例结果,上传l0-results-<n>(保留 3 天)L0 protected tests作业ci.yml里,条件带&& false,从 #5309 起不运行E2E smoke工作流、pnpm test:smokepnpm exec vitest run --reporter=agent packages/agent-core-v2/test/integration/conversation/first-turn.test.ts tests/scenarios/conversation.test.ts;跨面的首轮跑tests/e2epnpm lint里的隔离检查tests/quarantine.yaml和@quarantine标签;2027-01-18 之后每个提交都会失败pnpm --filter kimi-code-app run e2e、e2e:headless,以及desktop-e2e.yml的分片)@quarantine用例;先跑smokeproject,它失败时依赖它的 project 跳过;smoke reporter 在选中的 smoke 都没通过时让整次运行失败tests/e2e或删掉;没有 smoke 门控;turns-transcript不再依赖gate-turn-engine(原来是空的),原隔离的lifecycle-model-errors红了也不会让它跳过--grep-invert或指定 spec 文件排除run.mjs的--quarantine、--protectedKIMI_E2E_QUARANTINE、KIMI_E2E_PROTECTEDunknown option并退出desktop-e2e.yml的手动触发quarantine布尔输入,勾上后另起一个只看结果的作业跑隔离用例[L0:<id>]开头;其中两条带 Vitest 的smoke标签,可以用--tagsFilter=smoke选出-t 'L0:'或--tagsFilter=smoke选测的本地命令.github/CODEOWNERS/.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-shell53、approvals-state11、gate-session-api1、gate-turn-engine1、turns-transcript29。带--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
/approve).gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.