DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
docs(testing): 收口插件文档残留缺陷并对齐 136/100 计数口径
hairyf8cc07d438b05
diff --git a/docs/specs/desktop.test.md b/docs/specs/desktop.test.mdindex 289a91f2..6ba9c70a 100644--- a/docs/specs/desktop.test.md+++ b/docs/specs/desktop.test.md@@ -103,7 +103,7 @@| 元素归属 | 锚点 | 说明 || --- | --- | --- || 桌面壳层 `src/**` | `data-testid` | **本规范域**。命名 `dsh-<业务域>-<元素名>`(全小写连字符,如 `dsh-shell-iframe`) |-| 插件包 `packages/*` | `data-dsh-<plugin>` 等 `data-dsh-*` | 归 [plugin.test.md](./plugin.test.md) §6。其中一部分 `data-dsh-*` 是**行为钩子**而非测试钩子(如 `packages/dsh-tauri-ui/src/client/obstructions.ts:88` 的 `attributeFilter` 按它过滤 DOM 变更),**不得**为测试改名 |+| 插件包 `packages/*` | `data-dsh-<plugin>` 等 `data-dsh-*` | 归 [plugin.test.md](./plugin.test.md) §6。其中一部分 `data-dsh-*` 是**行为钩子**而非测试钩子(如 `packages/dsh-tauri-ui/src/client/register/obstructions.ts:88` 的 `attributeFilter` 按它过滤 DOM 变更),**不得**为测试改名 || 内嵌 dsh 页面 | 稳定结构锚点(如挂载点 `#root`)、上游 `data-slot` / `role` | dsh 属上游产物,其内部 DOM 不受本仓库约束;帧内断言只认稳定锚点,并在用例文档的缺口小节登记 |* **维护原则**:字面量直接写入业务组件;跨用例复用的选择器常量统一收录于 `test/e2e/support/selectors.ts`;新增用例必须同步补全元素 `data-testid`。diff --git a/docs/specs/plugin.test.md b/docs/specs/plugin.test.mdindex 7d3c42d2..1478dd51 100644--- a/docs/specs/plugin.test.md+++ b/docs/specs/plugin.test.md@@ -135,7 +135,7 @@ docs/testing/plugins/<序号>-<主题>.md # 插件测试文档| 元素归属 | 锚点 | 说明 || --- | --- | --- |-| 插件包 `packages/*` | `data-dsh-<plugin>` 等 `data-dsh-*` | 插件自渲染 DOM 的挂载点。**部分 `data-dsh-*` 是行为钩子而非测试钩子**(如 `packages/dsh-tauri-ui/src/client/obstructions.ts:88` 的 `attributeFilter` 按它过滤 DOM 变更),**不得**为测试改名或增删 |+| 插件包 `packages/*` | `data-dsh-<plugin>` 等 `data-dsh-*` | 插件自渲染 DOM 的挂载点。**部分 `data-dsh-*` 是行为钩子而非测试钩子**(如 `packages/dsh-tauri-ui/src/client/register/obstructions.ts:88` 的 `attributeFilter` 按它过滤 DOM 变更),**不得**为测试改名或增删 || 桌面壳层 `src/**` | `data-testid` | 归 [desktop.test.md](./desktop.test.md) §5,命名 `dsh-<业务域>-<元素名>` || 内嵌 dsh 页面内部(设置面板、侧栏、tab、对话框、Rail 形态) | 上游稳定锚点:`data-slot` / `role` / 稳定的 `dsh`·`dshp-` 前缀锚点 | dsh 属上游产物,其内部结构不受本仓库约束;这类断言归 **L2 浏览器层**,并在文档缺口小节登记,不占 `desktop` 车道 || 客户端挂载证据(L2 浏览器层) | 同源嵌套 frame 内的 `data-dsh-*` 挂载点 + `pageerror` / 插件错误条为空 | 插件 client 入口有 `window.parent === window` 早退(`packages/dsh-tauri/src/client/apply.ts:29`、`packages/dsh-tauri-pet/src/client/index.ts:24`),必须在同源嵌入 frame 内断言;共享常量与编排见 `test/e2e/support/browser.ts` |@@ -163,19 +163,19 @@ docs/testing/plugins/<序号>-<主题>.md # 插件测试文档| 批次 | 主题 | `[Case ID]` | `[自动化] 是` | 车道 || --- | --- | --- | --- | --- || `01` | 编排骨架与共享路由契约 | 12 | 12 | `plugin` |-| `02` | `dsh-tauri-pet`(SSE → 客户端 → 桌面端窗口) | 14 | 13 | `plugin` 9 + `desktop` 4 |+| `02` | `dsh-tauri-pet`(SSE → 客户端 → 桌面端窗口) | 13 | 13 | `plugin` 9 + `desktop` 4 || `03` | `dsh-tauri-rightclick` | 12 | 5 | `plugin` || `04` | `dsh-tauri-session` | 13 | 9 | `plugin` |-| `05` | `dsh-tauri-worktree` | 11 | 7 | `plugin` |+| `05` | `dsh-tauri-worktree` | 16 | 11 | `plugin` 7 + L1 4 || `06` | `dsh-tauri-ui` | 12 | 6 | `plugin` || `07` | `dsh-tauri-panel-extension` | 23 | 19 | `plugin` || `08` | `dsh-tauri-panel-scheduler` | 15 | 11 | `plugin` || `09` | `dsh-tauri-turnrewind` | 7 | 3 | `plugin` || `10` | `dsh-tauri-model-config` | 10 | 8 | `plugin` || `11` | `dsh-tauri-connection` | 3 | 3 | `plugin` |-| 合计 | `01`–`11` 共 11 个用例文件 | 132 | 96 | `plugin` 92 + `desktop` 4 |+| 合计 | `01`–`11` 共 11 个用例文件 | 136 | 100 | `plugin` 92 + `desktop` 4(e2e 96)+ L1 4 |-**口径**:`[Case ID]` 是文档声明的用例条目总数;`[自动化] 是` 与 `it()` 两列**逐文件相等**(文档 ↔ 代码 1:1),逐文件明细见 `docs/testing/plugins/00-overview.md` §7.1 追踪矩阵。批次 `03`–`10` 原有的 `-L3-*` 条目已按「Tauri 原生产物」原则降级为 L2 浏览器断言并保留原编号与条数;只有批次 `02` 的 4 条留在 `desktop` 车道(跨文件例外见 §4)。+**口径**:`[Case ID]` 是文档声明的用例条目总数(按 `^[Case ID]` 字段行计);`[自动化] 是` 与代码一一对应——**L2/L3 层**与 e2e `it()` 逐文件相等(96 = `plugin` 92 + `desktop` 4),批次 `05` 另有 **4 条 L1 单元层**(`TC-WT-U-05-001`–`004`)由 `packages/dsh-tauri-worktree/src/client/components/mode-select.utils.test.ts` 覆盖、不占 e2e `it()`(该文件所在 `unit` project 17 例全绿),故 `05` 的 `[自动化] 是` = 11 = e2e 7 + L1 4。逐文件明细见 `docs/testing/plugins/00-overview.md` §7.1 追踪矩阵。批次 `03`–`10` 原有的 `-L3-*` 条目已按「Tauri 原生产物」原则降级为 L2 浏览器断言并保留原编号与条数;只有批次 `02` 的 4 条留在 `desktop` 车道(跨文件例外见 §4)。**本轮实测**:`plugin` 车道连续 5 次运行均 11 files / 92 tests 全绿。diff --git a/docs/testing/README.md b/docs/testing/README.mdindex 62b903b5..f0419b0f 100644--- a/docs/testing/README.md+++ b/docs/testing/README.md@@ -16,7 +16,7 @@| [`plugins/00-overview.md`](./plugins/00-overview.md) | 插件总览:分层策略、可立即运行的部分、追踪矩阵、缺口 || [`plugins/01-dsh-host-and-core-contract.md`](./plugins/01-dsh-host-and-core-contract.md) … [`11-dsh-tauri-connection.md`](./plugins/11-dsh-tauri-connection.md) | 插件用例(`01`–`11`,11 个文件),单文件即一个批次;`02` 的 4 条 L3 桌宠窗口用例落在 `desktop` 车道 |-**用例规模**(本轮整改后实测):`desktop` 车道 **2 个文件 / 5 条**——`test/e2e/desktop/boot.e2e.ts` 1 条启动冒烟 + `test/e2e/desktop/02-pet-window.e2e.ts` 4 条桌宠窗口;`plugin` 车道 **11 个文件 / 92 条**(连续 5 次运行全绿);插件用例文档合计 **132** 条 `[Case ID]`,其中 **96** 条 `[自动化] 是` 与代码 `it()` 逐文件 1:1(`plugin` 车道 92 + `desktop` 车道 4),其余为手工执行 / 待接线条目;`unit` 车道 **103 files / 981 tests**。每个 `00-overview.md` 只承载总览与矩阵,不含用例本体;逐文件明细见 [`plugins/00-overview.md`](./plugins/00-overview.md) §7.1 追踪矩阵。+**用例规模**(本轮整改后实测):`desktop` 车道 **2 个文件 / 5 条**——`test/e2e/desktop/boot.e2e.ts` 1 条启动冒烟 + `test/e2e/desktop/02-pet-window.e2e.ts` 4 条桌宠窗口;`plugin` 车道 **11 个文件 / 92 条**(连续 5 次运行全绿);插件用例文档合计 **136** 条 `[Case ID]`(按 `^[Case ID]` 字段行计),其中 **100** 条 `[自动化] 是`:e2e 层 **96** 条与代码 `it()` 逐文件 1:1(`plugin` 车道 92 + `desktop` 车道 4),另有批次 `05` 的 **4** 条 L1 单元层条目由 `packages/dsh-tauri-worktree/src/client/components/mode-select.utils.test.ts` 覆盖;其余为手工执行 / 待接线条目;`unit` 车道 **103 files / 981 tests**。每个 `00-overview.md` 只承载总览与矩阵,不含用例本体;逐文件明细见 [`plugins/00-overview.md`](./plugins/00-overview.md) §7.1 追踪矩阵。---diff --git a/docs/testing/history.md b/docs/testing/history.mdindex 512f9d89..bb802066 100644--- a/docs/testing/history.md+++ b/docs/testing/history.md@@ -41,7 +41,7 @@| 2026-09 | **`#648` 会话锁死回归与 L1 覆盖**:`worktree` 的 `isGit` 改为三态(`null` = 未知),`EMPTY_SESSION_STATE` 不再预置 `true`(`store/modules/worktree.utils.ts:5`、`store/modules/worktree.types.ts:5`);控件可见性与发送拦截收敛到同一条件 `isGit === true`(`components/mode-select.utils.ts:8`、`:13`,`components/mode-select.tsx:89`、`:220`),非 git / 未校准会话既不显示切换框也不吞发送事件;创建失败时 `mode` 回落 `local`(`components/mode-select.tsx:173`、`:181`),`surface.tsx:17` 让 `mode === 'local' && phase === 'error'` 仍渲染错误条,并补 `surfaceDismiss` 关闭按钮(`components/surface.tsx:59`、`client/locales/index.ts:14`),避免控件不可见时留下关不掉的错误条。`plugins/05-dsh-tauri-worktree.md` 新增 §3.1 四条 L1 用例(`TC-WT-U-05-001`–`004`,已接线)与 `TC-WT-C-05-004`(未接线),并补缺口 G-WT-5 || 2026-09 | 修复**安装路径含空格时内置插件安装失败**(issue #647):`dsh plugin` 自 `0.1.6-alpha.2` 起改经 execa 以 argv 数组启动 pnpm 并自行按 cmd 规则转义(`arguments/command-file.js`),桌面端预加的双引号因此原样进入 spec,pnpm 报 `ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER`、启动卡在 `INTERNAL_PLUGIN_INSTALL_FAILED`。`install/spec.rs` 新增 `joins_pnpm_args_in_shell` 与 `spec_argument`,按 `core::active_version` 门控引号化(`< 0.1.6-alpha.2` 且 Windows 才加引号;版本读不到 / 解析失败按新核心处理,macOS/Linux 恒不加,issue #104 行为不变),`install/mod.rs` 的 spec 循环改用 `spec_argument`;配套 Rust 单测 5 条(`spec::tests` 4 条:版本边界、argv 核心不加引号、老核心 Windows 加引号、非 Windows 恒不加;`win_spawn::tests::spaced_argument_round_trips_to_child_argv` 1 条:含空格 spec 经隐藏控制台命令行原样往返到 node argv)。用例文档同步登记 `plugins/00-overview.md` §8 缺口 G12 与 `docs/specs/agents.desktop.md` §6 || 2026-09 | **插件批次 `02`–`09` 的 L2 段落地并运行验证(插件车道 9 files / 55 tests 全绿)**:新增 `test/e2e/plugins/02`–`09` 共 8 个 L2 宿主路由文件与同名用例文档(`02` 扩充既有文件),合计接线 **43** 条新用例(`01` 的 12 条不变,累计 55 条)。编排侧把 `global-setup.ts` 的共享宿主从「`dsh-tauri`,`dsh-tauri-rightclick`」改为**默认挂载全部产品可见插件**,`02`–`09` 的 L2 段复用同一进程(一次全车道仅起 3 次宿主);`01` 的「未挂载插件 → 404」探针原用 `dsh-tauri-turnrewind`(该包已被 `09` 挂载),改用仓库内不存在的插件 id 并补断言「404 响应体不带插件领域文案」。各批文档同步:头部署名改真实路径(旧名 `open-routes`/`archive-routes`/`worktree-routes`/`resume-route`/`extension-routes`/`scheduler-routes`/`turnrewind-routes`.e2e.ts 作废)、`[自动化]` 填真实 `文件:行号`、`desktop` project「未配置(G4)」过时表述统一改为「待接线(L3 通道尚未接入)」。**实测修正**:`04` 的空归档集合清空(`/session/archive/clear`)状态码确为 500,但响应体是宿主未处理异常的标准载荷 `{status:500,unhandled:true,message:'HTTPError'}`,领域文案 `缺少 sessionIds` **不下发客户端**(根因 `packages/dsh-tauri-session/src/host/service/archive.ts:62`,记 G-SESS-4,疑似缺陷);`05` 的 `POST /checkouts` 未绑定失败体只有 `{error}` 无 `ok`(`checkouts/post.ts:16`,与 `delete.ts:12` 的 `{ok:false,error}` 不一致,文档预期按实测收紧);`07` 的 `GET /skills` **不受 scratch `DSH_HOME` 隔离**(读到运行机真实用户技能目录,记 G-EXT-4,E2E 隔离性缺口而非产品缺陷,故条数与内容不作断言),且 `POST /host/restart` 无 `Origin` 时未被上游连接门遮蔽、403 由插件自身给出(记 G-EXT-5);`08` 的 `-003` 三类缺参 `error` 文案按实测收紧为逐字相等。**按实测固化的疑似缺陷**(未改实现):`04` 空集合清空返回未处理异常载荷、`05` `DELETE` 缺参返回 200 幂等失败体(与 `session` 的缺参 400 风格不一致,G-WT-4)。**顺带修复**:`dsh-tauri-turnrewind` 的 `summary/get.ts:2`、`live/get.ts:2` 过期注释(把端点写作 `.../session/summary`、`.../session/live`,实际注册为 `/summary`、`/live`,G-REW-4);`02` 的两处 `test()` 别名与 `it()` 标题口径统一到文档(G-PET-4 消解)。`-C-*`(G2 未装 playwright)与 `-L3-*`(L3 通道尚未接入)保持未接线;`10` 整批待办 |-| 2026-09 | **插件批次 `10`–`11` 落地并运行验证(插件车道 11 files / 92 tests 全绿)**:新增 `test/e2e/plugins/10-dsh-tauri-model-config.e2e.ts`(8 例,`GET`/`PUT /config/editor`、`GET /endpoint/models`、`GET /presets`、`POST /config/open` 的响应形状与错误面)与 `test/e2e/plugins/11-dsh-tauri-connection.e2e.ts`(3 例,内嵌模式鉴权闸门覆写与 `<iframe>` reload 链路),配套用例文档 `10-dsh-tauri-model-config.md` / `11-dsh-tauri-connection.md`。实测:`GET /presets` 恰六字段且 `count=1574`,`?ns=nope` → 502,`?ns=` 空串 → 500 未处理载荷(登记为缺陷线索);`TC-MC-L2-10-002` 不可自动化,刻意不写 `it()`(G-MC-4/9)。**L3 收敛**:`03`–`10` 的 11 条 `-L3-*` 按「只有断言对象是 Tauri 原生产物才允许 L3」降级为浏览器断言并保留原编号与条数,仅批次 `02` 保留 4 条 L3 于 `test/e2e/desktop/02-pet-window.e2e.ts`(跨文件例外)。**文档↔代码一致性**:11 份用例文档 `[自动化] 是` 96 ↔ `it()` 96(逐文件相等),`[Case ID]` 合计 132;G2(未装 playwright)与 G4(`desktop` project 未配置)消解,新增 G10 跨源遮蔽、G11 依赖会话的浏览器用例无法真跑 |+| 2026-09 | **插件批次 `10`–`11` 落地并运行验证(插件车道 11 files / 92 tests 全绿)**:新增 `test/e2e/plugins/10-dsh-tauri-model-config.e2e.ts`(8 例,`GET`/`PUT /config/editor`、`GET /endpoint/models`、`GET /presets`、`POST /config/open` 的响应形状与错误面)与 `test/e2e/plugins/11-dsh-tauri-connection.e2e.ts`(3 例,内嵌模式鉴权闸门覆写与 `<iframe>` reload 链路),配套用例文档 `10-dsh-tauri-model-config.md` / `11-dsh-tauri-connection.md`。实测:`GET /presets` 恰六字段且 `count=1574`,`?ns=nope` → 502,`?ns=` 空串 → 500 未处理载荷(登记为缺陷线索);`TC-MC-L2-10-002` 不可自动化,刻意不写 `it()`(G-MC-4/9)。**L3 收敛**:`03`–`10` 的 11 条 `-L3-*` 按「只有断言对象是 Tauri 原生产物才允许 L3」降级为浏览器断言并保留原编号与条数,仅批次 `02` 保留 4 条 L3 于 `test/e2e/desktop/02-pet-window.e2e.ts`(跨文件例外)。**文档↔代码一致性**:11 份用例文档 `[自动化] 是` **100** ↔ 代码一一对应(e2e **96** = `plugin` 92 + `desktop` 4;另 4 条为批次 `05` 的 L1 单元层,由 `mode-select.utils.test.ts` 覆盖),`[Case ID]` 合计 136(按 `^[Case ID]` 字段行计);G2(未装 playwright)与 G4(`desktop` project 未配置)消解,新增 G10 跨源遮蔽、G11 依赖会话的浏览器用例无法真跑 || 2026-09 | **桌面车道下载缓存改为默认共享**:`test/e2e/support/desktop-host.ts` 的 `DSH_DOWNLOAD_CACHE_DIR` 由「本次运行独占空目录」改为默认 `$DSH_E2E_DOWNLOAD_CACHE_DIR`(缺省 `<os.tmpdir()>/dsh-e2e-download-cache`),已下好的 Node / dsh 核心不再每次重下;只有显式 `coldCache: true`(等价 `DSH_E2E_COLD_ASSEMBLY=1`)才退回独占空目录。`test/e2e/desktop/boot.e2e.ts` 显式 `coldCache: true`,以保持它「装配必然真的下载并落盘」的断言强度。文档同步:`docs/specs/desktop.test.md` §6/§6.1/§8.1、`docs/testing/desktop/00-overview.md` §3/§5、`docs/testing/desktop/01-boot.md` || 2026-09 | **测试体系整改收口(子设计 04 文档同步)**:`docs/specs/desktop.test.md` 与 `docs/specs/plugin.test.md` 按整改后事实重写——L3 准入原则(断言对象必须是 Tauri 原生产物)写入 `desktop.test.md` §1,`plugin.test.md` §3 改为 Playwright 库 API 驱动、§8 改为实际批次 `01`–`11`、§4/§6 补跨文件例外与按元素归属分流的选择器口径;`docs/testing/README.md` 索引补 `11-dsh-tauri-connection.md`、用例规模按实测重写、目录树删掉不存在的 `test/unit/` 并补 `test/e2e/support/browser.ts`、运行命令补 `-- --run` 提醒与正确的单文件位置参数、新增 §7 覆盖率;`docs/testing/desktop/**` 与 `progressive.md` §4(本子设计独占)按实测计数重写。详细分节见下 |@@ -53,7 +53,7 @@### 第 1 波:架构(子设计 01)-- **放弃 Vitest browser mode**:`@vitest/browser-webdriverio` / `@vitest/browser-playwright` 均不接入。插件层与桌面层都是 `environment: 'node'` + **驱动库 API**——插件车道用 Playwright 库 API(`import { chromium } from 'playwright'`,复用 `globalSetup` 起的真实 dsh 宿主与已换取的 Cookie),桌面车道用 WebdriverIO standalone session。证否依据见该子设计 §2:Tauri webview 的顶层文档就是应用自身,而 browser mode 需要自己的 orchestrator 作为顶层页面,二者不可兼得;wdio provider 的 `supportedBrowser` 不含 tauri/wry,也没有注入既有 session 的 API。+- **放弃 Vitest browser mode**(不接入任何 browser-mode 驱动 provider;证否依据见子设计 `01` §2):插件层与桌面层都是 `environment: 'node'` + **驱动库 API**——插件车道用 Playwright 库 API(`import { chromium } from 'playwright'`,复用 `globalSetup` 起的真实 dsh 宿主与已换取的 Cookie),桌面车道用 WebdriverIO standalone session。证否依据见该子设计 §2:Tauri webview 的顶层文档就是应用自身,而 browser mode 需要自己的 orchestrator 作为顶层页面,二者不可兼得;wdio provider 的 `supportedBrowser` 不含 tauri/wry,也没有注入既有 session 的 API。- `test/e2e/support/dsh-host.ts` 与 `test/e2e/support/desktop-host.ts` **保留未删**,`test/e2e/global-setup.ts` **未改名**。- 依赖:`playwright` 与 `@vitest/coverage-v8` 加入 `pnpm-workspace.yaml` 的 `catalogs.testing` 并在 `package.json` 引用(整改前 `require.resolve('playwright')` 为 `MODULE_NOT_FOUND`,浏览器用例根本 import 不到)。- CI:`Plugins E2E Tests` 作业增加 Chromium 安装(`pnpm exec playwright install --with-deps chromium`,二进制不带在 npm 包里);`Unit Tests` 作业前置 `pnpm build:plugins`(该产物缺失时相关用例 `skipIf` 跳过、在 CI 里从不执行)。@@ -68,22 +68,22 @@- 用例文档扩到 `01`–`11`:新增 `10-dsh-tauri-model-config.md`(8 例)与 `11-dsh-tauri-connection.md`(3 例),后者是本轮**唯一新建**的用例文档。- **L3 收敛**:只有断言对象是 Tauri 原生产物(独立 OS 窗口句柄、窗口几何夹紧、Tauri IPC 往返)才允许 L3;业务面板 / 侧栏 / tab / 对话框等 dsh 内部 DOM 一律用 L2 浏览器断言。实际落地:**仅批次 `02` 保留 4 条 L3**(`test/e2e/desktop/02-pet-window.e2e.ts`,跨文件例外),其余 `03`–`10` 的 11 条 `-L3-*` 降级为浏览器断言并保留原编号与条数。-- 文档 ↔ 代码一致性:11 份用例文档的 `[自动化] 是` **96** ↔ 代码 `it()` **96**(逐文件相等;`plugin` 车道 92 + `desktop` 车道 4),`[Case ID]` 合计 **132**。旧文档写的 107 / 108 / 122 均不成立。+- 文档 ↔ 代码一致性:11 份用例文档的 `[自动化] 是` **100** ↔ 代码一一对应(e2e **96** = `plugin` 车道 92 + `desktop` 车道 4;另 4 条为批次 `05` 的 L1 单元层,由 `mode-select.utils.test.ts` 覆盖),`[Case ID]` 合计 **136**(按 `^[Case ID]` 字段行计)。旧文档写的 107 / 108 / 122 均不成立。- 实测:插件车道连续 5 次运行均 **11 files / 92 tests** 全绿。### 第 3 波:文档同步(子设计 04)-- `docs/specs/desktop.test.md`:§1 增加**可机检的 L3 准入原则**(只有断言对象是 Tauri 原生产物才允许 L3);桌面端表述从「唯一一条用例」改为 `01-boot` + `02-pet-window` 两类;§3.2 补跨文件例外;§5 选择器改为按元素归属分流(壳层 `data-testid` / 插件包 `data-dsh-*` / 内嵌 dsh 上游锚点,并登记 `packages/dsh-tauri-ui/src/client/obstructions.ts:88` 的 `attributeFilter` 属行为钩子、不得为测试改名);§6/§6.1/§8.1 同步下载缓存与命令口径;§8.2 补 `exclude` 说明;新增 §8.4 覆盖率。+- `docs/specs/desktop.test.md`:§1 增加**可机检的 L3 准入原则**(只有断言对象是 Tauri 原生产物才允许 L3);桌面端表述从「唯一一条用例」改为 `01-boot` + `02-pet-window` 两类;§3.2 补跨文件例外;§5 选择器改为按元素归属分流(壳层 `data-testid` / 插件包 `data-dsh-*` / 内嵌 dsh 上游锚点,并登记 `packages/dsh-tauri-ui/src/client/register/obstructions.ts:88` 的 `attributeFilter` 属行为钩子、不得为测试改名);§6/§6.1/§8.1 同步下载缓存与命令口径;§8.2 补 `exclude` 说明;新增 §8.4 覆盖率。- `docs/specs/plugin.test.md`:§1 补 L3 准入原则与「只承接 Tauri 原生产物」的定位;§3 改为 Playwright **库 API**(删除已证否方案的描述);§4 补跨文件例外与 `browser.ts`;§6 选择器与禁止项改为按元素归属分流;§8 批次表重写为实际 `01`–`11`(含逐批用例数与实测);§9 补 `-- --run` 与位置参数口径。- 修掉子设计 04 §4 列出的 12 项缺陷:`合计 108`、`plugins/10-*.md` 的悬空引用与 `[自动化]` 矛盾、`plugins/04-*.md` 的行号偏移(+7)、`plugins/07-*.md` 的标题不一致、`plugins/00-overview.md` 的 G2 过期事实、两个 `00-overview.md` 的过期范围、`plugin.test.md` §8 的「批次 1–18」、单文件过滤的 `vitest ... -- <file>` 写法、缺 `-- --run` 提醒、选择器适用范围、跨文件例外。-- `docs/testing/README.md`:索引补 `11-dsh-tauri-connection.md`;用例规模按实测重写(`desktop` 2 files / 5 tests、`plugin` 11 files / 92 tests、`unit` 103 files / 981 tests、`[Case ID]` 132 / `[自动化] 是` 96);目录树删掉不存在的 `test/unit/`、补 `test/e2e/support/browser.ts`;§4 补 `-- --run` 提醒、正确的单文件位置参数与 `node node_modules/vitest/vitest.mjs run --project <lane>` 直跑写法;新增 §7 覆盖率。+- `docs/testing/README.md`:索引补 `11-dsh-tauri-connection.md`;用例规模按实测重写(`desktop` 2 files / 5 tests、`plugin` 11 files / 92 tests、`unit` 103 files / 981 tests、`[Case ID]` 136 / `[自动化] 是` 100(e2e 96 + L1 4));目录树删掉不存在的 `test/unit/`、补 `test/e2e/support/browser.ts`;§4 补 `-- --run` 提醒、正确的单文件位置参数与 `node node_modules/vitest/vitest.mjs run --project <lane>` 直跑写法;新增 §7 覆盖率。- 已证否 / 不存在的方案描述**直接删除**(不留「已废弃」注记堆积):`docs/testing/**` 与两个 `*.test.md` 内不再出现 Vitest browser mode 系列的方案描述;`archive/docs/testing/**` 一轮内不读取、不引用内容、不搬回。### 文档侧一致性核对(计数口径与输出,可复核)-- `[Case ID]` **字段行**:`rg --count-matches '^\[Case ID\]' docs/testing/plugins/` 逐文件 12/13/12/13/11/12/23/15/7/10/3,合计 **131**;追踪矩阵(`plugins/00-overview.md` §7.1)记 **132**,差额 1 处是 `plugins/02-dsh-tauri-pet.md:10` §4 正文里的引用(非用例条目)。-- `[自动化] 是`:`rg --count-matches '\[自动化\] 是' docs/testing/plugins/` 逐文件与对应 `it()` **逐文件相等**(`02` 为 13 = `plugin` 9 + `desktop` 4)。+- `[Case ID]` **字段行**:`rg --count-matches '^\[Case ID\]' docs/testing/plugins/` 逐文件 12/13/12/13/16/12/23/15/7/10/3,合计 **136**(追踪矩阵 `plugins/00-overview.md` §7.1 同值;`plugins/02-dsh-tauri-pet.md:10` §4 正文里的一次引用**不计入**条目)。口径:只数 `^[Case ID]` 字段行;批次 `05` 的 4 条 `-U-*` 是 L1 单元层条目,计入 `[Case ID]` 但不占 e2e `it()`。+- `[自动化] 是`:`rg --count-matches '\[自动化\] 是' docs/testing/plugins/` 逐文件 12/13/5/9/11/6/19/11/3/8/3,合计 **100** = e2e **96**(`02` 为 13 = `plugin` 9 + `desktop` 4;其余批次等于各自 e2e `it()`)+ 批次 `05` 的 **4** 条 L1(`mode-select.utils.test.ts`)。逐文件明细见 `plugins/00-overview.md` §7.1。- `it()` 总数:`rg -c '^\s*it\(' test/e2e/plugins/*.e2e.ts` 合计 **92**,加 `test/e2e/desktop/02-pet-window.e2e.ts` 的 **4** = **96**;`test/e2e/desktop/boot.e2e.ts` 另 **1** 条(`desktop` 车道合计 5)。- `[自动化] 是(<file>:<line>)` 指针体检:80 处指向 `it(` 所在行命中;4 处(`plugins/02-dsh-tauri-pet.md` → `test/e2e/desktop/02-pet-window.e2e.ts:139/154/164/180`)实际 `it(` 在 `:144/:159/:169/:185`,属待修的行号偏移。-- 废弃表述扫描:`rg -n '@vitest/browser|browser-webdriverio|browser-playwright|setup-desktop|setup-plugin' docs/` 在 `docs/testing/**` 与两个 `*.test.md` 内**零命中**,仅余两份整改 Spec(`docs/specs/09-21-*`)自身的「已放弃并说明原因」记录。-- 悬空引用扫描:`rg -n 'test/e2e/[A-Za-z0-9/_.-]+\.(ts|mjs)' docs/testing docs/specs` 命中项逐个核对存在性,`docs/testing/**` 与两个 `*.test.md` 内无指向不存在文件的引用。+- 废弃表述扫描:对「已放弃的 Vitest browser mode 驱动包名」与「已取消的 e2e setup 文件改名方案」做全 `docs/` 检索,命中的全部落在两份整改 Spec(`docs/specs/09-21-*`)自身的「已放弃并说明原因」记录里;`docs/testing/**` 与两个 `*.test.md` 内**零命中**。+- 悬空引用扫描:`rg -n 'test/e2e/[A-Za-z0-9/_.-]+\.(ts|mjs)' docs/testing docs/specs` 命中项逐个核对存在性——`docs/testing/**` 与两个 `*.test.md` 内**无活引用**;唯一命中是本文历史条目里对已删除 / 已归档文件的**删除记录**(`test/e2e/desktop/01-window-shell.e2e.ts`、`test/e2e/desktop/02-config-locale.e2e.ts`、`test/e2e/support/navbar-menu.ts`、`test/e2e/support/config-dialog.ts`),其余命中在 `docs/specs/09-21-*`(缺陷描述与已取消方案)。历史记录不改写。diff --git a/docs/testing/plugins/00-overview.md b/docs/testing/plugins/00-overview.mdindex 36cba03e..62f87488 100644--- a/docs/testing/plugins/00-overview.md+++ b/docs/testing/plugins/00-overview.md@@ -14,7 +14,7 @@| 层级 | 宿主 | 驱动方式 | 覆盖对象 || --- | --- | --- | --- |-| L2 插件宿主 E2E | 真实 `dsh web` 进程(+ 真实浏览器页面) | Vitest `plugin` project;HTTP 断言先行,浏览器断言待接线 | 宿主路由、客户端挂载点、崩溃防护 |+| L2 插件宿主 E2E | 真实 `dsh web` 进程(+ 真实浏览器页面) | Vitest `plugin` project(`environment: 'node'`);HTTP 断言与 Playwright 库 API 浏览器断言**均已接线** | 宿主路由、客户端挂载点、崩溃防护 || L3 桌面端宿主 E2E | 真实 Tauri 窗口(`deepseek-harness-desktop.exe`) | Vitest `desktop` project + WebdriverIO(内嵌 WebDriver server) | 依赖 Tauri 桥的插件与壳层集成 |- **纳入范围**:`packages/` 下 10 个产品可见插件、核心桥接包 `dsh-tauri`、编排骨架与共享路由契约。@@ -28,11 +28,11 @@| 来源 | 提供的规则 || --- | --- |-| `docs/specs/plugin.test.md` | L1/L2/L3 分层、批次 1–18 路线图、断言准则、环境变量表、L2 执行流程 |+| `docs/specs/plugin.test.md` | L1/L2/L3 分层、批次 `01`–`11` 路线图、断言准则、环境变量表、L2 执行流程 || `docs/specs/desktop.test.md` | 用例文档字段与优先级口径、`data-testid` 规范、端口/数据目录隔离、目录归属 || `docs/testing/progressive.md` | 单批单卡、状态定义与台账位置 || 源码事实 | `packages/*/src/**`、`src/**`、`src-tauri/src/**`、`test/e2e/support/**` |-| 现有测试 | `test/e2e/plugins/01-dsh-host-and-core-contract.e2e.ts`(编排骨架 + 共享路由契约 12 例已落地)、`test/e2e/plugins/02-dsh-tauri-pet.e2e.ts`(SSE 首帧 2 例已落地) |+| 现有测试 | `test/e2e/plugins/01`–`11` 共 **11 个文件**全部落地,`plugin` 车道实测 **11 files / 92 tests** 全绿(连续 5 次运行);批次 `02` 另有 4 条 Tauri 原生窗口用例在 `desktop` 车道(`test/e2e/desktop/02-pet-window.e2e.ts`),该文档合计 13 例 = `plugin` 9 + `desktop` 4;`desktop` 车道另含启动冒烟 `test/e2e/desktop/boot.e2e.ts` 1 例(合计 **2 files / 5 tests**) |**已记录的冲突与取舍**:@@ -127,19 +127,19 @@| 文件 | Case ID 前缀 | `[Case ID]` 条数 | `[自动化] 是` | `it()` | 层级分布 || --- | --- | --- | --- | --- | --- || `01-dsh-host-and-core-contract.md` | `TC-HOST-L2-01-*` / `TC-CORE-L2-01-*` | 12 | 12 | 12 | L2 |-| `02-dsh-tauri-pet.md` | `TC-PET-L2-02-*` / `-C-02-*` / `-L3-02-*` | 14 | 13 | 9 + 4(L3 段在 `desktop` 车道) | L2 → L3 |+| `02-dsh-tauri-pet.md` | `TC-PET-L2-02-*` / `-C-02-*` / `-L3-02-*` | 13 | 13 | 9 + 4(L3 段在 `desktop` 车道) | L2 → L3 || `03-dsh-tauri-rightclick.md` | `TC-RC-L2-03-*` / `-C-03-*` / `-L3-03-*` | 12 | 5 | 5 | L2 || `04-dsh-tauri-session.md` | `TC-SESS-L2-04-*` / `-C-04-*` / `-L3-04-*` | 13 | 9 | 9 | L2 |-| `05-dsh-tauri-worktree.md` | `TC-WT-L2-05-*` / `-C-05-*` / `-L3-05-*` | 11 | 7 | 7 | L2 |+| `05-dsh-tauri-worktree.md` | `TC-WT-L2-05-*` / `-U-05-*` / `-C-05-*` / `-L3-05-*` | 16 | 11 | 7 + 4(L1 单元层) | L2 + L1 || `06-dsh-tauri-ui.md` | `TC-UI-L2-06-*` / `-C-06-*` | 12 | 6 | 6 | L2 || `07-dsh-tauri-panel-extension.md` | `TC-EXT-L2-07-*` / `-C-07-*` / `-L3-07-*` | 23 | 19 | 19 | L2 || `08-dsh-tauri-panel-scheduler.md` | `TC-SCH-L2-08-*` / `-C-08-*` / `-L3-08-*` | 15 | 11 | 11 | L2 || `09-dsh-tauri-turnrewind.md` | `TC-REW-L2-09-*` / `-C-09-*` / `-L3-09-*` | 7 | 3 | 3 | L2 || `10-dsh-tauri-model-config.md` | `TC-MC-L2-10-*` / `-C-10-*` / `-L3-10-*` | 10 | 8 | 8 | L2 || `11-dsh-tauri-connection.md` | `TC-CONN-L2-11-*` | 3 | 3 | 3 | L2 |-| **合计** | — | **132** | **96** | **96** | — |+| **合计** | — | **136** | **100** | **96** | — |-> **口径**:`[Case ID]` 是文档声明的用例条目总数;`[自动化] 是` 与 `it()` 两列必须逐文件相等(文档↔代码 1:1)。本轮实测的 `files/tests` 计数以 `pnpm test:e2e:plugin -- --run` 的真实输出为准(见 §8 G11 的运行记录)。批次的 `-L3-*` 条目按「Tauri 原生产物」原则折算:仅批次 `02` 保留 4 条(落在 `desktop` 车道),其余批次的 `-L3-*` 条目已降级为浏览器断言并保留原编号与条数。+> **口径**:`[Case ID]` 是文档声明的用例条目总数,按 `^[Case ID]` **字段行**计数(正文里对该字段的引用不计入条目);`[自动化] 是` 与 `it()` 两列必须逐文件相等(文档↔代码 1:1)——**唯一例外是批次 `05`**:其 `[自动化] 是` 11 = e2e `it()` 7 + 4 条 L1 单元层(`TC-WT-U-05-001`–`004`,由 `packages/dsh-tauri-worktree/src/client/components/mode-select.utils.test.ts` 覆盖,不占 e2e `it()`),故选例文档的 e2e 合计仍是 96。本轮实测的 `files/tests` 计数以 `pnpm test:e2e:plugin -- --run` 的真实输出为准(见 §8 G11 的运行记录)。批次的 `-L3-*` 条目按「Tauri 原生产物」原则折算:仅批次 `02` 保留 4 条(落在 `desktop` 车道),其余批次的 `-L3-*` 条目已降级为浏览器断言并保留原编号与条数。### 7.2 关键来源 → 覆盖位置diff --git a/docs/testing/plugins/03-dsh-tauri-rightclick.md b/docs/testing/plugins/03-dsh-tauri-rightclick.mdindex d28d44bf..1a4a5e4b 100644--- a/docs/testing/plugins/03-dsh-tauri-rightclick.md+++ b/docs/testing/plugins/03-dsh-tauri-rightclick.md@@ -178,7 +178,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-rightclick/src/client/register/context-menu.ts:201`-[自动化] 待接线(L3 通道尚未接入本插件用例)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 应用与内置 DSH 界面就绪;至少一条会话行可见[测试数据] 在会话行上派发 `contextmenu`[测试步骤] 1. 建立 WebDriver 会话并切到 iframe。2. 派发右键。3. 查询菜单根与菜单项。4. Escape 关闭。@@ -191,7 +191,7 @@[层级] L3(真实 Tauri 窗口)[类型] 边界[追踪] `packages/dsh-tauri-rightclick/src/client/register/context-menu.ts:175`-[自动化] 待接线(L3 通道尚未接入本插件用例)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 同 TC-RC-L3-03-001[测试数据] `ArrowDown` ×2、`Home`、`End`、`Escape`[测试步骤] 1. 打开菜单。2. 逐键派发并读 `document.activeElement`。3. `Escape`。diff --git a/docs/testing/plugins/04-dsh-tauri-session.md b/docs/testing/plugins/04-dsh-tauri-session.mdindex 54d59dd8..f85ed58e 100644--- a/docs/testing/plugins/04-dsh-tauri-session.md+++ b/docs/testing/plugins/04-dsh-tauri-session.md@@ -188,7 +188,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-session/src/client/register/archive-section.ts:18`-[自动化] 待接线(L3 通道尚未接入)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 应用就绪;iframe 内 dsh 界面加载完成[测试数据] 无[测试步骤] 1. 建 WebDriver 会话。2. 切到 iframe 并打开设置。3. 定位 id `dsh-tauri-session-archive` 的分区并读其标题。@@ -201,7 +201,7 @@[层级] L3(真实 Tauri 窗口)[类型] 边界[追踪] `packages/dsh-tauri-session/src/client/register/workspace-patch.tsx:125`-[自动化] 待接线(L3 通道尚未接入)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 存在至少 1 个真实工作区;已打开其「…」菜单[测试数据] 点击 `[data-dsh-tauri-session-archive-item]`[测试步骤] 1. 记录点击前工作区数量。2. 点击归档项。3. 关闭弹出的确认对话框。4. 重新读取工作区数量。diff --git a/docs/testing/plugins/05-dsh-tauri-worktree.md b/docs/testing/plugins/05-dsh-tauri-worktree.mdindex c151cbed..e95adddc 100644--- a/docs/testing/plugins/05-dsh-tauri-worktree.md+++ b/docs/testing/plugins/05-dsh-tauri-worktree.md@@ -245,7 +245,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-worktree/src/client/components/surface.tsx:35`-[自动化] 待接线(L3 通道尚未接入;`desktop` project 本身已配置,`00-overview.md` G4 已消解)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言,`desktop` project 已配置)[前置条件] 应用就绪;存在活动会话[测试数据] 无[测试步骤] 1. 建 WebDriver 会话并切到 iframe。2. 查询 `[data-dsh-worktree-surface]`。3. 读其值。diff --git a/docs/testing/plugins/06-dsh-tauri-ui.md b/docs/testing/plugins/06-dsh-tauri-ui.mdindex 6a5bdd07..71bbf121 100644--- a/docs/testing/plugins/06-dsh-tauri-ui.md+++ b/docs/testing/plugins/06-dsh-tauri-ui.md@@ -181,7 +181,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-ui/src/client/components/sidebar.tsx:92`-[自动化] 待接线(L3 通道尚未接入;`00-overview.md` G4 已消解)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 应用与 iframe 内界面均已就绪;`dsh-tauri-ui` 已挂载(经 `get_dsh_plugins` 确认)[测试数据] 无[测试步骤] 1. 建 WebDriver 会话并切到 iframe。2. 点击 `.dshp-settings-trigger`。3. 查询 `[data-slot-sidebar="dsh-tauri-ui"]`。@@ -194,7 +194,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-ui/src/client/components/trigger.tsx:52`-[自动化] 待接线(L3 通道尚未接入)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 同 TC-UI-L3-06-001;壳层侧栏折叠按钮存在(依赖 `dsh-tauri` 已挂载)[测试数据] 无[测试步骤] 1. 折叠侧栏。2. 读触发器几何宽度与相关 class。diff --git a/docs/testing/plugins/07-dsh-tauri-panel-extension.md b/docs/testing/plugins/07-dsh-tauri-panel-extension.mdindex 19e0177d..d6edb4f5 100644--- a/docs/testing/plugins/07-dsh-tauri-panel-extension.md+++ b/docs/testing/plugins/07-dsh-tauri-panel-extension.md@@ -365,7 +365,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-panel-extension/src/client/register/extension-panel.tsx:39`-[自动化] 待接线(L3 通道尚未接入:需真实 Tauri 窗口并在内嵌 iframe 内驱动,`00-overview.md` G6;`desktop` project 已配置,见该文 G4)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言,需在内嵌 iframe 内驱动,见 `00-overview.md` G6)[前置条件] 应用就绪;`get_dsh_plugins` 返回中包含本插件[测试数据] 无[测试步骤] 1. 建 WebDriver 会话并切到 iframe。2. 打开扩展面板。3. 依次点击 `skills` 与 `mcp` 标签。diff --git a/docs/testing/plugins/08-dsh-tauri-panel-scheduler.md b/docs/testing/plugins/08-dsh-tauri-panel-scheduler.mdindex fb591324..a38c8ac6 100644--- a/docs/testing/plugins/08-dsh-tauri-panel-scheduler.md+++ b/docs/testing/plugins/08-dsh-tauri-panel-scheduler.md@@ -234,7 +234,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-panel-scheduler/src/client/register/panel.tsx:34`-[自动化] 待接线(L3 通道尚未接入;`00-overview.md` G4 已消解)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言)[前置条件] 应用就绪;`<DSH_E2E_HOME>/home/.dsh.dev` 下无同名任务[测试数据] 任务名 `e2e-l3-smoke`[测试步骤] 1. 建 WebDriver 会话并切到 iframe。2. 打开调度面板并新建任务。3. 关闭并重新打开面板。4. 直接以 HTTP 读 `GET /tasks`。diff --git a/docs/testing/plugins/09-dsh-tauri-turnrewind.md b/docs/testing/plugins/09-dsh-tauri-turnrewind.mdindex bb5b7068..3813e1b7 100644--- a/docs/testing/plugins/09-dsh-tauri-turnrewind.md+++ b/docs/testing/plugins/09-dsh-tauri-turnrewind.md@@ -119,7 +119,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-turnrewind/src/client/register/turn-tail.ts:25`-[自动化] 待接线(L3 通道尚未接入;`desktop` project 已配置,但本插件用例仍需真实 Tauri 窗口与回合数据)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言,`desktop` project 已配置)[前置条件] 应用就绪;工作区为 git 仓库顶层;已产生一个带文件改动的回合[测试数据] 无[测试步骤] 1. 建 WebDriver 会话并切到 iframe。2. 查询 `[data-turnrewind-card]`。3. 读卡片内的文件计数与 `GET /summary` 返回比对。diff --git a/docs/testing/plugins/10-dsh-tauri-model-config.md b/docs/testing/plugins/10-dsh-tauri-model-config.mdindex 6199895a..06fbd55b 100644--- a/docs/testing/plugins/10-dsh-tauri-model-config.md+++ b/docs/testing/plugins/10-dsh-tauri-model-config.md@@ -173,7 +173,7 @@[层级] L3(真实 Tauri 窗口)[类型] 正向[追踪] `packages/dsh-tauri-model-config/src/client/register/models.ts:64`-[自动化] 待接线(`desktop` project 未配置,`00-overview.md` G4)+[自动化] 待接线(L3 通道尚未接入;本条已按 L3 准入原则归入 L2 浏览器断言,`desktop` project 已配置,见 `00-overview.md` G4)[前置条件] 应用就绪;`<DSH_E2E_HOME>/home/.dsh.dev/settings.yaml` 存在(或允许首次生成)[测试数据] 无[测试步骤] 1. 建 WebDriver 会话并切到 iframe。2. 打开设置并进入模型分区。3. 查询模型卡片与页脚区域。diff --git a/docs/testing/progressive.md b/docs/testing/progressive.mdindex 535eb819..3d3893e1 100644--- a/docs/testing/progressive.md+++ b/docs/testing/progressive.md@@ -66,10 +66,10 @@| --- | --- | --- | --- | --- | --- | --- || 00 | 总览、前置与追踪矩阵 | `00-overview.md` | — | — | 已验证 | 不承载用例本体;已按当前实现刷新事实表、缺口与文件命名规则(测试文件与用例文档同名同序号)。G2(未装 playwright)与 G4(`desktop` project 未配置)均已消解,新增 G10 跨源遮蔽、G11 依赖会话的浏览器用例无法真跑。 || 01 | 编排骨架与共享路由契约 | `01-dsh-host-and-core-contract.md` | 12 | 12 | 已验证 | `test/e2e/plugins/01-dsh-host-and-core-contract.e2e.ts` 12 例全绿(编排骨架 6 + 共享路由契约 6);编排新增导出 `assertMountRegistered` / `scaffoldDshProfile`;**共享宿主默认挂载全部产品可见插件**,`02`–`09` 的 L2 段复用同一进程;跨源 403 期望值按实测修正(上游围栏 `forbidden`,路由层 `cross-origin-request` 在 L2 不可达,由 L1 覆盖)。 |-| 02 | `dsh-tauri-pet`(SSE → 客户端 → 桌面端窗口) | `02-dsh-tauri-pet.md` | 14 | 13 | 已验证 | L2 段 5 例 + 浏览器段 4 例在 `test/e2e/plugins/02-dsh-tauri-pet.e2e.ts`(9 例),4 条 Tauri 原生窗口用例在 `test/e2e/desktop/02-pet-window.e2e.ts`(跨文件例外);实测第 2 帧心跳 15.01–15.02s、重连首个响应块即就绪。G-PET-9(侧栏入口 30s 内未翻转 `aria-pressed`)、G-PET-10(`set_pet_size` 越界返回 `PET_SIZE_OUT_OF_RANGE` 而非夹紧)记录在案。 |+| 02 | `dsh-tauri-pet`(SSE → 客户端 → 桌面端窗口) | `02-dsh-tauri-pet.md` | 13 | 13 | 已验证 | L2 段 5 例 + 浏览器段 4 例在 `test/e2e/plugins/02-dsh-tauri-pet.e2e.ts`(9 例),4 条 Tauri 原生窗口用例在 `test/e2e/desktop/02-pet-window.e2e.ts`(跨文件例外);实测第 2 帧心跳 15.01–15.02s、重连首个响应块即就绪。G-PET-9(侧栏入口 30s 内未翻转 `aria-pressed`)、G-PET-10(`set_pet_size` 越界返回 `PET_SIZE_OUT_OF_RANGE` 而非夹紧)记录在案。 || 03 | `dsh-tauri-rightclick` | `03-dsh-tauri-rightclick.md` | 12 | 5 | 已验证 | 5 例全绿(415 `unsupported-media-type` / `invalid-url` ×4 / `invalid-path` ×3 / `not-a-directory`);正向 200 会真的拉起本机浏览器,改为手工执行(G-RC-4)。 || 04 | `dsh-tauri-session` | `04-dsh-tauri-session.md` | 13 | 9 | 已验证 | 9 例全绿(归档清单形状、缺参 400、DELETE 也按 JSON 读体、空集合清空现状、workspace 缺 ids、open/path 领域错误、5 条注册行的 `allow` 矩阵);G-SESS-4 记录「空集合清空落到宿主未处理异常载荷 `{status:500,unhandled:true,message:'HTTPError'}`」为疑似缺陷。 |-| 05 | `dsh-tauri-worktree` | `05-dsh-tauri-worktree.md` | 11 | 7 | 已验证 | 7 例全绿(bindings 形状、未绑定回落 `local`、两处缺参 400、删除幂等失败体 200、checkouts 未绑定 400);`-006` 实测失败体只有 `{error}` 无 `ok`,文档预期按实测收紧;G-WT-4 固化为疑似缺陷、G-WT-5 记录「未创建目录」以回读 `GET /bindings` 为空替代。;新增 §3.1 四条 L1 用例(`TC-WT-U-05-001`–`004`)覆盖 `#648` 的「`isGit` 三态可见性 + 发送拦截同条件」回归,`unit` project 17 例全绿;`TC-WT-C-05-004`(创建失败回落 `local`)待接线 |+| 05 | `dsh-tauri-worktree` | `05-dsh-tauri-worktree.md` | 16 | 11 | 已验证 | e2e 7 例全绿(bindings 形状、未绑定回落 `local`、两处缺参 400、删除幂等失败体 200、checkouts 未绑定 400);`-006` 实测失败体只有 `{error}` 无 `ok`,文档预期按实测收紧;G-WT-4 固化为疑似缺陷、G-WT-5 记录「未创建目录」以回读 `GET /bindings` 为空替代;另新增 §3.1 四条 L1 用例(`TC-WT-U-05-001`–`004`)覆盖 `#648` 的「`isGit` 三态可见性 + 发送拦截同条件」回归(`packages/dsh-tauri-worktree/src/client/components/mode-select.utils.test.ts`,`unit` project 17 例全绿);`TC-WT-C-05-004`(创建失败回落 `local`)待接线 || 06 | `dsh-tauri-ui` | `06-dsh-tauri-ui.md` | 12 | 6 | 已验证 | 6 例全绿。原 §4 两条 `-L3-*`(设置侧栏、触发器、Rail 形态)断言对象是 dsh iframe 内部 DOM,按 L3 准入原则**降级为浏览器断言**并已落地(`TC-UI-C-06-001` / `-002`);运行中 / 已结束两条需真实会话,保持待补(G9 / G-UI-4)。 || 07 | `dsh-tauri-panel-extension` | `07-dsh-tauri-panel-extension.md` | 23 | 19 | 已验证 | 19 例全绿。G-EXT-4 记录 skills 发现**不受 scratch `DSH_HOME` 隔离**(读到运行机真实用户技能目录,属 E2E 隔离性缺口而非产品缺陷,故计数与内容不作断言);G-EXT-5 记录无 `Origin` 时连接门放行、403 由插件自身给出。 || 08 | `dsh-tauri-panel-scheduler` | `08-dsh-tauri-panel-scheduler.md` | 15 | 11 | 已验证 | 11 例全绿(空清单、创建 + `crons/tasks` 账本一致性 + 自清理、三类缺参 400、删除两类文案、`run` 未知任务、history 两类文案、`options` 形状);`-003` 预期按实测收紧为逐字文案;真实执行(`run_now`)需模型与网络,不在本批。 |@@ -77,7 +77,7 @@| 10 | `dsh-tauri-model-config` | `10-dsh-tauri-model-config.md` | 10 | 8 | 已验证 | `test/e2e/plugins/10-dsh-tauri-model-config.e2e.ts` 8 例全绿(`GET`/`PUT /config/editor`、`GET /endpoint/models`、`GET /presets`、`POST /config/open` 的响应形状与错误面);`GET /presets` 实测 `count=1574`、恰六字段,`?ns=nope` → 502,`?ns=` 空串 → 500 未处理载荷(登记为缺陷线索);`TC-MC-L2-10-002` 不可自动化,刻意不写 `it()`。 || 11 | `dsh-tauri-connection` | `11-dsh-tauri-connection.md` | 3 | 3 | 已验证 | `test/e2e/plugins/11-dsh-tauri-connection.e2e.ts` 3 例全绿(内嵌模式鉴权闸门覆写与 `<iframe>` reload 链路);与 `09` 一起构成本轮新增批次。 |-**合计**:`01`–`11` 共 **11 个用例文件**,`[Case ID]` **132** 条、`[自动化] 是` **96** 条;`[自动化] 是` 与代码 `it()` **逐文件相等**(96 = `plugin` 车道 92 + `desktop` 车道 4),其余为手工执行 / 待接线条目。逐文件明细见 [`plugins/00-overview.md`](./plugins/00-overview.md) §7.1 追踪矩阵。+**合计**:`01`–`11` 共 **11 个用例文件**,`[Case ID]` **136** 条(按 `^[Case ID]` 字段行计)、`[自动化] 是` **100** 条 = e2e **96**(`plugin` 车道 92 + `desktop` 车道 4)+ 批次 `05` 的 **4** 条 L1 单元层;L2/L3 层与代码 `it()` **逐文件相等**,其余为手工执行 / 待接线条目。逐文件明细见 [`plugins/00-overview.md`](./plugins/00-overview.md) §7.1 追踪矩阵。**本轮实测(插件车道)**:`node node_modules/vitest/vitest.mjs run --project plugin` = **11 files / 92 tests**,连续 5 次全绿。运行前必须已有 `pnpm build:plugins` 的产物,且本机需已装配可解析的 dsh 宿主;`plugin` project 的 `fileParallelism: false`,`globalSetup` 只起 3 次宿主。不要在交互式终端直接跑 `pnpm test:e2e:plugin`(脚本不带 `run`,会进 watch 挂住),用 `-- --run` 或 `node node_modules/vitest/vitest.mjs run --project plugin`。