dsh-test-drive 0.2.2 → 0.3.0

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/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-08-26
9
+
10
+ ### Added
11
+
12
+ - **JUnit output.** `renderDriveJUnitXml` / `renderMatrixJUnitXml` render a settled `DriveResult` / `MatrixRecord` as JUnit XML (one testcase per stage / per target; failing stages/targets become `<failure>` entries with XML-escaped text) for GitHub Actions test reporters.
13
+ - **Composite CI action.** A root [`action.yml`](action.yml) (`uses: PerryLink/dsh-test-drive@<version>`) drives a target in an isolated throwaway profile and emits the report pair CI consumes — Markdown (PR comment) and JUnit (status check) — via the `scripts/ci-report.mjs` converter. The isolation/ownership/cleanup red lines are untouched: the action only runs the existing pipeline and serializes its already-settled result.
14
+
15
+ ## [0.2.3] - 2026-08-22
16
+
17
+ ### Changed
18
+
19
+ - **DeepSeek Harness 0.1.1-rc.2 compatibility release.** All `@deepseek-ai/dsh-*` devDependencies pin the exact `0.1.1-rc.2` line; the workshop compatibility manifest, the compat workflow, and the five-language READMEs declare the rc.2 baseline (harness peerDependencies stay `>=0.1.0-rc.8 <0.2.0` — the plugin requires no rc.2-only API). Full gate (typecheck, typecheck:ci against the published rc.2 types, tests, build, verify, pack) and a real rc.2 headless smoke run pass.
20
+
8
21
  ## [0.2.2] - 2026-08-21
9
22
 
10
23
  ### Changed
package/README.es.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | Componente | Versión |
26
26
  |---|---|
27
- | DeepSeek Harness | `0.1.0-rc.8` (dependencias peer ≥ 0.1.0-rc.8) |
27
+ | DeepSeek Harness | `0.1.1-rc.2` (dependencias peer ≥ 0.1.0-rc.8) |
28
28
  | Node.js | `^22.19.0 \|\| >=24.0.0` |
29
29
  | Gestor de paquetes | `pnpm@11.7.0` |
30
30
  | Plataforma | Windows / macOS / Linux (complemento solo host) |
@@ -125,7 +125,7 @@ Devuelve un registro de ejecución (`tdr_...`), una matriz (`tdm_...`) o — sin
125
125
  "schema": "dsh-test-drive/v1",
126
126
  "run": { "runId": "tdr_9f2c...", "startedAt": "2026-08-16T00:00:00.000Z",
127
127
  "finishedAt": "2026-08-16T00:00:45.120Z", "durationMs": 45120,
128
- "harnessVersion": "0.1.0-rc.8", "pluginVersion": "0.1.0",
128
+ "harnessVersion": "0.1.1-rc.2", "pluginVersion": "0.1.0",
129
129
  "platform": "win32", "node": "v22.22.3" },
