test(mutation): 变异幸存者清剿专项——10 月大改区 6 模块回归缺口(tracking)

Aperta
#355 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

This is a tracking issue covering six modules, so start with one child task rather than the whole list, such as node/concurrent.py (53%, 187 survivors). Read the baseline and the per-module workflow in docs/mutation-testing.md §2.30 and §7.2, then triage each survivor as a real defect, an equivalent mutant, or a boundary case before adding assertions to test_<module>_mutations.py. Done means the module's score reaches its target in the checklist, with any real defects filed as separate issues.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

优先级 P1 · 依赖:无

基线 HEAD = cf13eefc(数据源:docs/mutation-testing.md §2.30,PR #354 已并 d1d4aef0;30 模块全量回归 2026-10-29~11-01,初筛 + 独立子进程 recheck 真实分,幸存合计 1862)

Summary

10 月引擎大改(三运行时对齐 / 台阶化 / #68 表达式两轮重写)落地后,杀灭电池未同步跟上——6 个核心模块的 mutation score 相对历史基线缺口 ≥15;另有 4 个模块(runner/context/parallel_executor/calculate)7 月只有 0-33% 粗扫档,本轮首次获得可信基线即垫底。幸存者簇 ≠ 全是测试欠账:recursive 侧同类战役曾清出真缺陷,先归类(真缺陷 → 独立修复单 / 等价 → 记档 / 边界 → 记档)再补测。

缺口榜(本轮 vs 历史基线,建议清剿序)

# 模块 本轮 历史基线 缺口 幸存
1 node/concurrent.py 53% 100% -47 187
2 core/flow.py 60% 100% -40 141
3 core/expression_parser.py 58% 83.6% -26 311
4 node/loop.py 74% 99.3% -25 66
5 dsl/builder.py 64% 84.1% -20 234
6 core/executor.py 83% 98.1% -15 44

首轮可信基线档(无历史锚,按绝对分排):core/runner.py 49%(全仓最低,271 幸存)、core/context.py 65%(103)、core/parallel_executor.py 80%(19)、node/calculate.py 94%(13)。

单项紧盯:core/async_utils.py 79%(历史 89.3%,-10)——全部 30 模块中唯一在两轮回归间仍在扩大的缺口。

建议与验收

  • 沿用 W1-W16 批次流水线:幸存者逐个归类 → 真缺陷走独立修复单 → 等价/边界记档 → 其余补 test_<module>_mutations.py 精准断言。
  • 单模块流程按 §7.2(收窄 only_mutate 必须同步收窄 test_selection,#125;跑前 rm -rf mutants .mutmut-cache;引用分必须 recheck 后)。
  • 大模块初筛用 INITIAL_TIMEOUT_S=10800 放行(策略 v2,§2.30 注记)。
验收清单(tracking)
  • concurrent 53→≥98(187 幸存清零或归类)
  • flow 60→≥98(141)
  • expression_parser 58→≥82(311)
  • builder 64→≥82(234)
  • loop 74→≥97(66)
  • executor 83→≥96(44)
  • runner 49 / context 65:首批补强(新基线档优先级次之)
  • async_utils 79→≥88(缺口收窄回历史水位)
  • sexpr 841 未定性点低负载对照已启动(11-01,结果回填 §2.30 注 1)

拆分建议

按模块拆子单,flow / concurrent 优先(生产核心 + 缺口最大);expression_parser 幸存量最大(311)但 #68 刚重写过,建议等其语义稳定一轮再清。单 PR 不过大,每模块独立 PR。

边界

  • 不改编译器/引擎语义;变异测试发现的疑似真缺陷走独立修复单,不在清剿 PR 里顺手改行为。
  • 等价变异(如 get(k, None) vs get(k,))记档不空耗补测(§7.4)。
  • runner/context 的 async 深路径按 §6 口径(recheck 独立子进程为准)。
Lingua principale
Python
Stelle
0
Fork
1
Merge medio
1h 29m
PR unite (30g)
15

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jeffkit/plaita

Tutte le issue di jeffkit/plaita

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.