Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
211e993e94 | ||
|
|
8ef40a2e61 | ||
|
|
46deb9cec8 | ||
|
|
488bf027cc |
No files matched your search
@@ -49,8 +49,9 @@ jobs:
|
||||
npm install --prefix /opt/ci-node --no-audit --no-fund node@24.11.1
|
||||
node --version
|
||||
npm ci --prefix integration/dsh --no-audit --no-fund
|
||||
- name: Read-only model availability (real Harness, no remote model calls)
|
||||
- name: Runtime and model availability (real Harness, no remote model calls)
|
||||
run: |
|
||||
node tools/verify_dsh_runtime.mjs
|
||||
node tools/verify_dsh_model_availability.mjs
|
||||
node --test tests/integration/test_dsh_standard_compat.mjs
|
||||
node tools/verify_dsh_incident_restart.mjs
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
# #33 六套固定试卷复测清单
|
||||
|
||||
逐项核对原始交付包 `03_试卷与实测` 下六份 `*_实测结果.xlsx` 的题号、结果和备注。下表覆盖原表 101 条未通过记录及卷二 A5 的自动化缺口。历史基线为卷一至六 83、71、49、75、56、39,总计 373/600。原记录把未执行项计作失败,候选包成绩须用逐题实测填写。[原始交付包](G:/dx33/acceptance/field.zip) · [工单 #33 第七、八节](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/issues/33)
|
||||
|
||||
## 复测入口
|
||||
|
||||
各卷从发行候选包的 `DxPartReplace.exe --data-root <独立目录>` 进入。**夹具**使用临时任务库、BOM、受控 Win32 窗口或模拟执行器,可先跑源码回归。**Windows 界面**使用候选包和临时任务数据。**独占 CAD**使用工程副本、可用 Mentor 和适用的中心库,回读与资源结论以真实运行证据为准。
|
||||
|
||||
| 原卷题号 | 候选包入口与环境 | 通过证据与失败归属 |
|
||||
| --- | --- | --- |
|
||||
| 一 A7、B7、C9、E5、E8 | Windows 界面。双击同根与异根,读不存在路径,扫描后移走工程,搜 `zzzz_no_match`,改窗口后重启。 | 保留启动与冲突日志、任务 ID、路径和建议、清除搜索前后截图及布局尺寸。偏离分别归 D1、D2、D4、D3。 |
|
||||
| 一 D7、D8、D9 | Windows 界面。人工打开任务操作或回收站,顺序执行移动、移入、恢复、彻底删除。 | 保存顺序与执行范围、恢复前后规则和证据、彻底删除后的记录及文件清单。控件仅在自动化中无法定位时记驱动限制,人工复现失败再记任务管理。 |
|
||||
| 二 A5、A7、B3、B5 | Windows 界面加 BOM 夹具。人工一次选 5 份,另一次慢导入后取消,再导入额外列和工程名路径不符的表。入口为批量 BOM 导入,可先跑 `test_bom_batch.py`、`test_bom_import_report.py`。 | 5 份清单、取消前后清单一致、未知列提示及不匹配工程零错绑。A5 原表通过,自动化多选失败归驱动,B3 归 D5,其余归导入生命周期或工程关联。 |
|
||||
| 二 C3、C8、C10、C11、D2、D3、D4、D8、D10、E2、E4、E5、E6、E7 | Windows 界面加规则与位号夹具。料号规则、采集、位号计划、切换任务、复制证据。先跑 `test_target_table.py` 等定向用例。C8 真实采集和 C10 实际库封装下拉安排独占 CAD/中心库核对。 | 对照过滤 UID、Cell 留空或非法校验、默认值与手改值、勾选范围、取消时原草稿、完整路径及缩放截图。分别归规则、采集/库、计划或界面,只在真实前置就绪后认定产品失败。 |
|
||||
| 三 A4、A5、A7、D5、E1 | 夹具与 Windows 界面。注入待清理状态,修改未保存计划及策略,取消/重复确认,注入失败和未命中,开始新一轮。可用 `test_service_plan_safety.py`、`test_task_archive.py`。 | 阻断时零派发,确认框策略与草稿一致,取消零副作用,失败未命中与保存明确区分,旧轮计划、命令、快照和日志可追溯。归资源闸门、计划或状态展示。 |
|
||||
| 三 A2、A3、B3、B4、B6、B7、B8、B9、B10、C5、C7、D6、E2、E3、E4、E6 | 独占 CAD。≥2 图页、≥5 替换行、≥10 位号,准备正常、缺料号或未命中、只读或锁定工程副本。走采集 → 单工程位号计划 → 核验并执行 → 新一轮。已准备 `ui-session.json` 的测试根可用 `tools/accept_packaged_ui.py --root <测试根> --stage execute --run-native` 辅助取证。 | 保存逐页位号、各 Value/Cell 策略、Value 位置样式、失败前后设计与回读、关窗退进程、轮次档案、暂停位置和重试次数。缺料输入按预期可控失败,误写或重放归执行/恢复,残留归 D7。 |
|
||||
| 四 A5、A7、C7、C8、D8 | 夹具先跑 8 项队列和逐任务 Value/NC,注入缺计划或资源占用,走失败项重试准备和诊断导出。入口 `tools/measure_task_queue.py --projects 8 --behavior failure_continue --output <目录>` 和候选包批次确认、重试及导出。 | 确认页策略正确,阻断时未启动 CAD,重试仅包含符合条件的项并重新确认,成功项操作 ID 无重放,导出 ZIP 可打开且脱敏。归批次预检、重试选择、D8 或诊断导出。 |
|
||||
| 四 B6、C1、D1、E2、E3 | 独占 CAD。固定卷 8 工程为成功 3、无需替换 1、目标不存在 1、库/身份阻断 1、缺计划 1、已满足 1。完成任务范围确认后无人点击,另用 100 工程跑工单门槛。 | 8/8 队列与任务结论,业务进展时间线核对 B6 的 300 秒要求,缺料号无部分写入且后续推进,收尾核对桌面和自有 PID。D1 原表引用的是 100 工程尝试,8 项需单独完成。归 D6 加载或写入状态、D7 物理清理、D8 后续调度。 |
|
||||
| 五 A5、A7、B5、B6、C4、D4、D5、D6、D7、E2、E4、E5、F1、F2、F3、F5、G1、G2、G3、G4 | Windows 界面加少量任务夹具。125% 缩放下用键盘走任务中心、表格、更多菜单、危险操作、未保存和嵌套弹窗,切换高对比后关闭重启。运行态先用 UI 夹具,也可独占小工程观察。 | 分辨率与缩放截图、表头滚动和就地校验、操作范围及默认按钮、键盘路径与焦点、设置前后对照。C4/D4/G1 对应 D2/D4/D3。菜单以人工结果判定,真实视觉与键盘差异归 UI/可访问性。 |
|
||||
| 六 A1、A2、A3、A5、A6、A7、A8、B7 | 先跑 `tools/measure_task_queue.py --behavior pause_resume --output <目录>`。独占 CAD 用暂停副本在保存/核验边界点击暂停,重复点击并等待,再继续原队列。 | 当前项收尾,下一项暂停期间无派发,复用原队列及授权,继续时已保存 ID 无重放,工程关闭及资源结论明确。异常归暂停边界、D7 清理或 D8 原队列续跑。 |
|
||||
| 六 C5、C6、C7、C8、C9、C10、D1、D2、D3、D4、D5、D6、D7、E2、E3、E4、E6 | 先跑 `test_startup_recovery.py`、`test_interrupted_queue_reconciliation.py`。独占 CAD 用强停、强杀两个不同副本,并用 `tools/probe_frozen_startup_recovery.py --source <副本> --library <库> --executable <候选exe> --output <目录> --failures 2` 辅助验证恢复。按原题执行两次中断与重启、实际打开复核、保存回读关闭、导出诊断、启动下一批。 | 保留中断点与原 queue_id、两次检查点、轮次/工程/UID/料号回读、备份和快照哈希、已保存操作 ID 及次数、UI/DB/日志对照、诊断 ZIP、桌面枚举及 PID 退出。未知写入保留待核验。错误按证据归恢复行为、D7 清理或 D8 续跑。 |
|
||||
|
||||
## 现场完成判据
|
||||
|
||||
工单要求**卷四和卷六各 ≥80,六套完整复跑总分 ≥500/600,六卷均无 P0 复发**。正常批次 `uncertain.flag=0`,结束时桌面与进程残留为 0。另跑 100 工程至队列终态并产出汇总,允许有证据的个别工程 blocked,需验证可续跑及已保存项不重放。逐题记录候选包版本或哈希、输入与环境、预期、实际、得分与证据位置。无法执行时记录缺少的前置,UIA 驱动限制和模型端点 503/504 记测试工具或环境。夹具结果供预验收使用,现场分数以固定卷实测为准。[工单 #33 第八节](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/issues/33)
|
||||
@@ -0,0 +1,36 @@
|
||||
# 工单 #33 根因分析与 1.3.3 本地预验收
|
||||
|
||||
现场基线为 Windows 便携版 1.3.2,修复基线为 main 的 46deb9c。原始交付包 SHA-256 为 `1ac99eac3cf79bbf1f011d1d5fe833e92b98fba2c01546b3cfaf55a90b82d5b3`,本地逐项复核包内清单的 4,469 个文件全部一致。[工单与附件](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/issues/33)
|
||||
|
||||
## 原始记录还原
|
||||
|
||||
1. 在 `05_实测证据/data_full132/task-queues/55e1032ac965453b8adf307da1400511.json` 中,100 项分为 6 completed、3 skipped、2 blocked、89 pending。任务列表中的 92 draft 包含了队列已跳过的三项。09:30:17 的监控显示第 11 项 BOB_Shield 在做替换前快照,09:32:18 显示资源待清理。
|
||||
2. 首批在第 10 项 BOB 的第 23 个操作和第 11 项 BOB_Shield 的第 18 个操作加载 `4885-S033D0-M220` 超时,各自的 native.json 均标记 preflight。第 10 项已写入 isolated_tasks,并实际派发了第 11 项。第 11 项仅写入 blocked。不能把整批归因于“遇到第一个失败就停”。另一个 91 项检查点记录了 WiFi 工程加载 `4885-S018D0-M220` 超时。工具报告的空窗口与这个超时属于不同 generation,尚不能认定窗口引起该次超时。
|
||||
3. 首批资源目录 `1d5d999ec63045b49661466928de9a01` 的 business-result.json 报 paused=true,current_task_id 对应 BOB_Shield。supervisor.json 的 finished 描述监督器退出。session.json 的最终状态是 isolated、blocking=false、mentor_released=true、desktop_released=false。任务隔离、队列暂停、监督器退出、资源是否可再租用分别有自己的证据。后续批次另有 blocking=true 的记录。现场没有足够证据指认持有桌面句柄的外部进程。
|
||||
|
||||
## 单项修复和判据
|
||||
|
||||
| 项 | 已定位的入口或失效条件 | 修改与本地复验 |
|
||||
|---|---|---|
|
||||
| D2 路径错误 | 工程根校验和扫描后登记有不同失败窗口,文件系统异常落到通用错误提示 | 分别注入目录不存在、选择了普通文件、扫描后移走、访问被拒;检查 GUI 中路径、码、修复建议,日志按同类输入统计兜底数并保留真正未知异常的诊断 |
|
||||
| D1 同根双开 | 单工程和队列执行锁在主窗口启动后才生效,两个 GUI 可先打开同一数据库并启动恢复 | 在首次打开数据库之前取得 data-root 级互斥;4 个进程同时打开同根,再试异根、helper 和持有者异常退出,检查持有者 PID、唤醒回执、应用启动次数以及原任务 ID |
|
||||
| D6 原生加载 | 需区分本次加载尚未点击写入与前序位号已暂存。当前预读不能证明整个工程仍无修改;列表控件刷新也可能令旧 HWND 失效 | 使用工程副本分别注入首次/热加载、列表重建、超时前已写/未写、不同 owner 的空弹窗。记录 attempt/generation、写前标记、前后属性、关闭与保存回执。仅在本项未写且身份可证时有限重试;写入可能性跨重启必须保留 |
|
||||
| D7 资源收尾 | 一条历史隔离回执已经可以不拦下一批;同名桌面、租约归还及对象物理消失有不同寿命 | 对照正常关闭、带窗口的自有 writer、仅有外部 OpenDesktop 句柄、证据缺失四组。按 PID 和创建时间确认自有进程退出、关闭自有句柄、重新枚举,再以有界退避重查。外部持有期间不得记 released;外部释放后应自动收敛。记录旧租约与新租约,禁止旧代清理新 owner |
|
||||
| D8 整批停顿 | 第一个不确定工程已被隔离,第二个未获得同等隔离结果;队列持久化暂停后,资源提示变成可用也未推进原队列 | 基于已验收的 D7 结果复验两次连续失败,区分同写源与无关工程、主动暂停与故障等待。只恢复原队列、原计划、未派发项;活 writer、未知归属或同写源仍隔离。比对操作 ID、保存次数、所有任务终态和 UI 文案 |
|
||||
| D5 BOM 列 | 表头映射只读取已知列;“失败 0 行”无法告知额外列未采用 | 实际导入现场 B3 工作簿,再导入带两列、近义列、缺列、重复列、公式和标准模板。额外列一次列出并提示近义列,核对预览、保存结果和持久化规则 |
|
||||
| D3 窗口 | ui-layout.ini 保存分栏和排序,主窗口仍用默认尺寸 | 从真实主窗口调整大小、位置和最大化后退出重启,测 125% 缩放与失去屏幕后的可见区域;损坏 ini 应可启动 |
|
||||
| D4 零结果 | TaskList._render 只更新列表和数值,缺少对空列表原因的呈现 | 用 Qt 键盘输入现场关键词 zzzz_no_match,切换筛选、组合搜索、回收站和空库,清除条件后验证原集合及选择;核对实际显示的关键词、筛选名与匹配数 |
|
||||
|
||||
## 分层复跑与交付口径
|
||||
|
||||
本机复跑以下两条基线命令,分别校验现场原件和生产调度器。第二条使用真实 SQLite、BOM 读取、任务队列及检查点,CAD 执行由夹具驱动。得到 99 completed、1 blocked、199 次操作,耗时 608.3 秒。这个单故障场景在修复前已能跑完,因此不能用它单独验收 D8。
|
||||
|
||||
```powershell
|
||||
python tools/inspect_issue33_field.py G:/dx33/acceptance/field.zip
|
||||
python tools/measure_task_queue.py --projects 100 --sheets 1 --rules 1 --behavior uncertain_stop --output build/issue33-baseline100
|
||||
```
|
||||
|
||||
- **本地预验收**使用独立 data-root 和工程副本。每项记录软件提交、输入、触发步骤、期望/实际结果、日志和可复跑命令。重启测试复用同一测试根。验证命令和结果随各单项 PR 提交。工单指定 D6、D7、D8 按序合入,不能用其他批次的通过报告替代当前批次。
|
||||
- **整批故障注入**先跑 8 项混合队列,再跑 100 工程固定顺序。对第 10、11 项连续注入现场两种失败,独立工程继续,另设一个共享 iCDB 的依赖工程以验证隔离。第 23 个位号前后分别中断,复用同一 queue_id 两次重启,逐项比较 saved 的操作 ID 与次数。未知写入不能计入成功。
|
||||
- **现场复测**用发行候选包与六套固定试卷逐题执行。卷六的暂停、重启、不重放和下一批启动优先。验收要求卷四、六各至少 80 分,总分至少 500/600,六卷无 P0 复发。正常批次检查 uncertain.flag=0,收尾核对桌面枚举与活进程。如仅运行夹具或源码,报告应标明该范围并单列真实 Mentor、现场库、物理副屏等待测项。
|
||||
- 本地采集目录为 `G:/dx33/acceptance`。现场 ZIP 留存原样,复验使用副本。原始打分仍是 373/600;菜单驱动、多选自动化和模型端点限流单列,分数只随实际复跑更新。
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
主工具顶部固定显示左右两个入口:左侧 **任务中心**,右侧 **DSH助手**,单击直接切换,无需展开菜单。助手也可按 `Ctrl+Shift+D` 打开;切回任务中心再进入助手时保留同一个网页、会话和未发送草稿。右侧“任务监管”读取主工具当前选中的任务。
|
||||
|
||||
这里直接运行 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的官方前端与运行时,固定 npm 版本 `0.2.1-rc.5`,通过 Qt WebEngine 嵌入主窗口。官方三栏框架、原生 SVG、鲸鱼悬停动画、输入编辑器、模型选择、侧栏与停靠交互均由上游代码提供。项目增加任务监管插件和“DSH助手”名称,不再使用 Qt 控件重画聊天页面。上游许可见 `licenses/DeepSeek-Harness-MIT.txt`。
|
||||
这里直接运行 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的官方前端与运行时,通过 Qt WebEngine 嵌入主窗口。当前 npm 版本以 `integration/dsh/package.json` 为准。官方三栏框架、原生 SVG、鲸鱼悬停动画、输入编辑器、模型选择、侧栏与停靠交互均由上游代码提供。项目增加任务监管插件和“DSH助手”名称,不再使用 Qt 控件重画聊天页面。上游许可见 `licenses/DeepSeek-Harness-MIT.txt`。
|
||||
|
||||
不显示上游账户登录、注册、充值和首次产品引导,也不注册其账户模型提供方。左下角 **工具设置** 单击打开原生设置页,包含“DSH工具”“通用设置”和“模型”;首页提示和任务监管面板围绕器件替换任务。输入框下方选择已配置的模型。
|
||||
|
||||
@@ -178,6 +178,14 @@ node tools/verify_dsh_runtime.mjs
|
||||
python tools/accept_dsh_desktop.py
|
||||
```
|
||||
|
||||
源码工作区可从 npm 更新 DSH。先退出任务中心,运行更新命令,再重新打开任务中心。
|
||||
|
||||
```powershell
|
||||
powershell -ExecutionPolicy Bypass -File tools/Install-DshRuntime.ps1 -Version latest
|
||||
```
|
||||
|
||||
将 `latest` 换成 `0.2.2-rc.5` 这样的完整版本号即可安装指定版本。脚本先在临时目录启动候选运行时并验证任务插件,通过后更新依赖声明、锁文件和实际依赖。更新成功时会打印 `build/dsh-update-…` 路径,其中 `previous` 保存旧运行时,`verification/report.json` 记录验收结果。便携版随应用打包 DSH,通过重新构建的应用发行包更新。
|
||||
|
||||
CLI 验证启动真实官方内核,检查工具与 preset 名单,实际读取快照、执行禁止工具探针,并测试本机请求认证、跨任务与过期动作边界。桌面验收启动真实主工具,用 Qt 鼠标事件单击左右导航,用 Chromium Input 事件操作官方页面,核对全新数据下无账户或引导弹窗、工具设置、任务刷新、会话、侧栏、SVG 动画、模型选择、草稿保留、取消确认和正常退出。验收只使用独立测试数据,不启动 CAD 或修改用户工程;未配置模型的验收不计为真实模型回复验证。
|
||||
|
||||
已配置本机模型时,可执行真实 API 桌面验收:
|
||||
|
||||
Generated
+4138
-3271
File diff suppressed because it is too large.
Load diff
@@ -2,7 +2,15 @@
|
||||
"name": "dxdesigner-dsh-runtime",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {"doctor": "node start.mjs --doctor", "start": "node start.mjs"},
|
||||
"engines": {"node": ">=24.9.0"},
|
||||
"dependencies": {"@deepseek-ai/dsh": "0.2.1-rc.5", "fflate": "0.8.3"}
|
||||
"scripts": {
|
||||
"doctor": "node start.mjs --doctor",
|
||||
"start": "node start.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=24.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepseek-ai/dsh": "0.2.2-rc.5",
|
||||
"fflate": "0.8.3"
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export const FILE_TOOLS=['read','read_image','write','edit','glob','grep','worki
|
||||
|
||||
const root = path.dirname(fileURLToPath(import.meta.url));
|
||||
const require = createRequire(import.meta.url);
|
||||
export const VERSION = '0.2.1-rc.5';
|
||||
export const VERSION = require('./package.json').dependencies['@deepseek-ai/dsh'];
|
||||
export const DISABLED = [
|
||||
'desktop-product-telemetry','product-analytics','session-telemetry-otel',
|
||||
];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
DeepSeek Harness native frontend and runtime
|
||||
Pinned release: @deepseek-ai/dsh 0.2.1-rc.5
|
||||
Package: @deepseek-ai/dsh
|
||||
Source: https://github.com/deepseek-ai/deepseek-harness
|
||||
|
||||
MIT License
|
||||
|
||||
@@ -12,9 +12,6 @@ from uuid import uuid4
|
||||
from .snapshot import TaskSnapshot
|
||||
from ..trial_task_center.path_access import retry_sharing_violation
|
||||
|
||||
HARNESS_VERSION = '0.2.1-rc.5'
|
||||
|
||||
|
||||
def integration_root() -> Path:
|
||||
if getattr(sys, 'frozen', False):
|
||||
return Path(sys._MEIPASS) / 'dsh-runtime'
|
||||
|
||||
@@ -1,14 +1,74 @@
|
||||
param()
|
||||
param(
|
||||
[string]$Version
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$dshRepoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$dshRuntimeRoot = Join-Path $dshRepoRoot 'integration/dsh'
|
||||
$dshNodeCommand = Get-Command node -ErrorAction Stop
|
||||
$dshNodeVersion = & $dshNodeCommand.Source -p 'process.versions.node'
|
||||
if ([version]$dshNodeVersion -lt [version]'24.9.0') { throw 'DSH requires Node.js 24.9.0 or later.' }
|
||||
Push-Location -LiteralPath $dshRuntimeRoot
|
||||
$dshNpm = (Get-Command npm.cmd -ErrorAction Stop).Source
|
||||
$dshRegistry = 'https://registry.npmjs.org/'
|
||||
|
||||
$dshBuild = Join-Path $dshRepoRoot 'build'
|
||||
New-Item -ItemType Directory -Path $dshBuild -Force | Out-Null
|
||||
$dshInstallLock = [IO.File]::Open((Join-Path $dshBuild 'dsh-install.lock'), 'OpenOrCreate', 'ReadWrite', 'None')
|
||||
try {
|
||||
& npm.cmd ci --ignore-scripts --no-audit --no-fund
|
||||
if ($LASTEXITCODE -ne 0) { throw 'DSH installation failed.' }
|
||||
& $dshNodeCommand.Source start.mjs --doctor
|
||||
if ($LASTEXITCODE -ne 0) { throw 'DSH runtime verification failed.' }
|
||||
} finally { Pop-Location }
|
||||
if (-not $Version) {
|
||||
& $dshNpm --prefix $dshRuntimeRoot ci --ignore-scripts --no-audit --no-fund
|
||||
if ($LASTEXITCODE -ne 0) { throw 'DSH installation failed.' }
|
||||
& $dshNodeCommand.Source (Join-Path $dshRuntimeRoot 'start.mjs') --doctor
|
||||
if ($LASTEXITCODE -ne 0) { throw 'DSH runtime verification failed.' }
|
||||
return
|
||||
}
|
||||
|
||||
if ($Version -cnotmatch '\A(?:latest|\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)\z') {
|
||||
throw 'Use latest or an exact version, for example 0.2.2-rc.5.'
|
||||
}
|
||||
|
||||
# Keep the candidate and previous installation on the same volume for rename.
|
||||
$dshStage = Join-Path $dshBuild ('dsh-update-' + [Guid]::NewGuid().ToString('N'))
|
||||
$dshCandidate = Join-Path $dshStage 'candidate'
|
||||
$dshPrevious = Join-Path $dshStage 'previous'
|
||||
$dshEntries = @('package.json', 'package-lock.json', 'node_modules')
|
||||
$dshBackedUp = @()
|
||||
$dshPublished = @()
|
||||
New-Item -ItemType Directory -Path $dshCandidate, $dshPrevious -Force | Out-Null
|
||||
try {
|
||||
Copy-Item -LiteralPath @(
|
||||
(Join-Path $dshRuntimeRoot 'package.json')
|
||||
(Join-Path $dshRuntimeRoot 'package-lock.json')
|
||||
(Join-Path $dshRuntimeRoot 'start.mjs')
|
||||
(Join-Path $dshRuntimeRoot 'task-plugin')
|
||||
) -Destination $dshCandidate -Recurse
|
||||
& $dshNpm --prefix $dshCandidate install --save-exact --ignore-scripts --no-audit --no-fund --registry=$dshRegistry "@deepseek-ai/dsh@$Version"
|
||||
if ($LASTEXITCODE -ne 0) { throw 'DSH candidate installation failed.' }
|
||||
& $dshNodeCommand.Source (Join-Path $PSScriptRoot 'verify_dsh_runtime.mjs') $dshCandidate (Join-Path $dshStage 'verification')
|
||||
if ($LASTEXITCODE -ne 0) { throw 'DSH candidate failed the runtime check. The previous runtime is still available.' }
|
||||
|
||||
foreach ($dshEntry in $dshEntries) {
|
||||
$dshLive = Join-Path $dshRuntimeRoot $dshEntry
|
||||
if (Test-Path -LiteralPath $dshLive) {
|
||||
Move-Item -LiteralPath $dshLive -Destination (Join-Path $dshPrevious $dshEntry)
|
||||
$dshBackedUp += $dshEntry
|
||||
}
|
||||
Move-Item -LiteralPath (Join-Path $dshCandidate $dshEntry) -Destination $dshLive
|
||||
$dshPublished += $dshEntry
|
||||
}
|
||||
} catch {
|
||||
try {
|
||||
foreach ($dshEntry in $dshPublished) {
|
||||
Move-Item -LiteralPath (Join-Path $dshRuntimeRoot $dshEntry) -Destination (Join-Path $dshCandidate $dshEntry)
|
||||
}
|
||||
foreach ($dshEntry in $dshBackedUp) {
|
||||
Move-Item -LiteralPath (Join-Path $dshPrevious $dshEntry) -Destination (Join-Path $dshRuntimeRoot $dshEntry)
|
||||
}
|
||||
} catch {
|
||||
throw "DSH rollback failed. Previous files: $dshPrevious. $($_.Exception.Message)"
|
||||
}
|
||||
throw
|
||||
}
|
||||
Write-Output "DSH updated. Previous files and verification: $dshStage"
|
||||
} finally {
|
||||
$dshInstallLock.Dispose()
|
||||
}
|
||||
@@ -13,7 +13,8 @@ const {loadProfileDirectory,composeEntries}=await load('@deepseek-ai/dsh-app-boo
|
||||
const {runProfile,INSTALL_ANCHOR}=await load('@deepseek-ai/dsh/profile-boot');
|
||||
const {createLaunchEnvironmentSnapshot}=await load('@deepseek-ai/dsh-launch-environment');
|
||||
const installed=require('@deepseek-ai/dsh/package.json');
|
||||
if(installed.version!=='0.2.1-rc.5')throw Error('Runtime version mismatch');
|
||||
const expected=require('../package.json').dependencies['@deepseek-ai/dsh'];
|
||||
if(installed.version!==expected)throw Error('Runtime version mismatch');
|
||||
const original=loadProfileDirectory('paired-source',path.resolve(source),INSTALL_ANCHOR);
|
||||
const effective=composeEntries([...original.layers.map(layer=>layer.patches),original.patches]);
|
||||
// Copy effective routing/model/shell budgets, never credential values to reports.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** Check actual shell file access separately from model behavior. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import {mkdir,mkdtemp,writeFile} from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import os from 'node:os';
|
||||
@@ -17,7 +18,7 @@ try{
|
||||
const agent=ctx.agents.get(sessionId);
|
||||
const filename=path.join(process.env.DX_DSH_WORKSPACE,'input.txt');
|
||||
await writeFile(filename,'SHELL_FILE_READ_OK');
|
||||
const result=await ctx.tools.execute({agent,callId:crypto.randomUUID(),name:'pwsh',
|
||||
const result=await executeTool(ctx, {agent,callId:crypto.randomUUID(),name:'pwsh',
|
||||
arguments:{description:'Read the owned shell verification file',command:`[System.IO.File]::ReadAllText('${filename.replaceAll("'","''")}')`},signal:AbortSignal.timeout(30000)});
|
||||
console.log(JSON.stringify({root,result}));
|
||||
}finally{await shutdown.shutdown(0);}
|
||||
@@ -0,0 +1,8 @@
|
||||
/** Run one tool through the installed Harness batch executor. */
|
||||
export async function executeTool(ctx, {callId, name, arguments: args, ...options}) {
|
||||
const {results} = await ctx.tools.execute({
|
||||
...options,
|
||||
calls: [{type: 'tool-call', id: callId, name, arguments: JSON.stringify(args ?? {})}],
|
||||
});
|
||||
return results[0].result;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
"""Verify the original issue 33 evidence and summarize queues without running enclosed scripts."""
|
||||
import argparse
|
||||
from collections import Counter
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
from zipfile import ZipFile
|
||||
|
||||
|
||||
def summarize(path):
|
||||
with path.open('rb') as stream:
|
||||
sha = hashlib.file_digest(stream, 'sha256').hexdigest()
|
||||
if sha != '1ac99eac3cf79bbf1f011d1d5fe833e92b98fba2c01546b3cfaf55a90b82d5b3':
|
||||
raise ValueError('Expected the original 1.3.2 field bundle from issue 33')
|
||||
queues = {}
|
||||
batches = {}
|
||||
with ZipFile(path) as archive:
|
||||
manifest = next(n for n in archive.namelist() if n.endswith('/SHA256SUMS.txt'))
|
||||
prefix = manifest.rsplit('/', 1)[0] + '/'
|
||||
entries = archive.read(manifest).decode('utf-8-sig').splitlines()
|
||||
for line in entries:
|
||||
digest, member = line.split(None, 1)
|
||||
with archive.open(prefix + member.strip().replace('\\', '/')) as stream:
|
||||
if hashlib.file_digest(stream, 'sha256').hexdigest() != digest.lower():
|
||||
raise ValueError('File checksum mismatch: ' + member)
|
||||
for member in archive.namelist():
|
||||
if '/data_full132/task-queues/' in member and member.endswith('.json'):
|
||||
queue = json.loads(archive.read(member))
|
||||
queues[Path(member).stem] = dict(
|
||||
total=len(queue['task_ids']), phase=queue['phase'],
|
||||
states=dict(Counter(row['state'] for row in queue['entries'].values())),
|
||||
isolated=list(queue.get('isolated_tasks', {})))
|
||||
if '/data_full132/batch-resources/' in member and member.endswith('/business-result.json'):
|
||||
result = json.loads(archive.read(member))
|
||||
fields = (result['payload'].get('result') or {}).get('fields', {})
|
||||
if 'queue_id' in fields:
|
||||
batches[result['batch_id']] = {key: fields.get(key) for key in
|
||||
('queue_id', 'paused', 'current_task_id')}
|
||||
return dict(sha256=sha, verified_files=len(entries), queues=queues, batch_results=batches)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('bundle', type=Path)
|
||||
print(json.dumps(summarize(parser.parse_args().bundle), ensure_ascii=False, indent=2))
|
||||
@@ -1,13 +1,19 @@
|
||||
/** Real native Harness incident diagnosis; no engineering mutations or issue writes. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import assert from 'node:assert/strict';
|
||||
import {mkdir,writeFile} from 'node:fs/promises';
|
||||
import {mkdir,mkdtemp,writeFile} from 'node:fs/promises';
|
||||
import {createRequire} from 'node:module';
|
||||
import path from 'node:path';
|
||||
import {pathToFileURL} from 'node:url';
|
||||
import {bootRuntime} from '../integration/dsh/start.mjs';
|
||||
|
||||
const output=path.resolve('build/dsh-auto-runtime');
|
||||
await mkdir(output,{recursive:true});
|
||||
process.env.DX_DSH_HOME=path.join(output,'home');
|
||||
process.env.DX_DSH_CONTEXT_FILE=path.join(output,'context.json');
|
||||
const offline=process.argv.includes('--fixture');
|
||||
const fixture=offline?await mkdtemp(path.join(output,'run-')):output;
|
||||
if(offline)for(const key of ['DSH_API_KEY','DSH_API_BASE','DSH_MODEL','DX_DSH_MODELS'])delete process.env[key];
|
||||
process.env.DX_DSH_HOME=path.join(fixture,'home');
|
||||
process.env.DX_DSH_CONTEXT_FILE=path.join(fixture,'context.json');
|
||||
await writeFile(process.env.DX_DSH_CONTEXT_FILE,JSON.stringify({task_id:'different-current-task',revision:'other',status:'draft'}));
|
||||
const snapshot={task_id:'auto-failure-fixture',revision:'incident',status:'failed',issue_code:'worker_error',
|
||||
issue:'受控诊断验收:执行前 worker 失败,没有工程写入。',rules_count:1,progress:{failed_items:1,total:1,completed:0}};
|
||||
@@ -31,6 +37,27 @@ process.stdout.write=function(chunk,...args){
|
||||
};
|
||||
let timer;
|
||||
try{
|
||||
if(offline){
|
||||
const require=createRequire(new URL('../integration/dsh/start.mjs',import.meta.url));
|
||||
const {LlmAdapter}=await import(pathToFileURL(require.resolve('@deepseek-ai/dsh-llm')).href);
|
||||
let snapshotRequested=false;
|
||||
class DiagnosticFixture extends LlmAdapter{
|
||||
providerInfo(provider){return {id:provider,name:'Auto runtime fixture'};}
|
||||
async listModels(provider){return [{provider,id:'fixture',name:'Fixture'}];}
|
||||
async *stream(options){
|
||||
const readSnapshot=options.purpose!=='session-title'&&!snapshotRequested;
|
||||
if(readSnapshot)snapshotRequested=true;
|
||||
const block=readSnapshot
|
||||
?{type:'tool-call',id:crypto.randomUUID(),name:'dx_task_snapshot',arguments:'{}'}
|
||||
:{type:'text',text:'Controlled diagnosis fixture. {"action":"none"}'};
|
||||
yield {type:'block-start',index:0,blockType:block.type};
|
||||
yield {type:'block-end',index:0,block};
|
||||
yield {type:'finish',reason:{kind:readSnapshot?'tool-calls':'stop'}};
|
||||
}
|
||||
}
|
||||
ctx.llm.registerAdapter(['auto-runtime-fixture'],new DiagnosticFixture());
|
||||
await ctx.agentDefaultModel.saveSelection({provider:'auto-runtime-fixture',model:'fixture'});
|
||||
}
|
||||
timer=setTimeout(()=>rejectResult(Error('native_auto_test_timeout')),135000);
|
||||
ctx.emit('dx/diagnose-request',{request_id:'cli-auto-request',incident_id:'0123456789abcdef01234567',
|
||||
phase:'diagnose',snapshot,evidence:JSON.stringify(snapshot)});
|
||||
@@ -38,7 +65,7 @@ try{
|
||||
const previousParent=process.env.DX_DSH_PARENT_PIPE;
|
||||
process.env.DX_DSH_PARENT_PIPE='1';
|
||||
try{
|
||||
const denial=await ctx.tools.execute({callId:'automatic-creation-denial',name:'dx_task_create',
|
||||
const denial=await executeTool(ctx, {callId:'automatic-creation-denial',name:'dx_task_create',
|
||||
arguments:{name:'Must never open a dialog'},agent:ctx.agents.get(sessionId),signal:AbortSignal.timeout(1500)});
|
||||
assert.equal(denial.isError,true);
|
||||
assert.equal(creationBodyRan,false,'Automatic incident must be denied before desktop request emission');
|
||||
@@ -48,7 +75,7 @@ try{
|
||||
['dx_task_execute',{operation:'start',task_ids:['auto-failure-fixture']}],
|
||||
['dx_task_operations',{operation:'history'}],
|
||||
]){
|
||||
const result=await ctx.tools.execute({callId:'automatic-denial-'+name,name,arguments:args,
|
||||
const result=await executeTool(ctx, {callId:'automatic-denial-'+name,name,arguments:args,
|
||||
agent:ctx.agents.get(sessionId),signal:AbortSignal.timeout(1500)});
|
||||
assert.equal(result.isError,true);
|
||||
assert.equal(creationBodyRan,false);
|
||||
@@ -65,7 +92,7 @@ try{
|
||||
assert.ok(!text.includes('different-current-task'));
|
||||
const report={status:'passed',session_id:value.session_id,reply:value.reply,
|
||||
incidentBoundSnapshot:true,automaticTaskCreationDenied:true,toolResults:tools};
|
||||
await writeFile(path.join(output,'report.json'),JSON.stringify(report,null,2));
|
||||
await writeFile(path.join(fixture,'report.json'),JSON.stringify(report,null,2));
|
||||
original(JSON.stringify(report)+'\n');
|
||||
}finally{
|
||||
clearTimeout(timer);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** Exercise actual Harness file tools against owned folders and ZIP archives. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import assert from 'node:assert/strict';
|
||||
import {mkdir,mkdtemp,writeFile,readFile,readdir} from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
@@ -24,7 +25,7 @@ try{
|
||||
const names=ctx.tools.schemas(agent).map(x=>x.name);
|
||||
for(const name of ['read','read_image','write','edit','glob','grep','working_directory','extract_zip'])
|
||||
assert.ok(names.includes(name),'Missing file capability: '+name);
|
||||
const call=async(name,args)=>ctx.tools.execute({name,arguments:args,callId:crypto.randomUUID(),agent,signal:AbortSignal.timeout(20000)});
|
||||
const call=async(name,args)=>executeTool(ctx, {name,arguments:args,callId:crypto.randomUUID(),agent,signal:AbortSignal.timeout(20000)});
|
||||
const ok=async(name,args)=>{
|
||||
const result=await call(name,args);assert.equal(result.isError,false,name+': '+JSON.stringify(result));return result;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** Real Harness, two processes: automatic diagnosis must stay isolated after restart. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import assert from 'node:assert/strict';
|
||||
import {mkdir,mkdtemp,writeFile,readFile,unlink,symlink} from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
@@ -96,7 +97,7 @@ if(!phase){
|
||||
const resumed=await ctx.sessionController.resolveAgent(sessionId);
|
||||
assert.ok(resumed.agent,JSON.stringify(resumed.error));
|
||||
const agent=resumed.agent;
|
||||
const call=(owner,name,args={})=>ctx.tools.execute({name,arguments:args,callId:crypto.randomUUID(),agent:owner,signal:AbortSignal.timeout(5000)});
|
||||
const call=(owner,name,args={})=>executeTool(ctx, {name,arguments:args,callId:crypto.randomUUID(),agent:owner,signal:AbortSignal.timeout(5000)});
|
||||
const snapshot=await call(agent,'dx_task_snapshot');
|
||||
assert.equal(snapshot.isError,false,JSON.stringify(snapshot));
|
||||
assert.equal(snapshot.value.task_id,'incident-original','historical diagnosis must not read the current task');
|
||||
|
||||
@@ -12,8 +12,9 @@ export async function verifyModelSettings(c, output) {
|
||||
});
|
||||
await new Promise(resolve=>server.listen(0,'127.0.0.1',resolve));
|
||||
const endpoint=`http://127.0.0.1:${server.address().port}/v1`;
|
||||
const visible=selector=>`[...document.querySelectorAll(${JSON.stringify(selector)})].find(e=>e.getBoundingClientRect().width>0)`;
|
||||
const button=text=>`[...document.querySelectorAll('button')].find(e=>e.getBoundingClientRect().width>0&&e.textContent.trim()===${JSON.stringify(text)})`;
|
||||
const rendered=`e.getBoundingClientRect().width>0&&!e.closest('details:not([open])')`;
|
||||
const visible=selector=>`[...document.querySelectorAll(${JSON.stringify(selector)})].find(e=>${rendered})`;
|
||||
const button=text=>`[...document.querySelectorAll('button')].find(e=>${rendered}&&e.textContent.trim()===${JSON.stringify(text)})`;
|
||||
async function wait(expression){
|
||||
const end=Date.now()+20000;
|
||||
while(Date.now()<end){if(await c.evaluate(expression))return;await new Promise(r=>setTimeout(r,100));}
|
||||
@@ -49,7 +50,7 @@ export async function verifyModelSettings(c, output) {
|
||||
const candidate=`[...document.querySelectorAll('[role="dialog"] label')].find(e=>e.textContent.includes('issue16-fixture-model'))?.querySelector('input[type="checkbox"]')`;
|
||||
if(!await c.evaluate(`(${candidate})?.checked`))await c.click(candidate);
|
||||
assert.equal(await c.evaluate(`(${candidate})?.checked`),true);
|
||||
await c.click(button('添加所选'));
|
||||
await c.click(button('更新列表'));
|
||||
await wait(`!![...document.querySelectorAll('input')].find(x=>x.value==='issue16-fixture-model')`);
|
||||
await c.screenshot(path.join(output,'custom-model-discovery.png'));
|
||||
await c.click(button('创建提供商'));
|
||||
@@ -58,7 +59,7 @@ export async function verifyModelSettings(c, output) {
|
||||
// Reopen the real editor to read committed fields, not the submitted draft.
|
||||
await c.click(`[...document.querySelectorAll('li')].find(e=>e.textContent.includes('issue16-fixture'))?.querySelector('button')`);
|
||||
await wait(`document.body.innerText.includes('自定义设置')`);
|
||||
await c.click(`[...document.querySelectorAll('summary')].find(e=>e.textContent.includes('自定义设置'))`);
|
||||
await c.click(`[...document.querySelectorAll('summary')].find(e=>e.textContent.includes('自定义设置')&&e.closest('details').querySelector('input[aria-label="API 地址"]')?.value===${JSON.stringify(endpoint)})`);
|
||||
await wait(`!![...document.querySelectorAll('input')].find(x=>x.value==='issue16-fixture-model')`);
|
||||
await c.screenshot(path.join(output,'custom-model-persisted.png'));
|
||||
return {status:'passed',provider:'issue16-fixture',model:'issue16-fixture-model',requests,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** Compare the embedded assistant with the installed official Standard preset. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import assert from 'node:assert/strict';
|
||||
import {mkdir,mkdtemp,writeFile,readFile} from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
@@ -29,7 +30,7 @@ try{
|
||||
assert.deepEqual(names(embedded),names(native),'Existing dx-task sessions must retain the full native tool catalog');
|
||||
for(const tool of ['read','write','edit','pwsh','get_goal','create_goal','update_goal','todo_write','subagent'])
|
||||
assert.ok(names(embedded).includes(tool),'Missing native capability: '+tool);
|
||||
const call=(name,args)=>ctx.tools.execute({name,arguments:args,callId:crypto.randomUUID(),agent:embedded,signal:AbortSignal.timeout(20000)});
|
||||
const call=(name,args)=>executeTool(ctx, {name,arguments:args,callId:crypto.randomUUID(),agent:embedded,signal:AbortSignal.timeout(20000)});
|
||||
const filename=path.join(process.env.DX_DSH_WORKSPACE,'native-write.txt');
|
||||
const written=await call('write',{file_path:filename,content:'native file operations'});
|
||||
assert.equal(written.isError,false,JSON.stringify(written));
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
/** Exercise the real official runtime and policy pipeline without CAD or a model. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import assert from 'node:assert/strict';
|
||||
import {mkdir,writeFile} from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import {fileURLToPath,pathToFileURL} from 'node:url';
|
||||
import {createRequire} from 'node:module';
|
||||
import {bootRuntime,TASK_TOOLS} from '../integration/dsh/start.mjs';
|
||||
|
||||
const repo=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..');
|
||||
const output=path.join(repo,'build/dsh-native-cli-verification');
|
||||
const runtime=path.resolve(process.argv[2]??path.join(repo,'integration/dsh'));
|
||||
const {bootRuntime,TASK_TOOLS,VERSION}=await import(pathToFileURL(path.join(runtime,'start.mjs')).href);
|
||||
const output=path.resolve(process.argv[3]??path.join(repo,'build/dsh-native-cli-verification'));
|
||||
await mkdir(output,{recursive:true});
|
||||
delete process.env.DX_DSH_PARENT_PIPE;
|
||||
if(process.argv[2]){
|
||||
for(const key of ['DSH_API_KEY','DSH_API_BASE','DSH_MODEL','DX_DSH_MODELS','DSH_PERMISSION_MODE'])delete process.env[key];
|
||||
}
|
||||
process.env.DX_DSH_HOME=path.join(output,'home');
|
||||
process.env.DX_DSH_CONTEXT_FILE=path.join(output,'context.json');
|
||||
await writeFile(process.env.DX_DSH_CONTEXT_FILE,JSON.stringify({task_id:'cli-verification',status:'paused',
|
||||
revision:'cli-revision',rules_count:2,progress:{},issue:'',issue_code:'',events:[]}));
|
||||
const {ctx,shutdown}=await bootRuntime({announce:false});
|
||||
const report={};
|
||||
const report={version:VERSION};
|
||||
try {
|
||||
const schemas=ctx.tools.schemas();
|
||||
report.tools=schemas.map(x=>x.name);
|
||||
@@ -26,10 +32,10 @@ try {
|
||||
report.configuredModels=(await ctx.llm.listModels('dx')).map(model=>model.id);
|
||||
assert.ok(report.configuredModels.includes(process.env.DSH_MODEL));
|
||||
}
|
||||
const snapshot=await ctx.tools.execute({callId:'verify-read',name:'dx_task_snapshot',arguments:{},signal:new AbortController().signal});
|
||||
const snapshot=await executeTool(ctx, {callId:'verify-read',name:'dx_task_snapshot',arguments:{},signal:new AbortController().signal});
|
||||
assert.equal(snapshot.isError,false,JSON.stringify(snapshot));
|
||||
report.snapshotRead=true;
|
||||
const desktopOnly=await ctx.tools.execute({callId:'verify-desktop-only',name:'dx_task_create',arguments:{name:'CLI must not mutate'},signal:new AbortController().signal});
|
||||
const desktopOnly=await executeTool(ctx, {callId:'verify-desktop-only',name:'dx_task_create',arguments:{name:'CLI must not mutate'},signal:new AbortController().signal});
|
||||
assert.equal(desktopOnly.isError,true);
|
||||
report.creationRequiresDesktopConfirmation=true;
|
||||
for(const [name,args] of [
|
||||
@@ -38,16 +44,16 @@ try {
|
||||
['dx_task_execute',{operation:'start',task_ids:['fixture']}],
|
||||
['dx_task_operations',{operation:'history'}],
|
||||
]){
|
||||
const result=await ctx.tools.execute({callId:'desktop-only-'+name,name,arguments:args,signal:AbortSignal.timeout(2000)});
|
||||
const result=await executeTool(ctx, {callId:'desktop-only-'+name,name,arguments:args,signal:AbortSignal.timeout(2000)});
|
||||
assert.equal(result.isError,true,name+' requires parent desktop');
|
||||
}
|
||||
report.lifecycleRequiresDesktop=true;
|
||||
const require=createRequire(path.join(repo,'integration/dsh/package.json'));
|
||||
const require=createRequire(path.join(runtime,'package.json'));
|
||||
const {defineTool}=await import(pathToFileURL(require.resolve('@deepseek-ai/dsh-tools')).href);
|
||||
let bodyRan=false;
|
||||
const release=ctx.tools.register(defineTool({name:'forbidden_probe',description:'Never executes',parameters:{},
|
||||
output:{schema:{type:'boolean'},render:()=>[{type:'text',text:'probe'}]},execute:async()=>{bodyRan=true;return true;}}));
|
||||
const extension=await ctx.tools.execute({callId:'verify-extension',name:'forbidden_probe',arguments:{},signal:new AbortController().signal});
|
||||
const extension=await executeTool(ctx, {callId:'verify-extension',name:'forbidden_probe',arguments:{},signal:new AbortController().signal});
|
||||
release();
|
||||
assert.equal(extension.isError,false);
|
||||
assert.equal(bodyRan,true);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/** PR18 #197: no silently omitted names, bounded workers, real cancellation. */
|
||||
import {executeTool} from './dsh_tool_probe.mjs';
|
||||
import assert from 'node:assert/strict';
|
||||
import {mkdir,mkdtemp,writeFile,readdir,readFile} from 'node:fs/promises';
|
||||
import {spawnSync} from 'node:child_process';
|
||||
@@ -25,7 +26,7 @@ process.env.DX_DSH_HOME=path.join(root,'home');process.env.DX_DSH_CONTEXT_FILE=p
|
||||
await writeFile(process.env.DX_DSH_CONTEXT_FILE,'{"task_id":"zip-review","revision":"zip-review","status":"observe"}');
|
||||
const {ctx,shutdown}=await bootRuntime({announce:false});
|
||||
try{
|
||||
const call=(file,signal=AbortSignal.timeout(30000))=>ctx.tools.execute({name:'extract_zip',
|
||||
const call=(file,signal=AbortSignal.timeout(30000))=>executeTool(ctx, {name:'extract_zip',
|
||||
arguments:{file_path:path.join(root,file),output_directory:root},callId:crypto.randomUUID(),signal});
|
||||
const before=await readdir(root);
|
||||
for(const file of ['proto.zip','proto-bad.zip']){
|
||||
|
||||
Reference in new issue
Block a user