130
130
  "target": { "kind": "repo", "spec": "github:owner/dsh-click#abc123",
131
131
  "resolved": { "packageName": "dsh-click", "packageVersion": "0.1.0",
@@ -159,6 +159,10 @@ Devuelve un registro de ejecución (`tdr_...`), una matriz (`tdm_...`) o — sin
159
159
 
160
160
  Reglas de veredicto: fallo de instalación, de arranque (`smoke.fail`) o una etapa de capacidad que llegó a `not-registered`/`failed` ⇒ `fail`; instalación aprobada + parche efectivo + arranque limpio (`pass`/`boot-ok`) + desinstalación aprobada ⇒ `pass` (con nota de capacidad cuando `observed`); instalado pero sin alguna garantía posterior ⇒ `partial`; en otro caso ⇒ `unknown`.
161
161
 
162
+ ## CI (GitHub Actions)
163
+
164
+ El repositorio incluye un [`action.yml`](action.yml) composite reutilizable con `uses:` en cualquier repositorio de plugins: impulsa el objetivo en un perfil desechable y emite el par de informes que CI consume — Markdown (comentario de PR) y JUnit XML (verificación de estado). Entradas `target` (obligatorio)/`headless-task`/`dsh-version`; salidas `markdown`/`junit`/`verdict`. El drive no requiere clave; solo la aserción de capacidad necesita `DEEPSEEK_API_KEY` y queda `skipped` (nunca falla) sin ella.
165
+
162
166
  ## Permissions & data (Permisos y datos)
163
167
 
164
168
  - Solo se consumen servicios públicos: `ctx.subprocess`, `ctx.jobs`, `ctx.storageDomain`, `ctx.tools`, `ctx.commands`.
@@ -190,7 +194,7 @@ pnpm run typecheck && pnpm run typecheck:ci && pnpm test
190
194
  pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
191
195
  ```
192
196
 
193
- - `typecheck` resuelve `@deepseek-ai/*` a través del checkout local del harness; `typecheck:ci` comprueba contra los tipos publicados `0.1.0-rc.8`.
197
+ - `typecheck` resuelve `@deepseek-ai/*` a través del checkout local del harness; `typecheck:ci` comprueba contra los tipos publicados `0.1.1-rc.2`.
194
198
  - Las pruebas usan la pila real `Context`/`Session`/`ToolRuntime`/`LocalJobRegistry`/almacenamiento con un proveedor de subprocesos guionizado.
195
199
  - End-to-end con CLI real (requiere red + `dsh` en PATH): `DSH_TESTDRIVE_E2E=1 pnpm run test:e2e` — prueba el checkout de este propio paquete por el bucle real de instalación y arranque.
196
200
  - Lanzamiento: `node scripts/release.mjs <x.y.z>` (sube versión, sella CHANGELOG, repite la puerta, commit + tag; nunca hace push).
package/README.hi.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | घटक | संस्करण |
26
26
  |---|---|
27
- | DeepSeek Harness | `0.1.0-rc.8` (peer निर्भरताएँ ≥ 0.1.0-rc.8) |
27
+ | DeepSeek Harness | `0.1.1-rc.2` (peer निर्भरताएँ ≥ 0.1.0-rc.8) |
28
28
  | Node.js | `^22.19.0 \|\| >=24.0.0` |
29
29
  | पैकेज प्रबंधक | `pnpm@11.7.0` |
30
30
  | प्लेटफ़ॉर्म | Windows / macOS / Linux (केवल host प्लगइन) |
@@ -125,7 +125,7 @@ test_drive(target: string, headlessTask?: string, background?: boolean,
125
125
  "schema": "dsh-test-drive/v1",
126
126
  "run": { "runId": "tdr_9f2c...", "startedAt": "2026-08-16T00:00:00.000Z",
127
127
  "finishedAt": "2026-08-16T00:00:45.120Z", "durationMs": 45120,
128
- "harnessVersion": "0.1.0-rc.8", "pluginVersion": "0.1.0",
128
+ "harnessVersion": "0.1.1-rc.2", "pluginVersion": "0.1.0",
129
129
  "platform": "win32", "node": "v22.22.3" },
130
130
  "target": { "kind": "repo", "spec": "github:owner/dsh-click#abc123",
131
131
  "resolved": { "packageName": "dsh-click", "packageVersion": "0.1.0",
@@ -159,6 +159,10 @@ test_drive(target: string, headlessTask?: string, background?: boolean,
159
159
 
160
160
  निर्णय नियम: इंस्टॉल विफलता, बूट विफलता (`smoke.fail`) या `not-registered`/`failed` तक पहुँचा क्षमता चरण ⇒ `fail`; इंस्टॉल पास + पैच प्रभावी + साफ़ बूट (`pass`/`boot-ok`) + अनइंस्टॉल पास ⇒ `pass` (`observed` पर क्षमता नोट के साथ); इंस्टॉल हुआ पर बाद की कोई पुष्टि अधूरी ⇒ `partial`; अन्यथा ⇒ `unknown`।
161
161
 
162
+ ## CI (GitHub Actions)
163
+
164
+ रिपॉज़िटरी में एक composite [`action.yml`](action.yml) शामिल है जिसे किसी भी प्लगइन रिपॉ में `uses:` से दोबारा इस्तेमाल किया जा सकता है: यह लक्ष्य को एक अलग-थलग throwaway profile में चलाता है और CI द्वारा उपभोग किया जाने वाला रिपोर्ट जोड़ा — Markdown (PR कमेंट) और JUnit XML (स्टेटस चेक) — उत्सर्जित करता है। इनपुट `target` (आवश्यक)/`headless-task`/`dsh-version`; आउटपुट `markdown`/`junit`/`verdict`। ड्राइव को कुंजी की आवश्यकता नहीं है; केवल capability assertion को `DEEPSEEK_API_KEY` चाहिए और इसके बिना वह `skipped` (कभी असफल नहीं) रहती है।
165
+
162
166
  ## Permissions & data (अनुमतियाँ और डेटा)
163
167
 
164
168
  - केवल सार्वजनिक सेवाएँ उपभोग होती हैं: `ctx.subprocess`, `ctx.jobs`, `ctx.storageDomain`, `ctx.tools`, `ctx.commands`।
@@ -190,7 +194,7 @@ pnpm run typecheck && pnpm run typecheck:ci && pnpm test
190
194
  pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
191
195
  ```
192
196
 
193
- - `typecheck` स्थानीय harness चेकआउट से `@deepseek-ai/*` हल करता है; `typecheck:ci` प्रकाशित `0.1.0-rc.8` प्रकारों से जाँचता है।
197
+ - `typecheck` स्थानीय harness चेकआउट से `@deepseek-ai/*` हल करता है; `typecheck:ci` प्रकाशित `0.1.1-rc.2` प्रकारों से जाँचता है।
194
198
  - परीक्षण वास्तविक `Context`/`Session`/`ToolRuntime`/`LocalJobRegistry`/स्टोरेज स्टैक और एक स्क्रिप्टेड subprocess प्रदाता का उपयोग करते हैं।
195
199
  - वास्तविक-CLI एंड-टू-एंड (नेटवर्क + PATH पर `dsh` आवश्यक): `DSH_TESTDRIVE_E2E=1 pnpm run test:e2e` — इसी पैकेज के चेकआउट को वास्तविक इंस्टॉल-स्मोक लूप से परखता है।
196
200
  - रिलीज़: `node scripts/release.mjs <x.y.z>` (संस्करण बढ़ाता, CHANGELOG मुहर लगाता, द्वार फिर चलाता, commit + tag; कभी push नहीं)।
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  <div align="center">
2
2
 
3
3
  # 🧪 dsh-test-drive
4
+ [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-test-drive)
4
5
 
5
6
  **Isolated install-and-smoke test drives for DeepSeek Harness plugins.**
6
7
 
@@ -24,7 +25,7 @@
24
25
 
25
26
  | Component | Version |
26
27
  |---|---|
27
- | DeepSeek Harness | `0.1.0-rc.8` (peer dependencies ≥ 0.1.0-rc.8) |
28
+ | DeepSeek Harness | `0.1.1-rc.2` (peer dependencies ≥ 0.1.0-rc.8) |
28
29
  | Node.js | `^22.19.0 \|\| >=24.0.0` |
29
30
  | Package manager | `pnpm@11.7.0` |
30
31
  | Platform | Windows / macOS / Linux (host-only plugin) |
@@ -125,7 +126,7 @@ Returns a run record (`tdr_...`), a matrix (`tdm_...`), or — with no id — th
125
126
  "schema": "dsh-test-drive/v1",
126
127
  "run": { "runId": "tdr_9f2c...", "startedAt": "2026-08-16T00:00:00.000Z",
127
128
  "finishedAt": "2026-08-16T00:00:45.120Z", "durationMs": 45120,
128
- "harnessVersion": "0.1.0-rc.8", "pluginVersion": "0.1.0",
129
+ "harnessVersion": "0.1.1-rc.2", "pluginVersion": "0.1.0",
129
130
  "platform": "win32", "node": "v22.22.3" },
130
131
  "target": { "kind": "repo", "spec": "github:owner/dsh-click#abc123",
131
132
  "resolved": { "packageName": "dsh-click", "packageVersion": "0.1.0",
@@ -159,6 +160,36 @@ Returns a run record (`tdr_...`), a matrix (`tdm_...`), or — with no id — th
159
160
 
160
161
  Verdict rules: install failure, boot failure (`smoke.fail`), or a capability stage that reached `not-registered`/`failed` ⇒ `fail`; install pass + patch effective + clean boot (`pass`/`boot-ok`) + uninstall pass ⇒ `pass` (with a capability note when `observed`); anything installed but missing a later assurance ⇒ `partial`; otherwise `unknown`.
161
162
 
163
+ ## CI (GitHub Actions)
164
+
165
+ The repository ships a composite [`action.yml`](action.yml) that reuses `dsh-test-drive` in any plugin repo. It drives a target in an isolated throwaway profile and emits the report pair CI consumes: Markdown (PR comment) and JUnit XML (test reporter / status check).
166
+
167
+ ```yaml
168
+ # .github/workflows/test-drive.yml
169
+ name: test-drive
170
+ on: [pull_request, workflow_dispatch]
171
+ jobs:
172
+ smoke:
173
+ runs-on: ubuntu-latest
174
+ steps:
175
+ - uses: actions/checkout@v4
176
+ - name: Drive this plugin
177
+ id: drive
178
+ uses: PerryLink/dsh-test-drive@v0.2.4
179
+ with:
180
+ target: github:${{ github.repository }}#${{ github.sha }}
181
+ - name: Publish JUnit
182
+ uses: EnricoMi/publish-unit-test-result-action@v2
183
+ with:
184
+ files: ${{ steps.drive.outputs.junit }}
185
+ - name: Comment the report
186
+ run: cat "${{ steps.drive.outputs.markdown }}"
187
+ ```
188
+
189
+ `action.yml` inputs: `target` (required), `headless-task` (optional smoke task), `dsh-version` (the `dsh` CLI spec). Outputs: `markdown`, `junit` (report paths), and `verdict` (`pass`/`fail`/`partial`/`unknown`). The drive itself stays keyless (install → patch check → boot smoke → uninstall → cleanup); a capability assertion is the only stage that needs `DEEPSEEK_API_KEY`, and it is `skipped`, never failed, without one.
190
+
191
+ The same report pair is available programmatically: `renderDriveResult` / `renderMatrix` (Markdown) and `renderDriveJUnitXml` / `renderMatrixJUnitXml` (JUnit) are exported from the package root over a settled `DriveResult` or `MatrixRecord`.
192
+
162
193
  ## Permissions & data
163
194
 
164
195
  - Only public services are consumed: `ctx.subprocess`, `ctx.jobs`, `ctx.storageDomain`, `ctx.tools`, `ctx.commands`.
@@ -190,7 +221,7 @@ pnpm run typecheck && pnpm run typecheck:ci && pnpm test
190
221
  pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
191
222
  ```
192
223
 
193
- - `typecheck` resolves `@deepseek-ai/*` through the local harness checkout; `typecheck:ci` checks against the published `0.1.0-rc.8` types.
224
+ - `typecheck` resolves `@deepseek-ai/*` through the local harness checkout; `typecheck:ci` checks against the published `0.1.1-rc.2` types.
194
225
  - Tests use the real `Context`/`Session`/`ToolRuntime`/`LocalJobRegistry`/storage stack with a scripted subprocess provider.
195
226
  - Real-CLI end-to-end (requires network + `dsh` on PATH): `DSH_TESTDRIVE_E2E=1 pnpm run test:e2e` — drives this package's own checkout through the real install-smoke loop.
196
227
  - Release: `node scripts/release.mjs <x.y.z>` (bumps, stamps CHANGELOG, re-runs the gate, commits + tags; never pushes).
package/README.pt.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | Componente | Versão |
26
26
  |---|---|
27
- | DeepSeek Harness | `0.1.0-rc.8` (dependências peer ≥ 0.1.0-rc.8) |
27
+ | DeepSeek Harness | `0.1.1-rc.2` (dependências peer ≥ 0.1.0-rc.8) |
28
28
  | Node.js | `^22.19.0 \|\| >=24.0.0` |
29
29
  | Gerenciador de pacotes | `pnpm@11.7.0` |
30
30
  | Plataforma | Windows / macOS / Linux (plugin apenas host) |
@@ -125,7 +125,7 @@ Retorna um registro de execução (`tdr_...`), uma matriz (`tdm_...`) ou — sem
125
125
  "schema": "dsh-test-drive/v1",
126
126
  "run": { "runId": "tdr_9f2c...", "startedAt": "2026-08-16T00:00:00.000Z",
127
127
  "finishedAt": "2026-08-16T00:00:45.120Z", "durationMs": 45120,
128
- "harnessVersion": "0.1.0-rc.8", "pluginVersion": "0.1.0",
128
+ "harnessVersion": "0.1.1-rc.2", "pluginVersion": "0.1.0",
129
129
  "platform": "win32", "node": "v22.22.3" },
130
130
  "target": { "kind": "repo", "spec": "github:owner/dsh-click#abc123",
131
131
  "resolved": { "packageName": "dsh-click", "packageVersion": "0.1.0",
@@ -159,6 +159,10 @@ Retorna um registro de execução (`tdr_...`), uma matriz (`tdm_...`) ou — sem
159
159
 
160
160
  Regras de veredicto: falha de instalação, de inicialização (`smoke.fail`) ou uma etapa de capacidade que chegou a `not-registered`/`failed` ⇒ `fail`; instalação aprovada + patch efetivo + inicialização limpa (`pass`/`boot-ok`) + desinstalação aprovada ⇒ `pass` (com nota de capacidade quando `observed`); instalado mas sem alguma garantia posterior ⇒ `partial`; caso contrário ⇒ `unknown`.
161
161
 
162
+ ## CI (GitHub Actions)
163
+
164
+ O repositório inclui um [`action.yml`](action.yml) composite reutilizável com `uses:` em qualquer repositório de plugins: executa o alvo em um perfil descartável e emite o par de relatórios que a CI consome — Markdown (comentário de PR) e JUnit XML (verificação de status). Entradas `target` (obrigatório)/`headless-task`/`dsh-version`; saídas `markdown`/`junit`/`verdict`. O drive não requer chave; apenas a asserção de capacidade precisa de `DEEPSEEK_API_KEY` e fica `skipped` (nunca falha) sem ela.
165
+
162
166
  ## Permissions & data (Permissões e dados)
163
167
 
164
168
  - Apenas serviços públicos são consumidos: `ctx.subprocess`, `ctx.jobs`, `ctx.storageDomain`, `ctx.tools`, `ctx.commands`.
@@ -190,7 +194,7 @@ pnpm run typecheck && pnpm run typecheck:ci && pnpm test
190
194
  pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
191
195
  ```
192
196
 
193
- - `typecheck` resolve `@deepseek-ai/*` pelo checkout local do harness; `typecheck:ci` verifica contra os tipos publicados `0.1.0-rc.8`.
197
+ - `typecheck` resolve `@deepseek-ai/*` pelo checkout local do harness; `typecheck:ci` verifica contra os tipos publicados `0.1.1-rc.2`.
194
198
  - Os testes usam a pilha real `Context`/`Session`/`ToolRuntime`/`LocalJobRegistry`/armazenamento com um provedor de subprocesso roteirizado.
195
199
  - End-to-end com CLI real (requer rede + `dsh` no PATH): `DSH_TESTDRIVE_E2E=1 pnpm run test:e2e` — testa o checkout deste próprio pacote pelo loop real de instalação e inicialização.
196
200
  - Lançamento: `node scripts/release.mjs <x.y.z>` (sobe versão, carimba o CHANGELOG, repete a porta, commit + tag; nunca faz push).
package/README.zh.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | 组件 | 版本 |
26
26
  |---|---|
27
- | DeepSeek Harness | `0.1.0-rc.8`(peer 依赖 ≥ 0.1.0-rc.8) |
27
+ | DeepSeek Harness | `0.1.1-rc.2`(peer 依赖 ≥ 0.1.0-rc.8) |
28
28
  | Node.js | `^22.19.0 \|\| >=24.0.0` |
29
29
  | 包管理器 | `pnpm@11.7.0` |
30
30
  | 平台 | Windows / macOS / Linux(纯 host 插件) |
@@ -125,7 +125,7 @@ test_drive(target: string, headlessTask?: string, background?: boolean,
125
125
  "schema": "dsh-test-drive/v1",
126
126
  "run": { "runId": "tdr_9f2c...", "startedAt": "2026-08-16T00:00:00.000Z",
127
127
  "finishedAt": "2026-08-16T00:00:45.120Z", "durationMs": 45120,
128
- "harnessVersion": "0.1.0-rc.8", "pluginVersion": "0.1.0",
128
+ "harnessVersion": "0.1.1-rc.2", "pluginVersion": "0.1.0",
129
129
  "platform": "win32", "node": "v22.22.3" },
130
130
  "target": { "kind": "repo", "spec": "github:owner/dsh-click#abc123",
131
131
  "resolved": { "packageName": "dsh-click", "packageVersion": "0.1.0",
@@ -159,6 +159,10 @@ test_drive(target: string, headlessTask?: string, background?: boolean,
159
159
 
160
160
  判定规则:安装失败、启动失败(`smoke.fail`)或能力阶段到达 `not-registered`/`failed` ⇒ `fail`;安装通过 + patch 生效 + 启动干净(`pass`/`boot-ok`)+ 卸载通过 ⇒ `pass`(`observed` 时附能力说明);已安装但后续保证缺失 ⇒ `partial`;其余 ⇒ `unknown`。
161
161
 
162
+ ## CI (GitHub Actions)
163
+
164
+ 仓库内置一个 composite [`action.yml`](action.yml),可在任意插件仓库里 `uses:` 复用:它在一次性隔离 profile 里驱动目标,并输出 CI 消费的报告对 —— Markdown(PR 评论)与 JUnit XML(状态检查)。输入 `target`(必填)/`headless-task`/`dsh-version`;输出 `markdown`/`junit`/`verdict`。驱动本身无需密钥;只有 capability 断言需要 `DEEPSEEK_API_KEY`,缺省时该阶段 `skipped` 而非失败。
165
+
162
166
  ## Permissions & data(权限与数据)
163
167
 
164
168
  - 只消费公开服务:`ctx.subprocess`、`ctx.jobs`、`ctx.storageDomain`、`ctx.tools`、`ctx.commands`。
@@ -190,7 +194,7 @@ pnpm run typecheck && pnpm run typecheck:ci && pnpm test
190
194
  pnpm run build && pnpm run verify:self-contained && pnpm run verify:artifacts && pnpm pack
191
195
  ```
192
196
 
193
- - `typecheck` 经本地 harness checkout 解析 `@deepseek-ai/*`;`typecheck:ci` 对照已发布的 `0.1.0-rc.8` 类型检查。
197
+ - `typecheck` 经本地 harness checkout 解析 `@deepseek-ai/*`;`typecheck:ci` 对照已发布的 `0.1.1-rc.2` 类型检查。
194
198
  - 测试使用真实 `Context`/`Session`/`ToolRuntime`/`LocalJobRegistry`/storage 栈 + 脚本化 subprocess provider。
195
199
  - 真实 CLI 端到端(需网络 + PATH 上的 `dsh`):`DSH_TESTDRIVE_E2E=1 pnpm run test:e2e` —— 用真实安装冒烟循环实测本包自身 checkout。
196
200
  - 发布:`node scripts/release.mjs <x.y.z>`(升版本、CHANGELOG 落日期、重跑门禁、commit + tag;不 push)。
package/lib/index.js CHANGED
@@ -883,7 +883,7 @@ function sanitizeOutput(text, tempRoot, maxChars) {
883
883
  * The structured report records it as `run.pluginVersion`.
884
884
  * @module dsh-test-drive/version
885
885
  */
886
- const VERSION = "0.2.2";
886
+ const VERSION = "0.3.0";
887
887
  //#endregion
888
888
  //#region src/drive.ts
889
889
  /**
@@ -1714,6 +1714,90 @@ function renderMatrix(matrix) {
1714
1714
  }
1715
1715
  return lines.join("\n");
1716
1716
  }
1717
+ /** Escape text for safe embedding in a JUnit XML attribute or element body. */
1718
+ function escapeXml(text) {
1719
+ return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
1720
+ }
1721
+ /** Seconds with three decimals, for JUnit `time` attributes. */
1722
+ function seconds(ms) {
1723
+ return (ms / 1e3).toFixed(3);
1724
+ }
1725
+ /** Whether a stage/row verdict counts as a JUnit failure. */
1726
+ function isFailure(status) {
1727
+ return status === "fail" || status === "partial";
1728
+ }
1729
+ /**
1730
+ * Render one drive result as a JUnit XML `<testsuite>` (one `<testcase>` per
1731
+ * stage), consumable by GitHub Actions test reporters.
1732
+ * @param result - the complete drive result.
1733
+ * @returns the JUnit XML document.
1734
+ */
1735
+ function renderDriveJUnitXml(result) {
1736
+ const stages = [
1737
+ [
1738
+ "install",
1739
+ result.stages.install.status,
1740
+ result.stages.install.durationMs,
1741
+ result.stages.install.summary
1742
+ ],
1743
+ [
1744
+ "config",
1745
+ result.stages.config.status,
1746
+ result.stages.config.durationMs,
1747
+ result.stages.config.summary
1748
+ ],
1749
+ [
1750
+ "smoke",
1751
+ result.stages.smoke.status,
1752
+ result.stages.smoke.durationMs,
1753
+ result.stages.smoke.summary
1754
+ ],
1755
+ [
1756
+ "uninstall",
1757
+ result.stages.uninstall.status,
1758
+ result.stages.uninstall.durationMs,
1759
+ result.stages.uninstall.summary
1760
+ ]
1761
+ ];
1762
+ if (result.stages.capability !== void 0) stages.push([
1763
+ "capability",
1764
+ result.stages.capability.status,
1765
+ result.stages.capability.durationMs,
1766
+ result.stages.capability.detail
1767
+ ]);
1768
+ const failures = stages.filter(([, status]) => isFailure(status));
1769
+ const cases = stages.map(([name, status, durationMs, summary]) => {
1770
+ const body = isFailure(status) ? `<failure message="${escapeXml(summary)}" type="${escapeXml(status)}"></failure>` : "";
1771
+ return ` <testcase classname="dsh-test-drive" name="${escapeXml(name)}" time="${seconds(durationMs)}">${body}</testcase>`;
1772
+ }).join("\n");
1773
+ return [
1774
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
1775
+ `<testsuite name="dsh-test-drive ${escapeXml(result.target.spec)}" tests="${stages.length}" failures="${failures.length}" errors="0" time="${seconds(result.run.durationMs)}">`,
1776
+ cases,
1777
+ "</testsuite>",
1778
+ ""
1779
+ ].join("\n");
1780
+ }
1781
+ /**
1782
+ * Render one batch matrix as a JUnit XML `<testsuite>` (one `<testcase>` per
1783
+ * target), consumable by GitHub Actions test reporters.
1784
+ * @param matrix - the aggregated batch matrix.
1785
+ * @returns the JUnit XML document.
1786
+ */
1787
+ function renderMatrixJUnitXml(matrix) {
1788
+ const cases = matrix.rows.map((row) => {
1789
+ const body = isFailure(row.verdict) ? `<failure message="${escapeXml(row.summary)}" type="${escapeXml(row.verdict)}"></failure>` : "";
1790
+ return ` <testcase classname="dsh-test-drive" name="${escapeXml(row.target)}" time="${seconds(row.durationMs)}">${body}</testcase>`;
1791
+ }).join("\n");
1792
+ const failures = matrix.rows.filter((row) => isFailure(row.verdict)).length;
1793
+ return [
1794
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
1795
+ `<testsuite name="dsh-test-drive matrix ${escapeXml(matrix.id)}" tests="${matrix.rows.length}" failures="${failures}" errors="0" time="${seconds(matrix.durationMs)}">`,
1796
+ cases,
1797
+ "</testsuite>",
1798
+ ""
1799
+ ].join("\n");
1800
+ }
1717
1801
  //#endregion
1718
1802
  //#region src/tools.ts
1719
1803
  /** Shared JSON-schema fragment for one stage record inside the drive result. */
@@ -2338,4 +2422,4 @@ function apply(ctx, config) {
2338
2422
  });
2339
2423
  }
