Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

test(cli): make the telemetry mutation run and the test suite faster without weakening them

未关闭
#1,036 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
43/100
Issue 类型
重构
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
ci-cd, testing-qa

调研方向

Start with the telemetry Stryker configuration and Vitest project and test ordering, then inspect tests/e2e/telemetry-report.e2e.test.ts and the golden-cell capture tests. Measure the full mutation run and pnpm test before changes; trace why static mutants run without tests. Done means timings are recorded, CI and mutation shards are green, and the mutation score is unchanged or every difference is explained without any previously killed mutant surviving.

由索引模型根据 Issue 内容生成。

描述

Problem

pnpm test:mutation:telemetry takes 62 min locally (4228 mutants) and dominates CI time; cd cli && pnpm test takes 39 s. Measured on next at 06dbb980:

  • Vitest runs the integration project before unit and the longest files first. Stryker stops a mutant at its first failing test, so most mutants run slow integration files before the unit test that kills them in milliseconds: 2321 of 3575 killed mutants were killed by an integration test although 2756 were also covered by a unit test.
  • 196 mutants time out. About 31 are real infinite loops; about 165 are slow kills (some are killed in 3 ms by a unit test run alone).
  • 330 static mutants (7.8%) use 60.5% of all test runs.
  • pnpm test wall time is set by one file, tests/e2e/telemetry-report.e2e.test.ts (33 s).
Scope
  • A test order for mutation only: unit tests first, then shortest first.
  • Lower the Stryker timeout and set its concurrency once the order is fixed, measured.
  • Find why the static mutants run outside any test, and make them cheap without dropping them from the score.
  • Split the slowest e2e file so pnpm test runs it in parallel.
  • Capture each golden cell twice, not three times.
Acceptance criteria
  • Mutation score unchanged or each difference explained per mutant; no mutant that was killed before survives.
  • No test deleted or weakened (no lower numRuns, no dropped assertion).
  • Before and after timings of the full telemetry mutation run and of pnpm test, same machine.
  • CI green, mutation shards included.
Out of scope

Rewriting tests for speed, changing the mutation floor.

主要语言
TypeScript
星标
481
派生
45
平均合并
1 天 5 小时
30 天内合并 PR
81

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ai-driven-dev/framework 的其他 Issue

查看 ai-driven-dev/framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。