DeepSHPlugins
dsh-flakefinder 项目预览
GITHUB / COMMUNITY PROJECT

dsh-flakefinder

Ecosystem & DevelopmentJavaScriptMIT

Test-stability tools: repeatedly run vitest/jest/pytest/node:test suites, classify flaky cases, keep history and maintain a quarantine manifest.

2 StarsSTARDUSTLC666 Updated 2026-09-05
Open GitHub repository
dsh-flakefinder 项目预览

About this project

Chinese

Test-stability tools: repeatedly run vitest/jest/pytest/node:test suites, classify flaky cases, keep history and maintain a quarantine manifest.

English

Test-stability tools: repeatedly run vitest/jest/pytest/node:test suites, classify flaky cases, keep history and maintain a quarantine manifest.

Project details & listing signals

Snapshot 2026-09-11
Creator / organization
STARDUSTLC666
Repository
STARDUSTLC666/dsh-flakefinder
GitHub Stars
2
Forks
0
Programming language
JavaScript
License
MIT
Last push
2026-09-05
Manifest
Declaration found in the catalog

A public repository does not automatically permit commercial use. Check the project's license and compatibility. Manifests and catalog scores are not security certifications.

Catalog score

58/ 100
Maintenance activity
97
Documentation & practical information
100
Community interest
14
Installation signals
75
Project declarations
100

近 6 天仍在更新;README 含完整安装与使用说明;关注度尚低(2)。

Scores use five dimensions of the catalog snapshot. They are browsing aids, not hands-on reviews or security assessments.

Install & use

The respective GitHub repositories define project information and licensing.

dsh plugin --profile web add dsh-flakefinder

Copying a command does not execute it. Read the repository documentation and check requirements and licensing first.

Project screenshots

Repository README

GitHub 原文

Saved repository documentation. Its capture date was not recorded and it may differ from the catalog description. Check the current repository before installing.

Repository documentation is preserved in its original language.

dsh-flakefinder

让 agent 分清「代码坏了」还是「测试在抽风」。

DeepSeek Harness 测试稳定性插件:支持 vitest / jest / pytest / node:test,重复运行测试并识别 flaky 用例,历史留档、隔离清单、写操作审批门。零运行时依赖。

license stars

Awesome DSH Plugin

工具

工具作用写操作
flaky_detect重复运行测试 N 次,判定 stable-pass / stable-fail / flaky否(写历史)
flaky_history查询检测历史,按目标过滤否
flaky_report汇总隔离清单 + 历史,输出稳定性报告否
flaky_quarantine把 flaky 用例写入 .flakefinder.json 隔离清单是(审批门)
flaky_clear从隔离清单移除已恢复的用例是(审批门)

支持框架:

  • vitest:读取 node_modules/vitest/vitest.mjs,使用 JSON reporter
  • jest:读取 node_modules/jest/bin/jest.js,使用 --json --outputFile
  • pytest:python -m pytest --junitxml,解析 JUnit XML(支持 setup.cfg / pyproject / pytest.ini / tox.ini 探测与 XML 实体解码)
  • node:test:node --test --test-reporter=tap,解析 TAP(含 SKIP 指令归类)
  • framework: auto 按 vitest → jest → pytest → node:test 自动探测

兼容性

在 @deepseek-ai/[email protected] 源码模式下验证(2026-09-02)。遵循 cordis 组合包补丁模型(cordis.patch.yml + dsh.bundle.patch),运行时不 import 任何 @deepseek-ai/* 内部模块。

安装

dsh plugin --profile web add dsh-flakefinder

或手动安装后在 profile 的 cordis.patch.yml 插入:

- id: flakefinder
  name: 'dsh-flakefinder'
  config:
    defaultRuns: 5
    writeApproval: true

卸载

dsh plugin --profile web remove dsh-flakefinder

卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile cordis.patch.yml 中覆盖的插件行。

使用示例

用户:src/checkout.test.ts 最近老失败,帮我判断一下
Agent:
  flaky_detect(target="src/checkout.test.ts", runs=5)
  → 判定:flaky;3/5 通过,失败集中在 useFakeTimers 用例
  → flaky_quarantine(tests=["src/checkout.test.ts > 定时器恢复"], reason="定时器竞态")

配置

字段默认说明
defaultRuns5flaky_detect 默认重复次数(3-20)
maxRuns20单次允许的最大重复次数(3-50)
timeoutMs120000单轮测试运行超时
graceMs10000超时后宽限
writeApprovaltrue隔离清单写操作是否走审批门
dataDirDSH_HOME/.dsh-flakefinder历史存储目录
quarantineFile<cwd>/.flakefinder.json隔离清单路径
pythonPathDSH_FLAKEFINDER_PYTHON 或 python/python3pytest 使用的 Python 解释器

隔离清单格式

{
  "version": 1,
  "quarantined": [
    {
      "file": "src/checkout.test.ts",
      "name": "使用假定时器后恢复真实定时器",
      "reason": "定时器竞态,见 issue #12",
      "since": "2026-08-16T00:00:00.000Z"
    }
  ]
}

隔离清单只记录,不修改测试源码;agent 跑测试前应先查阅 flaky_report。

工程

  • Node >= 22.13,TypeScript,零运行时依赖
  • 测试进程走 DSH 官方 subprocess 服务,argv 数组、无 shell
  • 全量单测 40+:解析、判定、存储、审批门、pytest 计划、subprocess 超时、注册与 manifest
  • pnpm test:构建 + node --test

发布门禁

  1. pnpm test 全绿
  2. pnpm typecheck
  3. 危险模式扫描(eval / child_process / 密钥零容忍)
  4. 真实 profile 冒烟:全新临时 profile 安装插件 → 真 boot → stderr 零报错
  5. manifest 自检(bundle patch / exports / files 白名单)

License

MIT

Before you begin

Check the current repository for installation, compatible versions and licensing. Stars and catalog scores are snapshot-based browsing signals.

Installation & troubleshooting · 项目问题反馈

Related projects