2340
2424
  //#endregion
2341
- export { BOOT_FAILURE_MARKERS, Config, DOMAIN_NAME, DOMAIN_VERSION, DRIVE_BATCH_KIND, DriveResultSchema, DriveRunner, DshDriver, MATRIX_ID_PREFIX, MatrixRecordSchema, OWNED_PREFIX, QUARANTINE_PREFIX, REDACTED, RESULT_SCHEMA, RUN_ID_PREFIX, TEMPLATE_BUNDLES, TempWorkspaceRegistry, VERSION, anchorLocalTarget, apply, classifyTarget, driveDomainSpec, dumpMentionsPackage, formatDuration, freshId, hasBootFailure, inject, isGitLike, matrixSummary, name, parseDumpLayers, parseIgnoredBuildScript, parseNpmShim, parseTargets, progressLine, redactSecrets, redactTempPath, removeWithRetries, renderDriveResult, renderMatrix, resolveConfig, runBatch, sanitizeOutput, sanitizeTarget, startBatchJob, statusMark, tailText, totalsOf, verdictOf };
2425
+ export { BOOT_FAILURE_MARKERS, Config, DOMAIN_NAME, DOMAIN_VERSION, DRIVE_BATCH_KIND, DriveResultSchema, DriveRunner, DshDriver, MATRIX_ID_PREFIX, MatrixRecordSchema, OWNED_PREFIX, QUARANTINE_PREFIX, REDACTED, RESULT_SCHEMA, RUN_ID_PREFIX, TEMPLATE_BUNDLES, TempWorkspaceRegistry, VERSION, anchorLocalTarget, apply, classifyTarget, driveDomainSpec, dumpMentionsPackage, formatDuration, freshId, hasBootFailure, inject, isGitLike, matrixSummary, name, parseDumpLayers, parseIgnoredBuildScript, parseNpmShim, parseTargets, progressLine, redactSecrets, redactTempPath, removeWithRetries, renderDriveJUnitXml, renderDriveResult, renderMatrix, renderMatrixJUnitXml, resolveConfig, runBatch, sanitizeOutput, sanitizeTarget, startBatchJob, statusMark, tailText, totalsOf, verdictOf };
@@ -34,7 +34,7 @@ export type { ChildRunResult, InstalledPackage } from './driver.js';
34
34
  export { DriveRunner, freshId, progressLine, RUN_ID_PREFIX, MATRIX_ID_PREFIX } from './drive.js';
