dsh-flakefinder 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.en.md CHANGED
@@ -22,7 +22,9 @@ Frameworks: vitest / jest / pytest (setup.cfg / pyproject / pytest.ini / tox.ini
22
22
 
23
23
  ## Compatibility
24
24
 
25
- Verified against source-run `@deepseek-ai/dsh@0.1.2-alpha.4` on 2026-09-02. Built for the cordis patch-bundle plugin model (`cordis.patch.yml` + `dsh.bundle.patch`). No runtime imports of `@deepseek-ai/*` internals.
25
+ Verified with official `@deepseek-ai/dsh@0.1.5-rc.1` and Node `24.16.0` on 2026-09-11: all 18 components load alongside Modlens, with passing tool-schema, skill-registration and offline read-only invocation checks. Uses the `cordis.patch.yml` + `dsh.bundle.patch` bundle model. Node requirements match this Harness release: 22.19 or later within 22.x, or 24 or later. Live external-service workflows require separate configuration and validation.
26
+
27
+ 2026-09-13 fix: retain the service receiver when calling `subprocess.spawn`, preventing failures caused by passing the method as an unbound callback. Verified with official `0.1.5-rc.1` and `0.1.5-rc.2` on Node `24.16.0`. `flaky_detect` runs three real Node test processes through the host subprocess service and returns `stable-pass`.
26
28
 
27
29
  ## Install
28
30
 
package/README.md CHANGED
@@ -28,7 +28,9 @@ DeepSeek Harness 测试稳定性插件:支持 vitest / jest / pytest / node:te
28
28
 
29
29
  ## 兼容性
30
30
 
31
- 在 `@deepseek-ai/dsh@0.1.2-alpha.4` 源码模式下验证(2026-09-02)。遵循 cordis 组合包补丁模型(`cordis.patch.yml` + `dsh.bundle.patch`),运行时不 import 任何 `@deepseek-ai/*` 内部模块。
31
+ 已在官方 `@deepseek-ai/dsh@0.1.5-rc.1`、Node `24.16.0` 上验证(2026-09-11):18 个组件与 Modlens 同载,工具 schema、技能注册及离线只读调用检查通过。采用 `cordis.patch.yml` + `dsh.bundle.patch` 组合包模型。Node 要求与该版本 Harness 一致:22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。
32
+
33
+ 2026-09-13 修复:保留宿主 `subprocess.spawn` 的服务对象,避免方法独立传递后因 `this` 丢失而报错。已在官方 `0.1.5-rc.1` 和 `0.1.5-rc.2`、Node `24.16.0` 上验证。`flaky_detect` 已通过真实宿主进程服务连续运行三轮 Node 测试,正确返回 `stable-pass`。
32
34
 
33
35
  ## 安装
34
36
 
package/lib/index.js CHANGED
@@ -26,7 +26,7 @@ export function apply(ctx, config) {
26
26
  console.warn('[dsh-flakefinder] ' + (error instanceof Error ? error.message : String(error)));
27
27
  cfg = resolveConfig(null);
28
28
  }
29
- const runner = createSubprocessRunner(ctx.subprocess.spawn, cfg.graceMs, cfg.timeoutMs);
29
+ const runner = createSubprocessRunner((spec) => ctx.subprocess.spawn(spec), cfg.graceMs, cfg.timeoutMs);
30
30
  const store = createStore(cfg.dataDir, cfg.quarantineFile);
31
31
  const tools = buildFlakeTools(cfg, runner, store);
32
32
  const disposers = [];
package/lib/tools.js CHANGED
@@ -22,10 +22,6 @@ function compileParameters(spec) {
22
22
  node.description = prop.description;
23
23
  if (typeof prop?.items === 'string')
24
24
  node.items = { type: prop.items };
25
- if (prop?.minItems !== undefined)
26
- node.minItems = prop.minItems;
27
- if (prop?.maxItems !== undefined)
28
- node.maxItems = prop.maxItems;
29
25
  properties[key] = node;
30
26
  }
31
27
  return { type: 'object', properties, ...(required.length > 0 ? { required } : {}) };
@@ -200,7 +196,7 @@ export function buildFlakeTools(cfg, runner, store) {
200
196
  name: 'flaky_quarantine',
201
197
  description: '把确认的 flaky 用例写入项目根 .flakefinder.json 隔离清单(不修改测试源码)。需要 flaky_detect 判定为 flaky 后再使用。',
202
198
  parameters: compileParameters({
203
- tests: { type: 'array', items: 'string', minItems: 1, maxItems: 100, required: true, description: '测试引用数组:文件路径,或 "文件路径 > 用例名"。' },
199
+ tests: { type: 'array', items: 'string', required: true, description: '1-100 条测试引用:文件路径,或 "文件路径 > 用例名"。' },
204
200
  reason: { type: 'string', required: true, description: '隔离原因(会写进清单,例如:定时器竞态,见 issue #12)。' },
205
201
  }),
206
202
  output: {
@@ -227,7 +223,7 @@ export function buildFlakeTools(cfg, runner, store) {
227
223
  name: 'flaky_clear',
228
224
  description: '从隔离清单移除已经恢复稳定的用例。建议先 flaky_detect 验证多轮全部通过后再清除。',
229
225
  parameters: compileParameters({
230
- tests: { type: 'array', items: 'string', minItems: 1, maxItems: 100, required: true, description: '测试引用数组:文件路径,或 "文件路径 > 用例名"。' },
226
+ tests: { type: 'array', items: 'string', required: true, description: '1-100 条测试引用:文件路径,或 "文件路径 > 用例名"。' },
231
227
  }),
232
228
  output: {
233
229
  schema: {
package/package.json CHANGED
@@ -1,60 +1,60 @@
1
- {
2
- "name": "dsh-flakefinder",
3
- "version": "0.3.1",
4
- "description": "DSH 测试稳定性插件:flaky_detect/history/quarantine/clear/report 五工具,支持 vitest/jest/pytest/node:test,重复运行测试并识别不稳定用例,JUnit/TAP 完整解析,JSON 历史与隔离清单,零运行时依赖。",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./cordis.patch.yml": "./cordis.patch.yml",
14
- "./package.json": "./package.json"
15
- },
16
- "files": [
17
- "lib",
18
- "cordis.patch.yml",
19
- "README.md",
20
- "README.en.md"
21
- ],
22
- "scripts": {
23
- "build": "tsc -p tsconfig.json",
24
- "typecheck": "tsc -p tsconfig.json --noEmit",
25
- "test": "pnpm run build && node --test \"test/*.test.mjs\"",
26
- "prepublishOnly": "pnpm run build"
27
- },
28
- "dsh": {
29
- "bundle": {
30
- "patch": "./cordis.patch.yml"
31
- }
32
- },
33
- "keywords": [
34
- "dsh",
35
- "deepseek-harness",
36
- "plugin",
37
- "testing",
38
- "flaky-test",
39
- "quality",
40
- "dsh-plugin"
41
- ],
42
- "license": "MIT",
43
- "engines": {
44
- "node": ">=22"
45
- },
46
- "devDependencies": {
47
- "@types/node": "^24.0.0",
48
- "typescript": "^5.6.0"
49
- },
50
- "repository": {
51
- "type": "git",
52
- "url": "git+https://github.com/STARDUSTLC666/dsh-flakefinder.git"
53
- },
54
- "bugs": {
55
- "url": "https://github.com/STARDUSTLC666/dsh-flakefinder/issues"
56
- },
57
- "homepage": "https://github.com/STARDUSTLC666/dsh-flakefinder#readme",
58
- "author": "stardustlc",
59
- "packageManager": "pnpm@11.7.0"
60
- }
1
+ {
2
+ "name": "dsh-flakefinder",
3
+ "version": "0.3.3",
4
+ "description": "DSH 测试稳定性插件:flaky_detect/history/quarantine/clear/report 五工具,支持 vitest/jest/pytest/node:test,重复运行测试并识别不稳定用例,JUnit/TAP 完整解析,JSON 历史与隔离清单,零运行时依赖。",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./cordis.patch.yml": "./cordis.patch.yml",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "lib",
18
+ "cordis.patch.yml",
19
+ "README.md",
20
+ "README.en.md"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.json",
24
+ "typecheck": "tsc -p tsconfig.json --noEmit",
25
+ "test": "pnpm run build && node --test \"test/*.test.mjs\"",
26
+ "prepublishOnly": "pnpm run build"
27
+ },
28
+ "dsh": {
29
+ "bundle": {
30
+ "patch": "./cordis.patch.yml"
31
+ }
32
+ },
33
+ "keywords": [
34
+ "dsh",
35
+ "deepseek-harness",
36
+ "plugin",
37
+ "testing",
38
+ "flaky-test",
39
+ "quality",
40
+ "dsh-plugin"
41
+ ],
42
+ "license": "MIT",
43
+ "engines": {
44
+ "node": "^22.19.0 || >=24.0.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^24.0.0",
48
+ "typescript": "^5.6.0"
49
+ },
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/STARDUSTLC666/dsh-flakefinder.git"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/STARDUSTLC666/dsh-flakefinder/issues"
56
+ },
57
+ "homepage": "https://github.com/STARDUSTLC666/dsh-flakefinder#readme",
58
+ "author": "stardustlc",
59
+ "packageManager": "pnpm@11.7.0"
60
+ }