35
35
  export type { DriveDeps, DriveOptions } from './drive.js';
36
36
  export { DRIVE_BATCH_KIND, startBatchJob, runBatch, matrixSummary } from './batch.js';
37
- export { renderDriveResult, renderMatrix, statusMark, formatDuration } from './report.js';
37
+ export { renderDriveResult, renderMatrix, renderDriveJUnitXml, renderMatrixJUnitXml, statusMark, formatDuration } from './report.js';
38
38
  export { parseTargets } from './command.js';
39
39
  export { driveDomainSpec, DOMAIN_NAME, DOMAIN_VERSION } from './domain.js';
40
40
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAMlD,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAA;AAQnD,eAAO,MAAM,IAAI,mBAAmB,CAAA;AAEpC;;;;;GAKG;AACH,eAAO,MAAM,MAAM,UAA8C,CAAA;AAEjE,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACvG,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACxI,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjH,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAC1G,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,cAAc,EAAE,SAAS,EA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15,18 @@ export declare function formatDuration(ms: number): string;
15
15
  export declare function renderDriveResult(result: DriveResult): string;
16
16
  /** Render one batch matrix as a Markdown report. */
17
17
  export declare function renderMatrix(matrix: MatrixRecord): string;
18
+ /**
19
+ * Render one drive result as a JUnit XML `<testsuite>` (one `<testcase>` per
20
+ * stage), consumable by GitHub Actions test reporters.
21
+ * @param result - the complete drive result.
22
+ * @returns the JUnit XML document.
23
+ */
24
+ export declare function renderDriveJUnitXml(result: DriveResult): string;
25
+ /**
26
+ * Render one batch matrix as a JUnit XML `<testsuite>` (one `<testcase>` per
27
+ * target), consumable by GitHub Actions test reporters.
28
+ * @param matrix - the aggregated batch matrix.
29
+ * @returns the JUnit XML document.
30
+ */
31
+ export declare function renderMatrixJUnitXml(matrix: MatrixRecord): string;
18
32
  //# sourceMappingURL=report.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/report.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEtH,uDAAuD;AACvD,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAYtG;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CA8B7D;AAED,oDAAoD;AACpD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAsBzD"}
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/report.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEtH,uDAAuD;AACvD,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,GAAG,gBAAgB,GAAG,YAAY,GAAG,MAAM,CAYtG;AAED,+DAA+D;AAC/D,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAGjD;AAED,0DAA0D;AAC1D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CA8B7D;AAED,oDAAoD;AACpD,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAsBzD;AAsBD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAwB/D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAejE"}
@@ -4,5 +4,5 @@
4
4
  * The structured report records it as `run.pluginVersion`.
5
5
  * @module dsh-test-drive/version
6
6
  */
7
- export declare const VERSION = "0.2.2";
7
+ export declare const VERSION = "0.3.0";
8
8
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-test-drive",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "description": "Isolated install-and-smoke test drives for DeepSeek Harness plugins: installs a repo or npm package into a throwaway DSH_HOME profile, verifies the bundle patch layer and boot logs, records a structured pass/fail result matrix (JSON/Markdown) for scoring pipelines, and quarantines every temp directory it owns",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,7 +67,7 @@
67
67
  ],
68
68
  "compatibility": {
69
69
  "dshVersions": [
70
- "0.1.0-rc.8"
70
+ "0.1.1-rc.2"
71
71
  ]
72
72
  },
73
73
  "capability": {
@@ -116,18 +116,18 @@
116
116
  "@deepseek-ai/cordis": "^4.0.1",
117
117
  "@deepseek-ai/cordis-plugin-include": "1.0.6",
118
118
  "@deepseek-ai/cordis-plugin-loader": "1.0.2",
119
- "@deepseek-ai/dsh-agent": "0.1.0-rc.8",
120
- "@deepseek-ai/dsh-commands": "0.1.0-rc.8",
121
- "@deepseek-ai/dsh-jobs": "0.1.0-rc.8",
122
- "@deepseek-ai/dsh-jobs-local": "0.1.0-rc.8",
123
- "@deepseek-ai/dsh-llm": "0.1.0-rc.8",
124
- "@deepseek-ai/dsh-session": "0.1.0-rc.8",
125
- "@deepseek-ai/dsh-storage": "0.1.0-rc.8",
126
- "@deepseek-ai/dsh-storage-domain": "0.1.0-rc.8",
127
- "@deepseek-ai/dsh-subprocess": "0.1.0-rc.8",
128
- "@deepseek-ai/dsh-subprocess-local": "0.1.0-rc.8",
129
- "@deepseek-ai/dsh-system-prompt": "0.1.0-rc.8",
130
- "@deepseek-ai/dsh-tools": "0.1.0-rc.8",
119
+ "@deepseek-ai/dsh-agent": "0.1.1-rc.2",
120
+ "@deepseek-ai/dsh-commands": "0.1.1-rc.2",
121
+ "@deepseek-ai/dsh-jobs": "0.1.1-rc.2",
122
+ "@deepseek-ai/dsh-jobs-local": "0.1.1-rc.2",
123
+ "@deepseek-ai/dsh-llm": "0.1.1-rc.2",
124
+ "@deepseek-ai/dsh-session": "0.1.1-rc.2",
125
+ "@deepseek-ai/dsh-storage": "0.1.1-rc.2",
126
+ "@deepseek-ai/dsh-storage-domain": "0.1.1-rc.2",
127
+ "@deepseek-ai/dsh-subprocess": "0.1.1-rc.2",
128
+ "@deepseek-ai/dsh-subprocess-local": "0.1.1-rc.2",
129
+ "@deepseek-ai/dsh-system-prompt": "0.1.1-rc.2",
130
+ "@deepseek-ai/dsh-tools": "0.1.1-rc.2",
131
131
  "@deepseek-ai/schemastery": "^3.18.0",
132
132
  "@types/node": "^22.19.0",
133
133
  "@vitest/coverage-v8": "3.2.7",