Compare commits

...
78 Commits
Author SHA1 Message Date
阿白叔 ce42acc654 docs(release): record Beta 2 frozen build and independent acceptance proof 2026-10-23 14:14:59 +08:00
阿白叔 1ee519e5d2 docs(release): record frozen EXE BOM and replacement acceptance for Beta 2 2026-10-23 14:12:56 +08:00
阿白叔 bc91b98385 test(release): validate batch-owned native inventory cleanup in EXE acceptance 2026-10-23 14:02:00 +08:00
阿白叔 9c4ccc5bf5 fix(packaging): include pywin32 timezone and verify frozen batch supervisor 2026-10-23 13:57:28 +08:00
阿白叔 46bcafd7a3 docs(release): record Beta package verification and release manifest 2026-10-21 20:00:23 +08:00
阿白叔 e46982af6c release: prepare V1.1.4 Beta 1 and label release channel 2026-10-21 19:54:02 +08:00
阿白叔 2a9398ab50 feat(logs): retain resource release history in batch and task logs 2026-10-21 18:01:59 +08:00
阿白叔 faad50df80 docs: document batch resource safety and measured acceptance results 2026-10-21 15:55:18 +08:00
阿白叔 74c1cb752c test: compare canonical worker paths when Windows uses short aliases 2026-10-21 15:53:51 +08:00
阿白叔 a8358d90d7 fix(runtime): block identity replay and retain generation release proof 2026-10-21 15:45:09 +08:00
阿白叔 486ea05ad5 test(runtime): verify external desktop references block batch cleanup safely 2026-10-21 15:36:52 +08:00
阿白叔 4b78ca0f27 test: bound thousand-step queue work independently of machine timing 2026-10-21 15:33:31 +08:00
阿白叔 0151552f55 fix(safety): reject frozen queue policy changes before project backup 2026-10-21 15:26:55 +08:00
阿白叔 2c88be99ce fix: stop batch when native session recovery is exhausted 2026-10-21 15:26:11 +08:00
阿白叔 a011e8eab6 test: replay reported BOM against captured native inventories 2026-10-21 15:14:26 +08:00
阿白叔 9a3dff2f14 test: record paired live batch runtime acceptance 2026-10-21 15:13:14 +08:00
阿白叔 bdb096fb88 fix: retain diagnostic BOM reports without actionable cleanup previews 2026-10-21 15:00:53 +08:00
阿白叔 89c7c603f6 feat(runtime): reuse private desktop and CAD per batch with safe rebuilds 2026-10-21 15:00:17 +08:00
阿白叔 681403a4d2 fix: bind native retry evidence to current batch operation 2026-10-21 14:51:32 +08:00
阿白叔 a94276494a fix: guard standalone CAD entries and preserve cleanup diagnostics 2026-10-21 14:49:14 +08:00
阿白叔 00861a59d6 feat: share batch runtime across queues and expose resource cleanup 2026-10-21 14:30:01 +08:00
阿白叔 832ab5d563 feat: persist batch attempt proof before CAD mutations 2026-10-21 14:28:25 +08:00
阿白叔 e15ee259f8 tools: trace private desktop thread owners using documented Win32 APIs 2026-10-21 13:42:22 +08:00
阿白叔 e4ef6a533e fix: avoid unrelated BOM inventory fallback and retain interrupted import reports 2026-10-21 11:45:04 +08:00
阿白叔 3b3b648580 docs: add a 13-step illustrated README tutorial 2026-10-20 08:30:17 +08:00
阿白叔 a2ec2176cd docs: record V1.1.3 release artifacts and icon verification 2026-10-19 17:54:38 +08:00
阿白叔 95c7f9b775 feat: add application icon and Windows identity for V1.1.3 2026-10-19 17:45:42 +08:00
阿白叔 54c41d4525 docs: record final frozen candidate acceptance and performance evidence 2026-10-19 17:29:28 +08:00
阿白叔 e6ec267a26 perf: remove repeated project and log filesystem work without weakening checks 2026-10-19 17:15:21 +08:00
阿白叔 bbf9bffe32 test: verify native cleanup and fail packaged acceptance on queue errors 2026-10-19 17:02:54 +08:00
阿白叔 e2f76c3387 fix(ui): guard destroyed windows and migrate stale workflow regressions 2026-10-19 16:27:35 +08:00
阿白叔 d12478efd8 fix: allow replacement without an explicit target cell 2026-10-19 16:15:21 +08:00
阿白叔 81a8547352 docs: record target cell acceptance and remaining release gates 2026-10-19 15:40:50 +08:00
阿白叔 ec75445f44 fix: keep cold Cell reads outside native mutation deadline 2026-10-19 15:28:31 +08:00
阿白叔 4d1b825e4a docs: explain explicit target cell selection without BOM format changes 2026-10-19 15:15:04 +08:00
阿白叔 27dec68fc2 fix(rules): fill blank plan cells from matching explicit rules 2026-10-19 15:12:09 +08:00
阿白叔 cf671a1d3f perf(catalog): share verified cell cache across task execution and UI 2026-10-19 15:11:27 +08:00
阿白叔 d10356ee3d feat: read authoritative cell catalogs from owned library clones 2026-10-19 15:06:36 +08:00
阿白叔 bb506a3550 fix(execution): bind explicit target cells to native save and recovery 2026-10-19 14:50:32 +08:00
阿白叔 976a72d572 feat(rules): persist explicit target cells and guard async selection 2026-10-19 14:41:27 +08:00
阿白叔 ca8ac2a5d2 perf(snapshot): capture full target states in correlated native read 2026-10-19 14:34:57 +08:00
阿白叔 8723076cb6 docs: define explicit target cell selection and verification plan 2026-10-19 14:29:36 +08:00
阿白叔 5ad0c66732 docs: record native progress and library redraw live regression 2026-10-19 13:48:37 +08:00
阿白叔 911afdf1cc fix(execution): track native read progress and retry transient library redraws 2026-10-19 13:45:39 +08:00
阿白叔 e74ec5bcbd docs: record native snapshot BOM and recovery acceptance 2026-10-19 11:09:54 +08:00
阿白叔 81f34683ea perf(execution): use native-host full snapshots for owned batches 2026-10-19 11:07:13 +08:00
阿白叔 2f6060dfe3 feat(native): add correlated read-only snapshot adapter 2026-10-19 10:54:25 +08:00
阿白叔 5b625b076e perf(execution): reuse component UID within each snapshot read 2026-10-19 10:36:06 +08:00
阿白叔 13b9ff48dd docs: record lazy index performance and full graph verification 2026-10-19 10:20:17 +08:00
阿白叔 998d78dbc0 test(execution): cover lazy association collisions and context refresh 2026-10-19 10:14:49 +08:00
阿白叔 8fe82c3124 perf(execution): build component association indexes only when needed 2026-10-19 10:13:37 +08:00
阿白叔 2ad36ba45d docs: record execution deduplication benchmarks and verification 2026-10-19 09:55:42 +08:00
阿白叔 e5ebc5d14e perf(execution): close readback and no-match projects without resaving 2026-10-19 09:48:54 +08:00
阿白叔 5a0f62f0de perf(native): remove duplicate identity and selection reads 2026-10-19 09:41:43 +08:00
阿白叔 0714c7753f perf(execution): consolidate full checks at commit boundaries 2026-10-19 09:41:41 +08:00
阿白叔 196c84b0d3 docs: record accuracy audit evidence and remaining release gaps 2026-10-19 09:04:33 +08:00
阿白叔 11810eca4c fix(execution): verify exact identity connections and untouched state 2026-10-19 09:00:04 +08:00
阿白叔 b646a9a88a fix(queue): reject damaged backups and count missing projects as failures 2026-10-19 08:58:16 +08:00
阿白叔 ba4c328b2f fix(bom): reject lossy non-text part numbers 2026-10-19 08:56:09 +08:00
阿白叔 bc36289059 docs: record patrol fixes and formal multi-rule verification 2026-10-17 14:11:13 +08:00
阿白叔 b9193dbb21 fix: retry session control publication on Windows sharing locks 2026-10-17 14:10:34 +08:00
阿白叔 9803993d49 perf: prepare targeted queues from validated component inventory 2026-10-17 14:10:31 +08:00
阿白叔 e13b4e295f fix: wait for stable native replacement target before submission 2026-10-17 14:10:27 +08:00
阿白叔 ea024da325 fix: read effective instance properties in native inventory 2026-10-17 14:01:40 +08:00
阿白叔 2ad0a3c6c7 docs: measure replacement speed and record benchmark limits 2026-10-17 12:41:00 +08:00
阿白叔 cf0ba739c6 research: verify headless replacement and native parts query CLI 2026-10-17 11:18:46 +08:00
阿白叔 4a5c5df0f5 docs: locate replacement commit core and verify API scope 2026-10-17 10:47:43 +08:00
阿白叔 bb2451d178 docs: verify script CLI access to native library modules 2026-10-17 09:53:26 +08:00
阿白叔 6fe07aa160 docs: trace native replacement processes and loaded interfaces 2026-10-17 09:40:15 +08:00
阿白叔 0415ecc73c feat: prefer isolated native CLI for component inventory 2026-10-16 23:29:41 +08:00
阿白叔 72853900de docs: verify native parts lister CLI on disposable project 2026-10-16 11:29:20 +08:00
阿白叔 fff39e0645 fix: release CAD COM references before apartment shutdown 2026-10-16 11:04:05 +08:00
阿白叔 f3d2570e48 fix: preserve CAD shutdown failures and record desktop cleanup evidence 2026-10-16 10:48:19 +08:00
阿白叔 660bbe3736 docs: record verified batch retry and checkpoint preservation 2026-10-16 10:19:49 +08:00
阿白叔 d9f65a0ac7 fix: unify async operation feedback and recover failed task reads 2026-10-16 10:19:31 +08:00
阿白叔 032a80ac27 fix: rebuild batches after retry and preserve log page on read failure 2026-10-16 10:13:36 +08:00
阿白叔 2ddfd1a0b2 refactor: drive BOM import lifecycle with an explicit state machine 2026-10-16 09:46:02 +08:00
阿白叔 b30712b117 fix: reset BOM import state and validate conflicts before CAD 2026-10-16 09:27:00 +08:00
213 changed files with 18033 additions and 1885 deletions

No files matched your search

+141 -46
View File
@@ -1,69 +1,165 @@
# DxDesigner 器件批量替换工具
<img src="docs/user/media/app-icon.png" width="64" height="64" alt="DxPartReplace 应用图标">
面向 **Windows + DxDesigner / Expedition Enterprise 7.9.5** 的器件批量替换工具。一个工程对应一个任务,可以只替换同料号下的部分位号;支持直接编辑和 Excel BOM 导入,同批工程按顺序执行。
**最新版本:V1.1.2** · [下载便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.2/DxPartReplace-1.1.2.zip) · [版本说明与附件](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/tag/v1.1.2) · [完整使用说明](docs/user/v1.1.0-project-tasks.md)
**最新版本:V1.1.4 Beta 2(预发布)** · [下载便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.2/DxPartReplace-1.1.4-beta.2.zip) · [版本说明与附件](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/tag/v1.1.4-beta.2) · [完整使用说明](docs/user/v1.1.0-project-tasks.md)
## 窗口操作教程
所有发布均标记为 **Beta 预发布**。V1.1.4 Beta 1 因 BOM 导入缺少 `win32timezone` 已撤回,请使用 Beta 2;旧 Git 标签保留供回溯。升级前备份 `data`,完整更新 EXE 与 `_internal`,不要只替换 EXE。
下面的 GIF 来自已验收 EXE 的真实窗口操作,包含创建任务、BOM 导入、错误行提示、保存、顺序执行、查看结果和开始新一轮。共 20 个步骤、47.5 秒;仅记录工具及其弹窗,CAD 等待已压缩,Excel 填表示例在录制之外完成。
本版提供[目标封装选择](docs/user/target-cell-selection.md):目标封装可留空,此时工具不主动覆写封装,可后续与中心库同步;需要指定时,在料号规则中读取并选择合法封装。BOM 保持原 11 列。
![V1.1.2 窗口操作教程](docs/user/media/v1.1.2-window-bom-tutorial.gif)
## 图文教程
如果图片没有自动播放,可以[单独打开 GIF](docs/user/media/v1.1.2-window-bom-tutorial.gif)。
按下面 **13 步**,完成“创建任务 → 填 BOM → 导入校验 → 保存计划 → 替换 → 查看结果”。本例有两个工程 `Audio_D2128`、`Audio_T605A`,各自只替换 `RV05`,保留同料号下的 `RV11`。
## 开始使用
截图来自真实窗口:起始页为 V1.1.3,后续操作图取自已验收的 V1.1.2 业务流程,操作位置相同。点击图片可以放大查看;BOM 填写图为示意。
1. 下载并完整解压便携包,保留 `DxPartReplace.exe` 和 `_internal` 的相对位置。**便携包无需安装 Python**,本机仍需安装可用的 DxDesigner、许可证和中央库。
2. 双击 `DxPartReplace.exe`。首次运行会自动创建同目录的 `data`,保存任务、日志和执行证据。
3. 点击左侧 **新建**,在弹窗填写工程根目录,点击 **读取工程**,勾选需要处理的 `.prj`,再点击 **创建任务**。每个工程自动创建一个任务。
### 第 1 步:解压并打开应用
首次使用请在完整工程副本上验证映射与库配置。执行前保存并关闭待处理工程;工具会启动自己的后台 CAD,主桌面仍可查看其他文件。
[下载 V1.1.4 Beta 2 便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.2/DxPartReplace-1.1.4-beta.2.zip),**完整解压**,双击 `DxPartReplace.exe`。保留它与 `_internal` 的相对位置,无需安装 Python;本机需要可用的 DxDesigner、许可证和中央库。
## 方式一:通过 BOM 批量配置
打开后看到下图主窗口。首次使用请准备完整的工程副本,执行前保存并关闭待处理工程。
### 1. 导出本批模板
![第 1 步:打开应用,进入任务主窗口](docs/user/media/tutorial/01-open.png)
选择任务,打开顶部 **本批位号计划**,点击 **BOM 模板**。只要已导入工程,就能导出同批所有工程的一张空白表,**不需要先采集位号或填写料号规则**。
### 第 2 步:新建任务,读取工程目录
工程名称、工程路径自动填写。工程路径用于唯一分配任务,请保持原样;同一工程有多条替换时,可以复制该工程行。
点击左下方 **新建**。在弹窗中填写工程根目录,或点击 **选择目录**,再点击 **读取工程**。
### 2. 在 Excel 填写替换项
**完成标志:** 弹窗列表显示该目录下找到的 `.prj` 工程。
保留原模板的 11 列表头,按需要填写:
![第 2 步:填写根目录,点击读取工程](docs/user/media/tutorial/02-read-projects.png)
| 列名 | 填写内容 |
### 第 3 步:勾选工程,创建任务
勾选这次要处理的工程,点击右下角 **创建任务**。本例勾选两个工程。
**完成标志:** 左侧出现两个任务,**一个工程对应一个任务**。
![第 3 步:勾选两个工程,点击创建任务](docs/user/media/tutorial/03-create-tasks.png)
### 第 4 步:导出本批 BOM 模板
选中左侧任意一个任务,切换到顶部 **本批位号计划**,点击 **BOM 模板**,选择文件保存位置。
**完成标志:** 导出的 Excel 包含本批所有工程,工程名称和完整路径已经填写好。此时不需要先采集位号,也不需要先添加料号规则。
![第 4 步:切换本批位号计划,导出 BOM 模板](docs/user/media/tutorial/04-export-template.png)
### 第 5 步:在 Excel 中填写替换项
打开刚导出的模板,**保留全部 11 列表头以及原工程路径**。同一工程需要填写多条替换时,复制该工程行后再填写。
本例在两个工程行中分别填写相同的旧、新料号和 `RV05`:
![第 5 步:BOM 填写示意,两个工程各替换 RV05](docs/user/media/tutorial/05-fill-bom.png)
| 要填写的列 | 填法 |
| --- | --- |
| `old_part_number` | 工程当前的旧料号 |
| `new_part_number` | 中央库中的目标新料号 |
| `refdes` | 要处理的位号,例如 `RV05`;一行可以写多个位号,以逗号、分号、空格或顿号分隔 |
| `enabled` | `TRUE` / `是` 表示替换,`FALSE` / `否` 表示保留 |
| `sync_nc` | 是否同步 NC,默认开启,可逐行关闭 |
| `custom_value` | 可选的自定义 Value;填写后优先写入,留空沿用任务的 Value 策略 |
| `old_part_number` | 工程当前的旧料号,本例为 `4100-CA0000-T7` |
| `new_part_number` | 中央库中的目标新料号,本例为 `4100-CA0000-T0` |
| `refdes` | 要替换的位号,本例为 `RV05`;多个位号可用逗号、分号、空格或顿号分隔 |
| `enabled` | `TRUE` / `是` 表示替换,`FALSE` / `否` 表示保留;留空默认替换,建议显式填写 |
| `sync_nc` | 是否同步 NC,默认开启;按需要填 `TRUE` 或 `FALSE` |
| `custom_value` | 可选的自定义 Value;留空时使用任务的 Value 策略 |
例如,首次配置的旧料号同时对应 `RV05`、`RV11`,只想替换 `RV05`,可以只填写 `RV05` 的启用项;首次采集的其余位号默认不替换。
料号按**文本**填写,不要使用公式。相同位号出现在多个图页时,补填 `schematic_name`、`sheet_number` 或 `uid` 消除歧义。旧新相同、链式或循环替换会被拒绝。
**再次导入时,BOM 中未列出的既有计划行会保留原勾选和编辑状态。** 如果这轮只想执行 BOM 列出的目标,请在预览中检查其他启用行,并明确取消勾选,或在 BOM 中填写对应的 `enabled=FALSE` 行。
**本例首次导入只列出 RV05,采集到的 RV11 默认保留。再次导入时,未列出的既有计划行会保留原勾选;需要停用时,请取消勾选或明确填写 `enabled=FALSE`。**
同名位号分布在不同图页时,补填 `schematic_name`、`sheet_number` 或 `uid` 消除歧义。`enabled` 留空默认替换,`sync_nc` 留空默认开启;建议显式填写。料号按文本填写;导入不接受公式,也不接受旧新相同、链式或循环替换。
填完后保存 Excel 文件。
### 3. 导入并检查报告
### 第 6 步:导入填写好的 BOM
点击 **导入 BOM**,选择填好的文件。工具按工程匹配位号;缺少库存时,会调用后台 CAD 只读采集。
返回应用,在 **本批位号计划** 点击 **导入 BOM**,选择刚保存的 Excel,等待校验结果。
- 校验报告显示通过、失败、未检查的行数,并标明 Excel 行号及原因。
- 有错误时,整批不会生成新的可保存预览,也不会部分写入计划。修正后重新导入。
- 全部通过后,先得到预览;可以切换任务,检查或修改各工程的位号计划。
导入会检查表格和工程归属,并匹配相关工程的位号。缺少库存时优先调用原生 CLI 采集,不可用时回退到后台 CAD 只读采集。**导入不会执行替换,也不会直接保存计划。**
### 4. 保存并执行
![第 6 步:点击导入 BOM,选择填写好的 Excel](docs/user/media/tutorial/06-import-bom.png)
确认预览后点击 **保存本批位号计划**;普通单工程编辑时按钮显示 **保存位号计划**。
### 第 7 步:检查导入报告,有错误先修正
点击 **执行当前任务** 处理当前工程,或点击左侧 **顺序执行本批任务** 处理同批工程。确认范围后,工具逐项执行原生 Replace Part、保存、关闭并重新打开核验。
点击校验状态条中的 **详情**。报告会显示通过、失败、未检查的行数,以及 Excel 行号和错误原因。
**左侧搜索和显示排序只影响浏览,不改变本批执行范围。** 调整执行顺序请使用上移、下移任务按钮。
下图是故意填入不存在位号的示例:**通过 2 行、失败 1 行**,错误定位到 Excel 第 4 行。按报告修正 Excel、保存文件,再次点击 **导入 BOM**。
## 方式二:直接在界面编辑
**有错误时不会部分保存。全部通过后再继续下一步。** 新一次导入开始后旧报告会清除;导入失败仍保留已有预览和手动编辑,取消文件选择则保留原报告。
![第 7 步:查看校验详情,按 Excel 行号修正错误](docs/user/media/tutorial/07-import-errors.png)
### 第 8 步:核对每个工程的预览,保存计划
报告全部通过后,关闭详情,依次选中左侧各任务,核对:
- 需要替换的 `RV05` 已勾选,新料号正确。
- 需要保留的 `RV11` 未勾选。
- 自定义 Value、同步 NC 等逐行设置符合预期。
确认后点击 **保存本批位号计划**;单工程编辑或保存完成后,按钮显示 **保存位号计划**。
**完成标志:** 底部提示计划保存完成。下图为保存后的状态,只有 RV05 启用。
![第 8 步:检查替换勾选和新料号,保存本批位号计划](docs/user/media/tutorial/08-review-save.png)
### 第 9 步:按任务确认 Value 与封装设置
选中一个任务,按需设置顶部 **Value 策略**:勾选后,将替换后的 **Part Label 写入 Value**;逐行自定义 Value 优先。处理多个工程时,分别确认各任务的开关。
本例开启该选项。**复制的是 Part Label,不是把新料号直接写进 Value。**
![第 9 步:按当前任务设置 Part Label 写入 Value](docs/user/media/tutorial/09-value-policy.png)
目标封装可留空,工具不主动覆写 Cell Name,可后续与中心库同步。需要本轮指定时,在 **本批料号规则** 中编辑对应旧、新料号规则,读取并选择合法封装,核对计划中的选择后保存。详见[封装操作说明](docs/user/target-cell-selection.md)。
### 第 10 步:选择执行范围,确认后开始
只处理选中工程,点击底部 **执行当前任务**;处理同批工程,点击左侧 **顺序执行本批任务**。本例使用后者。
在确认弹窗中核对工程数量和执行范围,确认无误再点击 **Yes / 是**。
![第 10 步:核对两个工程的执行范围,确认顺序执行](docs/user/media/tutorial/10-confirm-execution.png)
**搜索和显示排序只影响浏览,不改变本批执行范围。** 调整实际执行顺序,请使用左下方 **上移任务 / 下移任务**。
### 第 11 步:等待后台执行和保存重开核验
工具按工程顺序执行替换,保存、关闭并重新打开核验。左侧显示各任务状态,底部显示当前阶段和进度。
![第 11 步:观察任务状态和底部执行进度](docs/user/media/tutorial/11-running.png)
运行期间可以在主桌面查看其他文件,请勿打开或修改本次正在处理的同一工程。需要暂停时,点击 **完成当前项后暂停**,等待当前步骤安全收尾。
**完成标志:** 任务显示已完成,底部提示本批执行结束。还要打开结果核对,不能只看进度条。
### 第 12 步:查看实际修改结果与日志
选中要检查的任务,点击右下角 **替换结果 / 日志**,查看 **位号替换结果**。
本例应看到:`RV05` 的旧料号为 `4100-CA0000-T7`,回读料号为 `4100-CA0000-T0`,核验状态为 **已保存并核验**。
![第 12 步:查看位号、旧料号、实际回读料号和核验状态](docs/user/media/tutorial/12-results.png)
需要排查原因时,切到 **完整日志**,查看具体阶段和耗时;可用 **上一页日志 / 最新日志** 翻页。失败、未命中或未核验不会被当作已保存成功。
![第 12 步补充:完整日志显示各阶段和处理信息](docs/user/media/tutorial/12-complete-log.png)
### 第 13 步:需要继续替换时,开始新一轮
已完成任务可以点击底部 **开始新一轮**:
![第 13 步入口:任务完成后,底部出现开始新一轮](docs/user/media/tutorial/13-new-round-entry.png)
核对弹窗中的任务范围,再确认。
![第 13 步:核对新一轮范围及旧证据归档说明](docs/user/media/tutorial/13-new-round.png)
**完成标志:** 已完成任务恢复为待配置,旧计划、命令、快照和日志归档保留。接下来按工程**当前料号**重新填 BOM 或修改规则,重新采集、保存后执行;旧轮次通过 **查看轮次证据** 打开。
出现状态不确定或恢复提示时,先使用 **核验并恢复**,按[恢复说明](docs/user/interrupted-recovery.md)处理。
## 不使用 Excel:直接在界面编辑
1. 在 **本批料号规则** 添加旧、新料号,按需配置 Value 与同步 NC;规则提供采集条件和默认值。
2. 切到 **本批位号计划**,点击 **采集所有匹配位号**。
@@ -72,7 +168,7 @@
两种方式可以配合使用,不必为了编辑而先导出 Excel。切换任务会保留编辑草稿;关闭时有未保存内容会提示保存全部、放弃或取消。
## Value、暂停与执行结果
## Value、NC 与日志选项
- 顶部 **Value 策略** 开关控制当前任务是否将替换后的 Part Label 写入 Value;逐行自定义 Value 优先。处理多个任务时,分别确认各任务的开关。
- **同步 NC** 是逐行选项,默认开启,可以关闭。
@@ -80,12 +176,6 @@
- 点击 **替换结果 / 日志** 查看图页、位号、旧料号、实际回读料号和核验状态。失败、未命中、未核验不会显示为已保存成功;完整日志支持翻页。
- 日志和 BOM 详情按需打开,关闭后释放窗口;数据和证据仍保留。
## 完成后再执行一轮
已完成任务可以点击 **开始新一轮**。工具归档旧计划、命令、快照与执行证据,清空过期位号基线,将同批已完成任务恢复为待配置。
接着按工程**当前料号**重新填 BOM 或修改规则,重新采集、保存并执行。旧轮次可通过 **查看轮次证据** 打开。出现状态不确定或恢复提示时,先使用 **核验并恢复**,不要直接重复执行。
## 更新程序与保留数据
先关闭旧程序并备份 `data`。完整解压新包,用新 EXE 和 `_internal` 配合原 `data` 使用;不要混用不同版本的依赖目录,也不要删除原数据。
@@ -104,11 +194,15 @@ DxPartReplace/
## 验证范围与已知限制
V1.1.2 已完成本机冻结 EXE 验收:两个工程实际替换和独立回读、297 字符工程路径、BOM 失败/成功导入、Part Label 写入 Value、旧版任务数据副本、新轮次和自有后台资源释放。详见[成品验收报告](docs/testing/2026-10-15-packaged-acceptance.md)。
V1.1.4 Beta 2 新增批次后台资源管理:一次 BOM 导入或顺序执行共用一个私有桌面,CAD 按需启动并在同批工程间复用,批次结束统一退出。若提示 **资源释放待处理**,已保存核验的结果保留,请点击 **重新清理资源**;该操作只清理后台资源,不会再次替换。旧的工程保护锁仍按“核验并恢复”处理。设计、异常边界与实机结果见[批次运行时验收记录](docs/testing/2026-10-21-batch-private-runtime.md)。
资源释放会追加日志:在 **替换结果 / 日志 → 完整日志** 查看本批开始释放、释放成功/失败及重新清理的结果。独立文件位于 `data/batch-resources/<批次ID>/resource-release.log`,记录批次、桌面、CAD PID、退出码、释放耗时、句柄关闭和桌面消失的分别确认,以及失败原因;同时保留 `session.json` 的原始释放证明。重启后重新检查也会追加记录,不覆盖原失败日志。
V1.1.3 的业务代码沿用本机已验收候选:两工程实际替换和独立回读、362 字符工程路径、BOM 失败/成功导入、Part Label 写入 Value、可选封装、旧版任务数据副本、新轮次和自有后台资源释放。新增图标及版本元数据另做冻结包检查。详见[验收报告](docs/testing/2026-10-19-release-preparation.md)。
当前按 **evaluation-only(评估试用)** 交付。不同机器、中央库和 CAD 版本仍需用工程副本确认兼容性;替换回读通过不代表已通过 Packager、ERC 或网表检查。
首次采集与 CAD 启动可能需要较长时间,存在已知的偶发 COM 启动阻塞;启动有等待上限和清理机制。本次两工程执行约 4 分 19 秒,不承诺其他工程使用相同时间。长路径兼容已覆盖验证场景,不代表旧 CAD 或中央库支持任意路径。
首次采集与 CAD 启动可能需要较长时间,存在已知的偶发 COM 启动阻塞;启动有等待上限和清理机制。验收候选的两工程执行为 167 秒;千步模拟队列为 21.09 秒,两者测量范围不同。长路径兼容已覆盖验证场景,不代表旧 CAD 或中央库支持任意路径。
## 开发与更多资料
@@ -122,9 +216,10 @@ py -3.12 -m venv .venv
源码默认数据目录为 `%LOCALAPPDATA%\DxProductivity\trial-task-center`,可用 `DX_TASK_CENTER_HOME` 指定独立目录。运行回归:`python -m pytest -q`;构建使用 `packaging/Build-DxPartReplace.ps1`。
- [历史窗口 GIF(补充演示,录制于 V1.1.2)](docs/user/media/v1.1.2-window-bom-tutorial.gif)
- [完整桌面使用说明](docs/user/v1.1.0-project-tasks.md)
- [中断核验与恢复](docs/user/interrupted-recovery.md)
- [Value 与属性继承](docs/user/value-copy-and-layout.md)
- [历史流程和独立 CLI 说明](docs/user/trial-task-center.md)
- [CLI 与原生批处理集成](docs/user/part-replacement.md)
- [V1.1.2 版本说明](docs/releases/v1.1.2.md)
- [V1.1.3 版本说明](docs/releases/v1.1.3.md)
+45
View File
@@ -0,0 +1,45 @@
# BOM 导入状态机
用户反馈:失败后重新导入时,旧失败报告在新结果出来前仍显示。导入生命周期由 `bom_import_state.py` 的 `BomImportMachine` 管理;`ProjectPlanPanel` 按批次(无批次则按任务)保存状态机。界面不再分别保存报告缓存和状态文字缓存。
```mermaid
stateDiagram-v2
[*] --> 空闲
空闲 --> 读取表格: 开始
读取表格 --> 校验表格
校验表格 --> 获取库存
获取库存 --> 匹配位号
匹配位号 --> 获取库存: 下一工程
匹配位号 --> 预览就绪: 全部通过
读取表格 --> 校验未通过: 文件错误
校验表格 --> 校验未通过: 格式或规则错误
匹配位号 --> 校验未通过: 匹配错误
读取表格 --> 取消中: 请求取消
校验表格 --> 取消中: 请求取消
获取库存 --> 取消中: 请求取消
匹配位号 --> 取消中: 请求取消
取消中 --> 已取消: 后台收尾完成
取消中 --> 异常: 收尾失败
```
图示突出主路径。读取、校验、库存与匹配阶段均可因运行异常转入 `FAILED`,也可返回含错误行的 `REJECTED` 报告;完整转换规则以 `_NEXT`、`receive`、`finish` 为准。
## 约束
- `phase` 表示业务阶段;`settled` 表示后台工作线程是否完成收尾。收到最终报告后仍可能暂时 `busy=True`,此时禁止启动新导入;取消按钮只在仍接收阶段事件时可用。
- `start()` 增加 `attempt`,同时清除本轮旧报告与提示。取消文件选择不会调用 `start()`。
- 阶段事件由后端 `on_phase(phase, message)` 明确发出,不解析中文提示来判断阶段。普通 `on_progress(message)` 只更新当前合法阶段内的进度。
- 所有转换在 GUI 线程处理。旧停止事件、被替换的状态机实例和旧 `attempt` 的回调都不能更新当前导入。
- 取消请求先进入 `CANCELLING`,阻止后续进度和结果;真实异常优先于取消,工作线程结束才进入 `CANCELLED` 或 `FAILED`。
- `report` 是状态的一部分,摘要和详情在显示时生成。保存、放弃预览只释放报告中的预览引用,保留 `PREVIEW_READY` 的成功含义并更新说明。
- 替换计划草稿独立于导入状态。失败、取消、重试不会自动删除已有草稿。保存与执行前的工程核验保持原流程。
此状态机只负责 BOM 导入,不替代数据库中的任务执行状态,也不管理原生 CAD 会话资源本身。
## 验证
`tests/v1_1/test_bom_import_state.py` 验证轮次隔离、非法倒退、多工程往返、取消与异常优先级、成功报告释放预览后的语义。UI 回归验证阶段事件驱动提示和按钮、等待状态不会被普通摘要刷新覆盖,以及取消后的迟到事件不会恢复旧结果。服务回归验证两工程发出明确的阶段序列。
新增用例先确认失败,再接入实现。首轮 BOM、任务 UI、预览及懒加载定向回归:70 项通过,22.97 秒。测试使用 offscreen Qt 和模拟库存,不重复启动真实 CAD。
最终加入库存取消、界面响应与保存安全回归,合计 90 项通过,34.78 秒。只读代码复核未发现新增问题;两轮测试有重叠,不累加计数。
+412
View File
@@ -0,0 +1,412 @@
{
"version": "1.1.3",
"release_date": "2026-10-19",
"release_tag": "v1.1.3",
"classification": "evaluation-only",
"code_commit": "95c7f9b775af2f7f220c349f897144cf745027b4",
"exe_sha256": "12e299042dd5ecd5d7bd02cf4dd80f72b31a425c5e1702a2f717999fb132a05e",
"icon_sha256": "53bdd393d1db3d101474846fc89e04c010db320766a4b4a4c4222128bad91e98",
"accepted_business_commit": "e6ec267a26efedbab796207b8044533d02222350",
"business_modules_equal_accepted": {
"dx_productivity": true,
"dx_productivity.part_replace": true,
"dx_productivity.part_replace.compatibility_profile": true,
"dx_productivity.part_replace.inputs": true,
"dx_productivity.part_replace.models": true,
"dx_productivity.trial_task_center": true,
"dx_productivity.trial_task_center.batch": true,
"dx_productivity.trial_task_center.batch_backup": true,
"dx_productivity.trial_task_center.batch_rules": true,
"dx_productivity.trial_task_center.bom_batch": true,
"dx_productivity.trial_task_center.bom_import_report": true,
"dx_productivity.trial_task_center.bom_import_state": true,
"dx_productivity.trial_task_center.bom_plan": true,
"dx_productivity.trial_task_center.cad_identity": true,
"dx_productivity.trial_task_center.cell_catalog": true,
"dx_productivity.trial_task_center.cell_catalog_worker": true,
"dx_productivity.trial_task_center.comparison": true,
"dx_productivity.trial_task_center.discovery_cache": true,
"dx_productivity.trial_task_center.errors": true,
"dx_productivity.trial_task_center.evidence": true,
"dx_productivity.trial_task_center.execution_feedback": true,
"dx_productivity.trial_task_center.execution_metrics": true,
"dx_productivity.trial_task_center.inventory": true,
"dx_productivity.trial_task_center.isolated_cad": true,
"dx_productivity.trial_task_center.isolated_desktop": true,
"dx_productivity.trial_task_center.legacy_paths": true,
"dx_productivity.trial_task_center.logging_setup": true,
"dx_productivity.trial_task_center.models": true,
"dx_productivity.trial_task_center.native_helper": true,
"dx_productivity.trial_task_center.native_inventory": true,
"dx_productivity.trial_task_center.native_inventory_protocol": true,
"dx_productivity.trial_task_center.new_round": true,
"dx_productivity.trial_task_center.operation_control": true,
"dx_productivity.trial_task_center.project_context": true,
"dx_productivity.trial_task_center.project_discovery": true,
"dx_productivity.trial_task_center.project_session": true,
"dx_productivity.trial_task_center.project_tasks": true,
"dx_productivity.trial_task_center.quick_run": true,
"dx_productivity.trial_task_center.quick_run_protocol": true,
"dx_productivity.trial_task_center.quick_run_snapshot": true,
"dx_productivity.trial_task_center.read_control": true,
"dx_productivity.trial_task_center.recovery": true,
"dx_productivity.trial_task_center.retention": true,
"dx_productivity.trial_task_center.rule_validation": true,
"dx_productivity.trial_task_center.runner": true,
"dx_productivity.trial_task_center.scanner": true,
"dx_productivity.trial_task_center.sceneos_cli": true,
"dx_productivity.trial_task_center.schematic_backup": true,
"dx_productivity.trial_task_center.service": true,
"dx_productivity.trial_task_center.single_step": true,
"dx_productivity.trial_task_center.spreadsheet_plan": true,
"dx_productivity.trial_task_center.store": true,
"dx_productivity.trial_task_center.store_read_model": true,
"dx_productivity.trial_task_center.store_schema": true,
"dx_productivity.trial_task_center.store_target_plan": true,
"dx_productivity.trial_task_center.target_plan": true,
"dx_productivity.trial_task_center.task_logs": true,
"dx_productivity.trial_task_center.task_queue": true,
"dx_productivity.trial_task_center.ui": true,
"dx_productivity.trial_task_center.ui.detail_windows": true,
"dx_productivity.trial_task_center.ui.dialogs": true,
"dx_productivity.trial_task_center.ui.execution_feedback": true,
"dx_productivity.trial_task_center.ui.execution_state": true,
"dx_productivity.trial_task_center.ui.main_window": true,
"dx_productivity.trial_task_center.ui.mapping_table": true,
"dx_productivity.trial_task_center.ui.messages": true,
"dx_productivity.trial_task_center.ui.operation_state": true,
"dx_productivity.trial_task_center.ui.project_plan": true,
"dx_productivity.trial_task_center.ui.project_summary": true,
"dx_productivity.trial_task_center.ui.queries": true,
"dx_productivity.trial_task_center.ui.run_panel": true,
"dx_productivity.trial_task_center.ui.styles": true,
"dx_productivity.trial_task_center.ui.target_table": true,
"dx_productivity.trial_task_center.ui.task_list": true,
"dx_productivity.trial_task_center.ui.task_log": true,
"dx_productivity.trial_task_center.ui.workers": true,
"dx_productivity.trial_task_center.worker_monitor": true,
"dx_productivity.trial_task_center.worker_runtime": true
},
"vbs_equal_accepted": true,
"native_replacement_rerun_for_icon_release": false,
"program_files": {
"DxPartReplace.exe": "12e299042dd5ecd5d7bd02cf4dd80f72b31a425c5e1702a2f717999fb132a05e",
"_internal/api-ms-win-core-console-l1-1-0.dll": "015bd08815c7b934a8952c3a7578e9ce59f21136e8a880d42bbd414bec2c6058",
"_internal/api-ms-win-core-datetime-l1-1-0.dll": "5534812cdbdae94ba45cb216e5eb9af686b853948df54365103555abbbaf9d9a",
"_internal/api-ms-win-core-debug-l1-1-0.dll": "837d2b1b2cd03e03fc6ccb050698b6b5763af17c201304872342a5eae9e0a2d2",
"_internal/api-ms-win-core-errorhandling-l1-1-0.dll": "de43b165f568c276c00e95acd454e3092f352a18e95874595f4f4658c06d2ec7",
"_internal/api-ms-win-core-fibers-l1-1-0.dll": "3cebc45bf479ad74cfabf2c6bfd4994d7ad639ed1221025981d19cedf9ce0416",
"_internal/api-ms-win-core-fibers-l1-1-1.dll": "5ef70308bcca628ce6b0e2856b15b1c7ae340c3f9bbbc4c1071d8c191a34a5c3",
"_internal/api-ms-win-core-file-l1-1-0.dll": "250ac829f2617bcac1c6e5b8c4f630462e20765863ba573526a3e11bbfb94a9a",
"_internal/api-ms-win-core-file-l1-2-0.dll": "ae14079a114733f60ce87b92cba42acd8083c2cd67594e53bc37dc0b97a4b465",
"_internal/api-ms-win-core-file-l2-1-0.dll": "914bf26a298713119477ea0a8e7bd43171b91344ebe24fb47ad77c49686e3d87",
"_internal/api-ms-win-core-handle-l1-1-0.dll": "ab5489955e371b15f77906c08ec3c7affe2c7a46a08c514ca628768b4478974b",
"_internal/api-ms-win-core-heap-l1-1-0.dll": "c70f9644d8377fa39c5b71f2e9734c1400d7598904fdeb772e8502099982dcb7",
"_internal/api-ms-win-core-interlocked-l1-1-0.dll": "f8129710188e407bb0e6f46d30aeba277d67b947ece5fe09e883fde2323f3ae6",
"_internal/api-ms-win-core-kernel32-legacy-l1-1-1.dll": "5200b16cb2ddc61cfc07373a9a84aa85a3ab50806ca96c879c883275832944c1",
"_internal/api-ms-win-core-libraryloader-l1-1-0.dll": "48786fb88b001dcd1f63acea903d3ca9cc0b3060d5a325e3f2f3cbc3bfd53166",
"_internal/api-ms-win-core-localization-l1-2-0.dll": "9ec3898f7eba91faa28b51616c211a2689e3a13aeef8de6e13cb674e49d689eb",
"_internal/api-ms-win-core-memory-l1-1-0.dll": "3a6cbc524c99e1cd80d5368f5601402a37ad602528b1ab628093573ef638eb3b",
"_internal/api-ms-win-core-namedpipe-l1-1-0.dll": "97145ef89c44949fcf0f04ac834a8bc7d687ef49ee73ae9fc32f3c11136b7201",
"_internal/api-ms-win-core-processenvironment-l1-1-0.dll": "8bc7c10b1851aea644e9c9f381cdb935e091fee6b0be3d3aedc6fffaac96adb7",
"_internal/api-ms-win-core-processthreads-l1-1-0.dll": "d8030b777617c71f0f94564607699dbf7561487d779db9756aed378c5675213f",
"_internal/api-ms-win-core-processthreads-l1-1-1.dll": "f5e676713340f73a03a3d41a6ec9883b431da7d16c7f07bd0a920fb80e6c0753",
"_internal/api-ms-win-core-profile-l1-1-0.dll": "f023d47e44d3eea6b0743580f57e8c6ba81e79d5ebfa7da26250076c647b980e",
"_internal/api-ms-win-core-rtlsupport-l1-1-0.dll": "9746d8930704153578a628c010638a5f818ffe5a927e25591b108e256dc6afca",
"_internal/api-ms-win-core-string-l1-1-0.dll": "7c53ae24c982d16ffd1bf7f918d115b11b7f30e57bc7feaa18cb9781e4abb926",
"_internal/api-ms-win-core-synch-l1-1-0.dll": "56d9d62ca5dba79a6581b8d574a7d8b2a64a5ecb71e47dcf06ed0285708b1859",
"_internal/api-ms-win-core-synch-l1-2-0.dll": "f6482bbec5612c39ecb4822787a333f2b7570f7a5f922a4059be41ba957bb372",
"_internal/api-ms-win-core-sysinfo-l1-1-0.dll": "272d02765fdd3582618236c2d309abba069642f9bc1062ede069d0c144e17007",
"_internal/api-ms-win-core-sysinfo-l1-2-0.dll": "8a0900788859d0eb51c2f48f50cc6ed376a120b518100fa20e11d7702ccde260",
"_internal/api-ms-win-core-timezone-l1-1-0.dll": "ff35de6c03812b332e140f17dade25c5dd4775156da9eeb1eaae3fddd27236ec",
"_internal/api-ms-win-core-util-l1-1-0.dll": "191ef3e98641a57296f19d572d8eb62489470ff1ef6030d136af170c2f835173",
"_internal/api-ms-win-crt-conio-l1-1-0.dll": "54ee5ec719a051496ff60aa00dbeaa94b9a7d2cdac27fe9b7317f1a666b6a2aa",
"_internal/api-ms-win-crt-convert-l1-1-0.dll": "8b94662429171019fcd63c70bbf2095a075170599704a5e7dcdbe3da13f3a429",
"_internal/api-ms-win-crt-environment-l1-1-0.dll": "39e5929593709e8af3bc9e0a75ec1155778d6f4a247f4cdfc58928ad6db88434",
"_internal/api-ms-win-crt-filesystem-l1-1-0.dll": "5a8ecebac32edf4e1f3c5c6c1c8ea1a1add6cda4f9c9cb26f752fb295bea6865",
"_internal/api-ms-win-crt-heap-l1-1-0.dll": "c71080cbcb43bf1f8f3e391deb12a582eb0abefc80946f340675a2c616e4feb4",
"_internal/api-ms-win-crt-locale-l1-1-0.dll": "6c68648e524187e03c4ad9aaa4a99113c6ee9f29fb39cc0ed93f951975138e63",
"_internal/api-ms-win-crt-math-l1-1-0.dll": "d4fbcccbe29371cbce431e43b2eb4f7ba9a6f04a3d740a071f02457a505e9dc8",
"_internal/api-ms-win-crt-process-l1-1-0.dll": "47c1935942e3ac0812e4dcf18c0e265e565f0194a3349111c299712f5565f7ac",
"_internal/api-ms-win-crt-runtime-l1-1-0.dll": "72adc1b3677e0814d9c4ebf0964000e84bb2acf67336c8963061665e44f78029",
"_internal/api-ms-win-crt-stdio-l1-1-0.dll": "900afc3989673c9bb1a687ed38c192f46db9e6ba6d11a668898a539e7fc23798",
"_internal/api-ms-win-crt-string-l1-1-0.dll": "fcf12466cc12fd3b73611fc0763a5a1f9d44e90349513c34a0c83b0f36421793",
"_internal/api-ms-win-crt-time-l1-1-0.dll": "886e57c4a6adb299b38f02945369f590a67da4e79a798359fc60aaa067212d7c",
"_internal/api-ms-win-crt-utility-l1-1-0.dll": "5f8f26b216ade615b67a41f6fbbb910972fc6153315a65bb8f09912be50215b1",
"_internal/base_library.zip": "e96cff223d84ae5804115c3f2e3622601fee1a18125f71ba74e4c9e4f521c05c",
"_internal/libcrypto-3-x64.dll": "deabf96c676dd3652b32da2cb38a7dcc2f2daa8197ad19aba3c7a99454933c1e",
"_internal/libcrypto-3.dll": "ccfffddcd3defb8d899026298af9af43bc186130f8483d77e97c93233d5f27d7",
"_internal/libffi-8.dll": "eff52743773eb550fcc6ce3efc37c85724502233b6b002a35496d828bd7b280a",
"_internal/libssl-3-x64.dll": "e84dcc3caca7720b2b426cb408df3129406e3b4d4ce4e729632bab319013ef6c",
"_internal/libssl-3.dll": "007142039f04d04e0ed607bda53de095e5bc6a8a10d26ecedde94ea7d2d7eefe",
"_internal/pyexpat.pyd": "d615e193d1affcdbfe504e90d3621cbdcff94bf72b79d899126534507fd6d27a",
"_internal/python3.dll": "fb975a606e7fbf74f64260e3f60c3490b4f74a183c0926fd6ed1ac4c52ac7b1c",
"_internal/python312.dll": "9a0e3435aaa680d868150f87ab3e388ad2eebc22f87e036155c7b4eda8cd2120",
"_internal/select.pyd": "d4d7181b11db0bd22a6cd5cda6f8583d1f5c77615fd0a6ca33350619d6e0438a",
"_internal/sqlite3.dll": "8daa45684bf6688fca28d956b2e8942f2fa98f656675ce68e6d61dd869848a7a",
"_internal/ucrtbase.dll": "3239227d27667ba20d10a880751924e5719de0078f9fce232d149d383f7681f6",
"_internal/unicodedata.pyd": "208ee1cd3cbad0828433ca7246b05be2b1ff5569983d27d296c0b38888585488",
"_internal/VCRUNTIME140.dll": "052ad6a20d375957e82aa6a3c441ea548d89be0981516ca7eb306e063d5027f4",
"_internal/VCRUNTIME140_1.dll": "6a99bc0128e0c7d6cbbf615fcc26909565e17d4ca3451b97f8987f9c6acbc6c8",
"_internal/_bz2.pyd": "65f610646d10d5babea080e060d244b546ec52c54012e5e937dc72dcc2e2e7bc",
"_internal/_ctypes.pyd": "0e56107a891100535f2da79d85a5ae65ff1227b4765bd108f8593ac1a1110d81",
"_internal/_decimal.pyd": "aeacfead2befcc0768063a037bb64bd32109ae09cb144e5f571b04dd7965db9d",
"_internal/_elementtree.pyd": "5009a9a53c03ef8387443b5cf6ce08e5c3a79727466a0b931c5bbca915bf89ca",
"_internal/_hashlib.pyd": "03d233dbace599168eaffec823de6ed7beec8c2a4ebfe9b8a3d8e042a59af3ba",
"_internal/_lzma.pyd": "e3deecc1f59a3b811c608861decd84de1e8df8bafd5e2b39188861318c5a38cf",
"_internal/_multiprocessing.pyd": "2c636df7059cb0dd7e978dd735c7c5c8ddb09cf94754cf9e232296b96c5c545a",
"_internal/_queue.pyd": "48e76e0ad63f6932b4a77b5819f41c1e7595636ca8d9e824f0943a14b8bb5035",
"_internal/_socket.pyd": "3efa4636cf9e350856f6927d67a4c2564bf9bd2758a00bbf17d3aece5b60016d",
"_internal/_sqlite3.pyd": "64b51df2805c58b023a875e8ae3be7ac7f61ef664f32ca6c90f6315da47ef0bc",
"_internal/_ssl.pyd": "0bc527d2dbc50009f43b2ed5d5982c4f63f4b647647ffa9eda612dcda80f6040",
"_internal/_uuid.pyd": "acce4f281d7ffb2dec0997527faf25b1df62ad7bd3032c568ddcf65c90edc867",
"_internal/_wmi.pyd": "a980f1e7a29842bd946863fc2693fbeb555a9dc0f9e1630dfed9a2fcdef3ece2",
"_internal/PIL/_avif.cp312-win_amd64.pyd": "6731dce52baab0b96b0eeb3c664844b5b42c2168ea8668af2430e2fbdd2dfbd8",
"_internal/PIL/_imaging.cp312-win_amd64.pyd": "c8c519ec72bf75b2945b4fc4afa854af2fca8b970a403134f9ddda3e164d85e9",
"_internal/PIL/_imagingcms.cp312-win_amd64.pyd": "c89c633ae1bf3f26a327d14ff688db66628e19c9866ab925479f27dcb60a2d6f",
"_internal/PIL/_imagingmath.cp312-win_amd64.pyd": "82ac45c41a008854d05f67deda298b65a7bed850d0d79a3af861ed583f6e7d62",
"_internal/PIL/_imagingtk.cp312-win_amd64.pyd": "690cc1cae4a2dc8594a342b9241e691dcc89d81dad4cddcefdf285275365a2b1",
"_internal/PIL/_webp.cp312-win_amd64.pyd": "9823cebb84f425af3ac1e7437259bc176e7ad7e25d7fa829b0e1a3e55c11be70",
"_internal/PySide6/MSVCP140.dll": "4c667b706893593812cd111b369ba6a77f54d1f1b1ae87cf3bf37692663cfba2",
"_internal/PySide6/MSVCP140_1.dll": "d419d24b0a76366f5c9d908b0e45fe70e9e9154bb8ad5f3de42070f2337f857b",
"_internal/PySide6/MSVCP140_2.dll": "89917964abb6ca16a260cab258e180c3abc239b5af00eed659d0edf0efdd339c",
"_internal/PySide6/opengl32sw.dll": "34b444c016289b560662ff896deceb7f4b2c0723aed3d319ae167c9186ce42b3",
"_internal/PySide6/pyside6.abi3.dll": "d0b5c701fb3a8ea839e72b602058f3960935156ebeca084893c54c99e54dd707",
"_internal/PySide6/Qt6Core.dll": "d6a3c37c5263c5d418fc0e80b722bc9fca7c0859e6f635f9624a2fde00bdc653",
"_internal/PySide6/Qt6Gui.dll": "ae29b005f51b6850bf57fa06fced0dc8c7039fd6fafc3bfbcfe76e38adc7abf1",
"_internal/PySide6/Qt6Network.dll": "dd3512d1c5ed062d30c98426cd0a850f13e0cf31437afb5b0b474132b9c52922",
"_internal/PySide6/Qt6OpenGL.dll": "d51088f16db8c96dba7ef3c1474e611adb3ebdb211fea35b8e755d2a7407f7ad",
"_internal/PySide6/Qt6Svg.dll": "1eac8f7415b311a88cb3cb4e25c3098d0e059c24c831fbbb13f43a80f0df06b7",
"_internal/PySide6/Qt6VirtualKeyboard.dll": "a14fac89759569965dbeb45b2a13e592c0bce0cc559adaa32145fcb92de016f9",
"_internal/PySide6/Qt6Widgets.dll": "ff0df9e2e6827e035f0731a4cedfc6333f4602bca00775e56346f27032406b74",
"_internal/PySide6/QtCore.pyd": "74f96322c5e9cea73aefd2ed5870e5275336b31f552fcd32f12fc81d23f1bc6f",
"_internal/PySide6/QtGui.pyd": "7bef20046045199c037b7cbfedaa1c5464730fa948b2c9ec8afbf718e63774d4",
"_internal/PySide6/QtNetwork.pyd": "c5038bb71fc9d57330fa2d8eeec65aab69fcf02687cc8f54dbfb5995cfec6a71",
"_internal/PySide6/QtWidgets.pyd": "f12f4ca641998e5706d5f7b0023147d573f0f2d2361e26dadf31bdbf05fbfd1d",
"_internal/PySide6/VCRUNTIME140.dll": "f893ae75a1a24eea174d982f94bc80ce2448201eaa919a73c0653a5657685de4",
"_internal/PySide6/VCRUNTIME140_1.dll": "48aa2783793ea18ab3c2c71d420d4fff9814e662a1ff810053c6e5250061a716",
"_internal/pythonwin/win32ui.pyd": "1fc9f8875056b175077ed04e7d93599f58b3cff80bd2077f5f8c8aaa144ab833",
"_internal/pywin32_system32/pythoncom312.dll": "18e5d69b62110f48da01842f9ddfd99d06cc561f0866371714ec6534fcb4e5ec",
"_internal/pywin32_system32/pywintypes312.dll": "9bd7f8c39a84d7b1ea43bfcd33c04631c60f4ff28167e82bb21987cc1c353766",
"_internal/shiboken6/MSVCP140.dll": "fd4a8c046fa3fea9ca6132f50cf8a56cf1e783b2d3093ba5c85fa063bc6b3845",
"_internal/shiboken6/Shiboken.pyd": "2f6f3a694f675b1dafdae26903191613c02866ab48e02591ae34ca1a3b1284f1",
"_internal/shiboken6/shiboken6.abi3.dll": "de3c6b2ed5f75c9ac0de4a6844b653b3b9d09263ce68c2b5fc25a96c5c3e8469",
"_internal/shiboken6/VCRUNTIME140.dll": "de617641d82eac15595d2e39394163ac33e49bb032cf2c2ea0044ed39d3675e9",
"_internal/shiboken6/VCRUNTIME140_1.dll": "fa577d54bd10a91e52472da784a619da6cf241af45f0a0c48b27e91fa0fe6104",
"_internal/win32/win32api.pyd": "8e09d7aa57dc33b663afd219fab21b6a70e9d98cc74a044df4d6cd94799d98c2",
"_internal/win32/win32event.pyd": "a6b896456443447a663fe25783dfa95929dc8ade8d7970fd78d3b4e65100371e",
"_internal/win32/win32evtlog.pyd": "f6f8814147d3ca2761d351c0c86e7142b15b63605a502e5eb62d0bbd2b88e73f",
"_internal/win32/win32file.pyd": "359ef2dc11546f619a9ac53c01a399d621c093b7cfc843fb9d7b211d0b15e103",
"_internal/win32/win32gui.pyd": "f468a03be44633fdeabc08b4a9f8b135f9e31d74b935f85631c23c7fbb9367fa",
"_internal/win32/win32job.pyd": "bfc31798ccf0bcf9b4453903918866abcfb546f5b1d6bd59e4691b83cbe44fa8",
"_internal/win32/win32process.pyd": "6d02ff9b22afa97bdb26d99454462a612848efdc3d0beb54cea2b4912d07a14c",
"_internal/win32/win32service.pyd": "5d159572b89146a13117f24ef0b232d6c24982d206c73189f4952259303de496",
"_internal/win32/win32trace.pyd": "3dd640518a4fb1084cfc38a0e312b87ff1b0b0a74535e320bb9936441b9ed8ca",
"_internal/win32/_win32sysloader.pyd": "db277aae2b8417dbd01435a8691cc74707f6699ae3199e1b205f609cefa5ad24",
"_internal/dx_productivity/trial_task_center/assets/app.ico": "53bdd393d1db3d101474846fc89e04c010db320766a4b4a4c4222128bad91e98",
"_internal/legacy-runtime/dxdesigner795/NativeSnapshotReader.vbs": "1756026bae2626c1ffc2195dbd3bccbede30445b18dc8b3d9064fe5d0da6b646",
"_internal/legacy-runtime/dxdesigner795/QuickPartReplace.vbs": "024b2859d10566d9df3d96f3f98a6ba6bf3b4b94dfc577e7132f0570e23cd48e",
"_internal/PySide6/translations/qtbase_ar.qm": "e03fe68d83201543698fd7fe267dd5dfc5bfd195147e74ff2f19ac3491401263",
"_internal/PySide6/translations/qtbase_bg.qm": "e448ac9e3f16c29eb27af3012efe21052daa78fabfb34cd6dff2f69ee3bd3cdb",
"_internal/PySide6/translations/qtbase_ca.qm": "5298532fc52ffbc4e2c549f277151a61e741921c834286f7c04d3753677b6b04",
"_internal/PySide6/translations/qtbase_cs.qm": "03028b42df5479270371e4c3bdc7df2f56cbbe6dda956a2864ac6f6415861fe8",
"_internal/PySide6/translations/qtbase_da.qm": "7d1e5ca3310b54d104c19bf2abd402b38e584e87039a70e153c4a9af74b25c22",
"_internal/PySide6/translations/qtbase_de.qm": "ed828a83dfaa51944f166c842155b48ab3bd7cb2c46dcd96269eb5d48af4f63f",
"_internal/PySide6/translations/qtbase_en.qm": "494ac9a2b2cb2fdeced353f4a9f898ed8dcf616e9bc667438c62681e3f7f79cf",
"_internal/PySide6/translations/qtbase_es.qm": "4ffda56ba3bb5414ab0482d1dde64a6f226e3488f6b7f3f11a150e01f53fa4c8",
"_internal/PySide6/translations/qtbase_fa.qm": "f78e59b5bdd586181a999034ba418868ed17fe9c05707fb65e523f70e92253d2",
"_internal/PySide6/translations/qtbase_fi.qm": "e47fe13713e184d07fa4495dde0c589b0e8f562e91574a3558a9363443a4fa72",
"_internal/PySide6/translations/qtbase_fr.qm": "314243a55c32679ad473fdfe48dc7d66e973ad0fc8bf2164480c58dddb50c1a7",
"_internal/PySide6/translations/qtbase_gd.qm": "63b439dd44139aa3aed54c2ebe03fa9bc77f22c14ed8fba8eff2608445bb233d",
"_internal/PySide6/translations/qtbase_he.qm": "e1ebca16afe8994356f81ca007fbdb9ddf865842010fe908923d873b687cad3f",
"_internal/PySide6/translations/qtbase_hr.qm": "bb9eec9a9a652c1340dc75eb2e749be50df00f885b3d6900dfc76799c45b244d",
"_internal/PySide6/translations/qtbase_hu.qm": "98463295539d769c8645a0b7fb95ad38454cfd0b14f36af485513f036ddbbbc6",
"_internal/PySide6/translations/qtbase_it.qm": "7808ed542a7833c4bd94ec8bdfbbca00bb4f2fe15979b9121ce3249323687300",
"_internal/PySide6/translations/qtbase_ja.qm": "2b9581c69b975f59be505b127cd3c19d403ef3d12e0e8386fb97238223e9c1df",
"_internal/PySide6/translations/qtbase_ka.qm": "e55e4b72fa620bebee5297ca59dfe2f49894a1e544f2b7485b1cfd8829289d6f",
"_internal/PySide6/translations/qtbase_ko.qm": "0179ed1b136e1cb3f583351eaa2c545ba3d83a6ee3f82c32505926a1a5f5f183",
"_internal/PySide6/translations/qtbase_lg.qm": "31c0cc4ce13b1d74fe0c19ed0b47638fb31e20c93ee08092533e884007aebfb5",
"_internal/PySide6/translations/qtbase_lv.qm": "846e047573ae40c83671c3ba7f73e27efc24b98c82701da0df9973e574178bb2",
"_internal/PySide6/translations/qtbase_nl.qm": "f61513bcdbb6ad800585f9437a95d018aab17fa12ee414aa31462ff279d8240e",
"_internal/PySide6/translations/qtbase_nn.qm": "f9f2fb7c60e7fcb38bbd3c1314ef122145594265e20b0659ff00004baab13ac7",
"_internal/PySide6/translations/qtbase_pl.qm": "3cf6b5c14d5eb0cf81e9af2066e66b3aa579a6b9b3c323ed670761f6254a8c54",
"_internal/PySide6/translations/qtbase_pt_BR.qm": "3475d61604b938d459949801a906dbd34a8ca824ade94120015d676e208da859",
"_internal/PySide6/translations/qtbase_ru.qm": "3da6605668f9178d11a838c4515478084dcfb4f9cf22f99d7a92b492db9c224b",
"_internal/PySide6/translations/qtbase_sk.qm": "d586ae2c314074cf398417fdecb40709d5478dfeb0a67c2fe60d509ee9b59ed7",
"_internal/PySide6/translations/qtbase_sv.qm": "5a2178dd2c03cc4516697f1fb0049649c9ed53f5cde6b937786733dae06aeda8",
"_internal/PySide6/translations/qtbase_tr.qm": "353fdfd7165659a49212e7a25bf91c0a71588e52c836f7496640f26782414634",
"_internal/PySide6/translations/qtbase_uk.qm": "51b8ff55b37dc5907d637a8ddda12fbe816852b0244c74eb4f0fb84867a786e0",
"_internal/PySide6/translations/qtbase_zh_CN.qm": "0481a9b92a6f0578400e960a7d5ee70217a6a450eaf7f98b7d32b8dbd0d58616",
"_internal/PySide6/translations/qtbase_zh_TW.qm": "21012b2b427f8d09d31ce9cae582ca27955b478ca3dc2ec18a3068d808638c6a",
"_internal/PySide6/translations/qt_ar.qm": "b11333c520ccd8e375cde20985df402d586a1a95e0796313bbeb9f717d4db22e",
"_internal/PySide6/translations/qt_bg.qm": "1e22ee126ec9f76031d880285a907b3a0c4510392319ff700dcdee964abbb1ad",
"_internal/PySide6/translations/qt_ca.qm": "17ab2623c7f6e8def44b3dbcb517544185817d65f1298ddb10ef71136f232bdc",
"_internal/PySide6/translations/qt_cs.qm": "c585918fb1d4821a054ea40bdcf279f275ca76c88a5793f433dac6a611ac7e8f",
"_internal/PySide6/translations/qt_da.qm": "f6773c672acb73fdef6e092060d69d1e5dfee840012bac912d1e92de28714386",
"_internal/PySide6/translations/qt_de.qm": "0401c316aa3b50a172eb44a4ff1ec384924073beec7c928ef888ec48e4612688",
"_internal/PySide6/translations/qt_en.qm": "494ac9a2b2cb2fdeced353f4a9f898ed8dcf616e9bc667438c62681e3f7f79cf",
"_internal/PySide6/translations/qt_es.qm": "648ed4519bc45d7a4779479a7626ea16cf9aa23e93a0b178546cc47bea0591ab",
"_internal/PySide6/translations/qt_fa.qm": "3f4c989c6b2990d80cc6299408214b31698923b52f154483b3371875de91f88e",
"_internal/PySide6/translations/qt_fi.qm": "342d01c7eeb234e431d0506821c4cd03c0433115d8d63fee3357be2331858879",
"_internal/PySide6/translations/qt_fr.qm": "c896a38892a92346b033793d56440993236b23e47e06f3974afdb0552f628387",
"_internal/PySide6/translations/qt_gd.qm": "49df855a004a17950338af3146466f6df4d5852410bd0b58ea80e0d0203a9d24",
"_internal/PySide6/translations/qt_gl.qm": "204a01ac7deb6b5bae193afecbd1e50d18c73bf7d94badeb2bbfdf6123c4ed93",
"_internal/PySide6/translations/qt_he.qm": "36f01fff2f25e116d4b7af78097b7e49520fd5b7fb6fb120e40be228c05c045f",
"_internal/PySide6/translations/qt_help_ar.qm": "222088c9752d1cc3bab985ef2dc77e5ae78578dce18a61ec15b39f02e588163d",
"_internal/PySide6/translations/qt_help_bg.qm": "cbcdd1e0bbae332d80ddb0a286056f17c824fa28d353d7fdf12fc97d9f6fe054",
"_internal/PySide6/translations/qt_help_ca.qm": "fe40962c814a9f489e18d033e4aaabe435232c9bcf760830c6165af507cca80e",
"_internal/PySide6/translations/qt_help_cs.qm": "4ac56fc63e400943bab13f1d4c418502138908e1d488c24aee6131d3d17552aa",
"_internal/PySide6/translations/qt_help_da.qm": "6bb092552a398687119f6d52145f04bf8373977446d8f00c0dcbd56b96829f0f",
"_internal/PySide6/translations/qt_help_de.qm": "037bc99abf98571ae9375c2513536c15b571d66406c36c1de447b547ff539c07",
"_internal/PySide6/translations/qt_help_en.qm": "494ac9a2b2cb2fdeced353f4a9f898ed8dcf616e9bc667438c62681e3f7f79cf",
"_internal/PySide6/translations/qt_help_es.qm": "fd16b279f8cf69077f75e94d90c9c07a2afff3948a579e3789f5ffb5e5f4202d",
"_internal/PySide6/translations/qt_help_fr.qm": "875ee2dcdc64e3dea888d84048e382d3921a175f12847de2e6b1cb12ad9add50",
"_internal/PySide6/translations/qt_help_gl.qm": "7399a248609974773f60866c87b78ea7dfbc4f750313d692f7886cd763883c9f",
"_internal/PySide6/translations/qt_help_hr.qm": "8c8cc3c5b1ab2b074f82937001b896603420ef75592b3b78172177360dd7ea61",
"_internal/PySide6/translations/qt_help_hu.qm": "7be32e015119c969453abb6e8f3fb377963a69fafb10c27b796737b5eb283eaf",
"_internal/PySide6/translations/qt_help_it.qm": "316fe8d0815e2b4b396895beb38ef1a40431915b5e054df80f4c0cd556f26e4b",
"_internal/PySide6/translations/qt_help_ja.qm": "ae603b2c0d434d40cde433ffcba65f9ee27978a9e19316007be7fe782a5b8b47",
"_internal/PySide6/translations/qt_help_ka.qm": "159c74f94b384b5ee6afdf38b6cfc4806bc99ecf73be02d4a7021d4ceba7ec7e",
"_internal/PySide6/translations/qt_help_ko.qm": "f11c64694e8e34e1d2c46c1a1d15d6ba9f2db7b61de4fdf54eca5ab977c3e052",
"_internal/PySide6/translations/qt_help_nl.qm": "44a8a0daf775d14352180052d13f623814d7bdf98e2c5c80144b7bf74214e3b0",
"_internal/PySide6/translations/qt_help_nn.qm": "4c8a7213942078e4f72f5babd26c41b77ace70189714a58b5504a7d5ad0193dc",
"_internal/PySide6/translations/qt_help_pl.qm": "cc6cb4d8c54086224672f2e49e623c8cb7c0c1cd65b8d5ecd42fc9ba3a6065bd",
"_internal/PySide6/translations/qt_help_pt_BR.qm": "b4015c5d519b4fe93c00bf734d1742e4f0094d89862664d548eb64a46a2feae7",
"_internal/PySide6/translations/qt_help_ru.qm": "557b644e6da5f1ec720ef93965617087e4d1f40b2494cc5aa524cf3796108de7",
"_internal/PySide6/translations/qt_help_sk.qm": "f41e33e1d790bd0d3eb180f1f875bc191fe74773628f25c2cad95e1402e66867",
"_internal/PySide6/translations/qt_help_sl.qm": "2ec955e662407ebcd8dcdae5aaa21e4108e0b5b0aee0e9db712c27072943535f",
"_internal/PySide6/translations/qt_help_sv.qm": "95bdb03dbaa6dbdfda46c249e9ccce9a353f71ddb8b112961e8b005b2c60b13c",
"_internal/PySide6/translations/qt_help_tr.qm": "81da2f88cd624097581f2d29b10311796bcd9ab289e65883346d276110542d28",
"_internal/PySide6/translations/qt_help_uk.qm": "497cfc473684692ee44d7a3795e8fb2270c57069fd9eb98a615dd29ab9be8a7c",
"_internal/PySide6/translations/qt_help_zh_CN.qm": "e256d1f6034a5a5521c62f129f91731216e474f71e1d9caea3d3dcb11b670deb",
"_internal/PySide6/translations/qt_help_zh_TW.qm": "40112812abb43853d678cc6d97729f21f21b3a7321c827fc9d18f6c936447d1e",
"_internal/PySide6/translations/qt_hr.qm": "fc9e4146f33be3d09b234be01e56235d3037d8d82d64f0700b4d4a6e253a61a7",
"_internal/PySide6/translations/qt_hu.qm": "c2fa649f167cdb801d1cc0cb69c1d93594fd5bf8c0b7e79b969935da5c3e19aa",
"_internal/PySide6/translations/qt_it.qm": "9e7a18bc20ebeec54baaaf41c918a74534511271f796dffffd0f9b9ec31c68d3",
"_internal/PySide6/translations/qt_ja.qm": "0f5fe50452947d1ee9755249d860354bff6977279b4c496a5bc77e5b89dd745e",
"_internal/PySide6/translations/qt_ka.qm": "00b67c6dfc255079b5b98a5640f82519c96b2520a028682fba4078b39d743eaa",
"_internal/PySide6/translations/qt_ko.qm": "1d254b535e1cb35cbcad8210b15b89f4488159826bf35b4504696263dd102fa3",
"_internal/PySide6/translations/qt_lg.qm": "6ba668501f4c040c66da1bdc022362da3c8cf663da6aa484cbdb599028da98ed",
"_internal/PySide6/translations/qt_lt.qm": "47eb5f97467df769261421d54a5bea1131c9fb9b6388791d38bb6574335b64bf",
"_internal/PySide6/translations/qt_lv.qm": "addeca285282338294f24ca50d37d08a5f68d3785d0a94af86dd4ec8f2a3b449",
"_internal/PySide6/translations/qt_nl.qm": "39e870cbd25c0f97fa9b1828d5ea1ed9849857a2e26c5321b3f13c76be8f0548",
"_internal/PySide6/translations/qt_nn.qm": "4e544e23f75eafe1553dc896973db23b5795cd243786d5c653cc0f36a46ca74f",
"_internal/PySide6/translations/qt_pl.qm": "e6890afa0caf0f6db0248e4c94f6016b8ec8bc266f1e0e9b8f01e8ea912cf968",
"_internal/PySide6/translations/qt_pt_BR.qm": "0e24c58e35271853f8cdfb3f0f7b0741b5a9a588e43cdec62ae85a3842771e0a",
"_internal/PySide6/translations/qt_pt_PT.qm": "2c1e7bbf5168a64b43752dd4c547601c0bde6d610f8671fa3e3af38597e84783",
"_internal/PySide6/translations/qt_ru.qm": "1b388e2d6d1bd405603e794e498c6d7ec5f5a5ad819243546f6399181da36758",
"_internal/PySide6/translations/qt_sk.qm": "840c3b01c89df976fc1d2e5bfc6fc84b65666b8a3ceb4cbf5aa0c22af3d2a383",
"_internal/PySide6/translations/qt_sl.qm": "c44e0313a9414cc0e490b65b0c036fa11bca959353b228886547bc2c8492034f",
"_internal/PySide6/translations/qt_sv.qm": "daaae448e0814b469ac3d7a91096fde15491600a6b8bc6c01508425fb5e8b3ec",
"_internal/PySide6/translations/qt_tr.qm": "59e8a0c411be3b0802a68561b090f182099d6b75c4fe46f398e55f11528e11b9",
"_internal/PySide6/translations/qt_uk.qm": "053ec1f677c4dba48c6a97eb28f4fc78c1511324d1843d7f4cec2c7c00a66145",
"_internal/PySide6/translations/qt_zh_CN.qm": "c0e29d32c9540a7e78643b74214e633c56f6ab11f018e516629f2c11b1fb09fc",
"_internal/PySide6/translations/qt_zh_TW.qm": "24e226954491689549a1a1990db3b8cb78888008d8163b2fd2442b772b6d1b5f",
"_internal/PySide6/plugins/generic/qtuiotouchplugin.dll": "aa9080fa8b1c3cf4d3790c1eecf4a1f5c796ce58f31f80910357578f20fd80ac",
"_internal/PySide6/plugins/iconengines/qsvgicon.dll": "5bb97b6f114682ae0b5f42b23b6818aece6499bad88dac80a138efa8a88c12bc",
"_internal/PySide6/plugins/imageformats/qgif.dll": "d301d7e9a68327692e4c76faa6b125517730b22c68f4de7f09fda9d4ac0ddee1",
"_internal/PySide6/plugins/imageformats/qicns.dll": "49db148fea9f01e9953fd0a771d16cfaf364599f07aab3634d4f5c7c25abd78a",
"_internal/PySide6/plugins/imageformats/qico.dll": "1684fd56f1758167f7b3ac011264ae5859b3cf6113e381626ec3dc1d3122fe52",
"_internal/PySide6/plugins/imageformats/qjpeg.dll": "6517345ac19f5c489daeadc029d0018bbdc09d8e1031c60d714557972f22c6d4",
"_internal/PySide6/plugins/imageformats/qsvg.dll": "4b7d65ba39be58cb469b54b5fdee2987871d67e5050cd70724016e09966e54f6",
"_internal/PySide6/plugins/imageformats/qtga.dll": "6b0381150070fcd4224597fe73c68b47055b30b418aa14794c94c5007d14ca5d",
"_internal/PySide6/plugins/imageformats/qtiff.dll": "3d6ea04da215ee2a9459399fb9f6d73cad8787944b9d450399025bcd39d020b5",
"_internal/PySide6/plugins/imageformats/qwbmp.dll": "1a4596509987e9557edda69ed13cdd0d33f4ebda72e464ddc00a566bec05f151",
"_internal/PySide6/plugins/imageformats/qwebp.dll": "6b2c53cc4423140c29a6a1eb6dd908016e09d794b5739a05a3a39c8c49a0df8a",
"_internal/PySide6/plugins/networkinformation/qnetworklistmanager.dll": "e571a4b4e582738cd1bc4889cb2896635c2543baff408442701b6706a1b4a86e",
"_internal/PySide6/plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll": "e10c64dd2ae4f9b756ec1ebe3950a05e345ba40834b7be2900af426623d85475",
"_internal/PySide6/plugins/platforms/qdirect2d.dll": "56f41ad523d016fe2cf2c90fae158e21766d1fcd021bced1a3704c6da0f00c98",
"_internal/PySide6/plugins/platforms/qminimal.dll": "768a9c6dbb1c86abbefa2ff9d7e98cdfb4fdc9292eb8d64195bb6d23939a5344",
"_internal/PySide6/plugins/platforms/qoffscreen.dll": "e776251668440169ed18a2fe1b236762d514ef5244639cbb559b5a77ddd38954",
"_internal/PySide6/plugins/platforms/qwindows.dll": "bf6dbc3009f386fa22f0ced560bea6bbf3e0e0b4442d2fb855db67cffce49dbf",
"_internal/PySide6/plugins/styles/qmodernwindowsstyle.dll": "a7a6424c23bf371bd28a404a196b210971726f6f2a87b63aac185a5e6e40da71",
"_internal/PySide6/plugins/tls/qcertonlybackend.dll": "67be4d333a0f489d02714169a6ec54eaa80efa649d733fcbeb81881ecb02b4f3",
"_internal/PySide6/plugins/tls/qopensslbackend.dll": "7a0727417b8e21e64d9a7cf0f390bc85b3e337b4eef5ac977f49659d97e6b552",
"_internal/PySide6/plugins/tls/qschannelbackend.dll": "14abc5b245c0f2e03f7bc0b474a8db2ecb441c7300a8a8b16fb865eaf2674619"
},
"data_directory_excluded": true,
"gif_sha256": "4b3fed6694ab08d921ca88f92babb0af16380489533d9ed43b143e720d6e04d3",
"gif_recorded_version": "1.1.2",
"bom_sha256": "877c9164e5230219a43c4c3df0b204be7fa08419e95080ffe782fbb8311761a8",
"acceptance_report": "docs/testing/2026-10-19-release-preparation.md",
"build_log": "build/release-113-build-final.log",
"zip_sha256": "f1fe7d7f2eb8fe83928f0fa7a3ab59638032b05bc66f89c92c00dd428ccf3fcd",
"zip_bytes": 58119736,
"file_count": 256,
"extracted_zip_smoke": true,
"build_checks": {
"passed": 701,
"seconds": 101.11,
"warning_count": 1
},
"icon_verification": {
"passed": true,
"file_version": "1.1.3.0",
"embedded_icon_sizes": [
[
16,
16
],
[
20,
20
],
[
24,
24
],
[
32,
32
],
[
40,
40
],
[
48,
48
],
[
64,
64
],
[
96,
96
],
[
128,
128
],
[
256,
256
]
],
"window_icons": [
{
"kind": 0,
"size": [
20,
20
],
"max_rgb_difference": 1,
"matches_source": true
},
{
"kind": 1,
"size": [
40,
40
],
"max_rgb_difference": 1,
"matches_source": true
}
],
"exit_code": 0
},
"initial_packaging_probe": {
"blank_bom_check_updated": "Styled empty Excel editing row is valid; verify all data cells empty rather than max_row==1. Original staging evidence retained."
}
}
+22
View File
@@ -0,0 +1,22 @@
# V1.1.3 发布构建记录
发布日期:2026-10-19。产品源码提交:95c7f9b775af2f7f220c349f897144cf745027b4。版本标签另包含发布文档,产品代码无后续变化。
本次增加可编辑 SVG、PNG 和十尺寸 Windows ICO,统一源码与冻结包窗口图标、稳定的任务栏 AppID 和 Windows 文件版本。应用程序版本 1.1.3,文件版本 1.1.3.0。
- 标准构建检查:701 passed,101.11 秒,1 条 pywinauto COM STA 提示;冻结包构建与启动退出正常。
- 资源路径回归保留失败反例及修复后 9 项通过记录;重启恢复夹具保留全部业务断言,仅隔离新增外观初始化。初次构建失败日志未覆盖,最终构建单独记录。
- 最终 ZIP 解压后运行 EXE,移除源码导入路径,启动版本与正常退出日志通过。
- EXE 实际嵌入 16、20、24、32、40、48、64、96、128、256 像素图标;运行窗口实际返回 20 / 40 像素大小图标,与源图逐像素比较的最大 RGB 差为 1(透明度舍入),均匹配。
- 78 个业务模块编译码与已验收 e6ec267 候选一致,两份 VBS 哈希一致。只有应用入口外观初始化、版本模块与资源发生预期变化。
- 本次未重新做 CAD 替换,业务流程沿用[本机冻结候选验收](../testing/2026-10-19-release-preparation.md)。
便携包 58,119,736 字节,256 个文件,不含本机任务、数据库、日志或工程备份。默认 BOM 保持 11 列,格式化的空白编辑行不含工程或替换数据。GIF 沿用 V1.1.2 录制,README 明确说明适用范围,未伪称新录制。
- ZIP SHA256:f1fe7d7f2eb8fe83928f0fa7a3ab59638032b05bc66f89c92c00dd428ccf3fcd
- EXE SHA256:12e299042dd5ecd5d7bd02cf4dd80f72b31a425c5e1702a2f717999fb132a05e
- ICO SHA256:53bdd393d1db3d101474846fc89e04c010db320766a4b4a4c4222128bad91e98
程序文件逐项哈希、模块对照与图标验证见[构建清单](v1.1.3-build.json)。本地完整构建及图标证据在 build/release-1.1.3-20261019-final;本版使用新的发布标签及附件,旧 V1.1.2 附件保持不变。
发布附件:DxPartReplace-1.1.3.zip、SHA256SUMS-1.1.3.txt、release-manifest-1.1.3.json、BOM-template.xlsx、window-tutorial-1.1.3.gif。先建立草稿,附件上传后逐项回下载核对 SHA256,通过后公开。
+33
View File
@@ -0,0 +1,33 @@
# DxPartReplace V1.1.3
发布日期:2026-10-19。交付级别:评估试用,与既有版本一致。
新增应用图标,统一 EXE、窗口、任务栏和切换窗口显示,补充 Windows 文件版本信息。本版同时发布此前已验收的可选目标封装、原生 CLI 位号采集、执行保护及队列性能优化。
## 下载与使用
完整解压 `DxPartReplace-1.1.3.zip`,运行 `DxPartReplace.exe`。无需安装 Python,本机需要可用的 DxDesigner / Expedition Enterprise 7.9.5、许可证和已配置的中央库。
[中文教程及 GIF](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.3/README.md)。包内包含离线教程、默认 11 列 BOM 空表及封装使用说明。GIF 录制于 V1.1.2,步骤适用于本版,图标与版本号以本版为准。
## 本版变化
- 应用图标支持 16~256 像素,EXE 属性显示 1.1.3 版本。
- 目标封装可留空;留空时不主动覆写 Cell Name,可后续与中心库同步。明确选择时仍核验合法性、写入和保存重开结果。
- BOM 保持 11 列,优先使用原生 CLI 采集位号;导入报告区分通过、失败、未检查,保存前不写入计划。
- 修复窗口销毁后后台结果回调访问已释放控件的问题;保留退出等待后台安全收尾。
- 去掉队列中重复的路径解析与日志文件检查,保留逐步证据、fsync、原子发布和实时身份核验。
## 验证范围
业务流程沿用提交 e6ec267 的冻结候选验收:两个工程顺序替换、362 字符路径、错误及正确 BOM、保存重开、独立新 CAD 回读、层次及展开网络比对、日志窗口、新一轮、1.1.1 元数据升级和私有桌面释放均通过。仅目标 RV05 属性变化,其余 56 个器件及全部引脚、网络连接不变;原工程和中央库跟踪的 1033 个文件哈希未变。双工程执行 167 秒,千步模拟 21.09 秒,两者测量范围不同。
本次仅增加图标、应用身份和版本信息,另做源码构建检查、最终 ZIP 解压启动、图标与 Windows 版本资源检查。未把这些外观检查计作新一轮真实 CAD 替换。发布清单核对除 application/version 外的全部业务模块编译码及 VBS 与已验收候选一致。
详见[验收报告](../testing/2026-10-19-release-preparation.md)及[本版构建记录](v1.1.3-build.md)。
## 升级
关闭旧程序并备份 `data`,用本版配套的 EXE 与 `_internal` 运行,保留原数据。不同版本不要同时打开同一数据目录。中断且尚未核验的旧任务先按原流程恢复,保留日志和原始证据。
旧版本发布附件保持可下载。附件含 ZIP、BOM 空表、GIF、构建清单与 SHA256 校验文件;发布前逐项上传并回下载核对。
+44
View File
@@ -0,0 +1,44 @@
{
"version": "1.1.4-beta.1",
"release_tag": "v1.1.4-beta.1",
"classification": "beta",
"prerelease": true,
"code_commit": "e46982af6c3ea145cfa04486a54227ca02ecdd89",
"application_entry_matches_source": true,
"vbs_match_source": {
"QuickPartReplace.vbs": true,
"NativeSnapshotReader.vbs": true
},
"data_directory_excluded": true,
"gif_recorded_version": "1.1.2",
"acceptance_report": "docs/testing/2026-10-21-batch-private-runtime.md",
"build_log": "build/release-1.1.4-beta.1-build.log",
"zip_sha256": "acf9f13617b5c25ddfe4c9e4df90481f6ca7838329bca1c201e7c1fdfe27d4a1",
"zip_bytes": 60266953,
"file_count": 396,
"extracted_zip_smoke": true,
"exe_sha256": "c0a43c302568206c9bbfc02203daded1df8e19df1d2083c2f0961eddd213a900",
"build_verification": {
"passed": 822,
"warnings": 1,
"seconds": 211.19
},
"frozen_helper_verification": {
"passed": true,
"version": "1.1.4-beta.1",
"windows_numeric_version": "1.1.4.1",
"windows_prerelease_flag": true,
"frozen_marker_written": true,
"stale_marker_rejected": true,
"commands": [
"probe",
"checkpoint",
"quit"
],
"opened_projects": [],
"resources_released": true,
"observer_errors": []
},
"business_module_count": 84,
"business_modules_all_match_source": true
}
+32
View File
@@ -0,0 +1,32 @@
# V1.1.4 Beta 1 构建与发布记录
源提交:`e46982af6c3ea145cfa04486a54227ca02ecdd89`。本次后续提交只补充构建记录,程序代码不变。版本显示为 `1.1.4-beta.1`,Python 包元数据为等价的 `1.1.4b1`;Windows 数字版本为 `1.1.4.1`,设置 `VS_FF_PRERELEASE`。
## 本次检查
| 项目 | 结果 |
| --- | --- |
| 标准打包检查 | 822 passed,211.19 秒;1 条已知 pywinauto COM 模式提示 |
| 冻结代码对应源码 | 84 个业务模块及应用入口编译码全部一致,两份 VBS SHA256 一致 |
| ZIP 解压 | 完整性检查、逐文件校验和解压后的 EXE 启动/干净退出通过 |
| 版本信息 | 数字版本 1.1.4.1 与 Windows 预发布标志通过 |
| 冻结保护标记 CLI | 当前尝试写入成功;旧代次被拒绝且原记录不变 |
| 冻结 CAD 助手 | 实际调用 ZIP 解压 EXE 的 probe → checkpoint → quit,通过 |
| CAD 与桌面释放 | CAD/退出助手码均为 0,批次 released,pending 为空,释放日志保留 |
| 主桌面 | Default 保持不变,无自有 CAD 前台/主桌面污染,无观察错误 |
| 用户数据 | 包内不含运行数据目录、任务数据库、现场日志或工单附件 |
本轮冻结助手验证没有打开任何工程,也没有重复替换;真实两工程替换范围和限制沿用[已记录的源码实机验收](../testing/2026-10-21-batch-private-runtime-live.md)。
初次便携包暂存被隐私目录检查阻止:仓库公开的 `docs/testing/data` 内有三份已提交的验收 JSON,被宽泛的 `data` 名称检查误判。保留失败暂存,调整为明确禁止包根运行数据和所有数据库/日志文件,在新暂存目录重新生成并通过;未放行用户数据。
## 附件
- `DxPartReplace-1.1.4-beta.1.zip`:60,266,953 字节;包含程序、完整离线文档、GIF 和空 BOM 模板。
- `BOM-template.xlsx`、`window-tutorial-1.1.4-beta.1.gif`、`release-manifest-1.1.4-beta.1.json`、`SHA256SUMS-1.1.4-beta.1.txt`。
- ZIP SHA256:`acf9f13617b5c25ddfe4c9e4df90481f6ca7838329bca1c201e7c1fdfe27d4a1`。
- [紧凑构建记录](v1.1.4-beta.1-build.json);完整逐文件清单在发布附件的 manifest。
新发布与四个旧发布都设为 Beta 预发布。旧发布只增加 Beta 标题并调整 prerelease 状态,逐一确认原标签、正文和附件 ID/名称/大小不变。新附件先上传到草稿,逐项回下载核对 SHA256,再转为公开 Beta。
本机原始证据位于 `.worktrees/batch-runtime/build/release-1.1.4-beta.1`,构建日志为同工作树 `build/release-1.1.4-beta.1-build.log`。
+31
View File
@@ -0,0 +1,31 @@
# DxPartReplace V1.1.4 Beta 1
发布日期:2026-10-21。**Beta 预发布版**。此前发布也统一标记为 Beta,原标签、附件及下载地址保留。
## 下载与升级
完整解压 `DxPartReplace-1.1.4-beta.1.zip`,运行 `DxPartReplace.exe`。无需安装 Python;本机需要可用的 DxDesigner / Expedition Enterprise 7.9.5、许可证和中央库。
升级前关闭旧程序并备份 `data`,保留原数据,配套更新 EXE 与 `_internal`。不要让不同版本同时打开同一数据目录;历史保护锁不会自动解除。
[中文图文教程](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.1/README.md)。包内包含离线图文教程、GIF、默认 11 列 BOM 模板、构建清单和 SHA256 校验。教程图片及 GIF 沿用已验收的旧版录制,新增的“重新清理资源”与释放日志以本版界面为准。
## 本版更新
- 每次 BOM 导入和顺序执行分别作为一个批次,共用一个私有桌面;CAD 按需启动,在批内跨工程复用,批末统一退出。
- 工程之间确认上一工程已关闭,重新核验路径、中心库、图页及目标身份;保留保存、关闭、重开回读流程。
- 首次可能写入前持久化保护标记。只有明确证明尚未修改且旧资源已释放时,允许重建重试一次;身份冲突、已修改或结果不确定时不自动重放。
- 释放失败保留已保存并核验的任务结果,阻止新批次,提供“重新清理资源”;清理操作不重复替换,重启后仍检查未收尾批次。
- 释放日志显示开始、成功、失败和重新检查,包含耗时、CAD退出码、句柄关闭与桌面消失的分别确认、失败原因。同批各任务“完整日志”可见,独立文件位于 `data/batch-resources/<批次ID>/resource-release.log`。
- 修复 BOM 错误回报与清理错误同时发生时丢失逐行报告的问题;清理失败只保留诊断,不提供可应用的部分预览。
- 保留原生 CLI 优先采集,减少不必要的 CAD 回退;原生会话重试耗尽时停止整批。
## 验证与范围
两个全新工程副本完成 BOM 导入、实际替换、保存重开、独立完整属性/连接回读和资源释放。两版本保存结果一致;各工程 57 个组件、103 个引脚连接,56 个非目标组件属性和连接不变,源工程及中心库 `.lmc` 哈希不变。
相同样例单次对照:BOM 加执行总耗时 170.860 → 151.859 秒,私有桌面创建 6 → 2 次,CAD 启动 2 → 1 次。该结果不代表固定加速比例;BOM 单次测量 2.250 → 3.187 秒。
工单完整库存覆盖的 31 行回放为 20 通过、11 失败,未强行放行不匹配项;其余 406 条替换行、96 个工程未获对应完整库存,不能宣称全部工程已实机通过。用户机器的外部桌面引用残留根因尚未在本机复现。
详见[批次运行时验收](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.1/docs/testing/2026-10-21-batch-private-runtime.md)、[实机对照](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.1/docs/testing/2026-10-21-batch-private-runtime-live.md)和[释放日志验证](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.1/docs/testing/2026-10-21-resource-release-logging.md)。
+78
View File
@@ -0,0 +1,78 @@
{
"version": "1.1.4-beta.2",
"release_tag": "v1.1.4-beta.2",
"classification": "beta",
"prerelease": true,
"code_commit": "1ee519e5d25e4052f20b7b32ad18dcd837eb948d",
"application_entry_matches_source": true,
"vbs_match_source": {
"QuickPartReplace.vbs": true,
"NativeSnapshotReader.vbs": true
},
"data_directory_excluded": true,
"gif_recorded_version": "1.1.2",
"build_log": "build/release-1.1.4-beta.2-build.log",
"zip_sha256": "21d242d1c4bd015f3b140d01f08e6779be0b6408f4d0deef09b457ec22a00325",
"zip_bytes": 60682629,
"file_count": 402,
"extracted_zip_smoke": true,
"exe_sha256": "0247347e33389025e9dab61065040a1589ed14876eaa9db5cf8fabd24604c360",
"build_verification": {
"passed": 824,
"warnings": 1,
"seconds": 177.39
},
"packaging_checks_passed": 2,
"acceptance_guard_checks_passed": 15,
"business_module_count": 84,
"business_modules_all_match_source": true,
"frozen_main": {
"passed": true,
"win32timezone_archived": true,
"process_creation_time_read": true,
"resources_released": true,
"windows_numeric_version": "1.1.4.2",
"windows_prerelease_flag": true
},
"ui_acceptance": {
"full_exe_all_program_files_match_zip": true,
"template_columns": 11,
"imports": [
{
"file": "BOM-含错误位号.xlsx",
"seconds": 9.889999999999418,
"title": "本批 BOM 校验未通过 · 通过 2 / 失败 1 / 未检查 0 行 · 详情"
},
{
"file": "BOM-替换RV05.xlsx",
"seconds": 4.734000000011292,
"title": "本批 BOM 校验通过 · 通过 2 / 失败 0 / 未检查 0 行 · 详情"
}
],
"search_preserves_tasks": true,
"execution_seconds": 209.40600000001723,
"completed_tasks": 2,
"cad_starts": 1,
"queue_desktop_generations": 1,
"all_batches_released": true,
"results_window_reopened": true,
"observer_initial_path_mismatch_retained": true,
"read_only_post_verification_passed": true,
"replacement_replayed": false
},
"independent_graphs": {
"passed": true,
"components_each": 57,
"pin_connections_each": 103,
"unchanged_non_targets_each": 56,
"source_hashes_unchanged": true,
"library_lmc_hash_unchanged": true
},
"acceptance_report": "docs/testing/2026-10-23-issue-2-frozen-runtime.md",
"old_release": {
"tag": "v1.1.4-beta.1",
"withdrawn_to_draft": true,
"public_release_api_status": 404,
"git_tag_retained": true
}
}
+25
View File
@@ -0,0 +1,25 @@
# V1.1.4 Beta 2 构建与发布记录
日期:2026-10-23。源快照 `1ee519e5d25e4052f20b7b32ad18dcd837eb948d`;后续提交仅补充本次构建记录。
修复工单 #2 的 pywin32 动态依赖漏打包。版本 `1.1.4-beta.2`,Python 元数据 `1.1.4b2`,Windows 数字版本 `1.1.4.2`,带预发布标志。
| 验证 | 结果 |
| --- | --- |
| 发布门禁 | 824 passed,177.39 秒;1 条既有 pywinauto STA COM 警告 |
| 额外检查 | 打包配置 2 项,验收脚本 15 项通过 |
| 冻结主进程 | 最终 ZIP 解压 EXE 实际读取工作进程创建时间,确认进程退出和桌面释放 |
| 源码一致性 | 84 个业务模块、应用入口编译码、两份 VBS 哈希一致 |
| 完整 EXE 双工程 UI | 创建任务、默认模板导出、错误/正确 BOM 导入、保存计划、实际替换、保存重开、结果日志重开通过 |
| 执行批次 | 209.406 秒;一次 CAD 启动,一个桌面代次;资源最终释放 |
| 独立前后对照 | 每工程 57 组件、103 引脚连接,56 个非目标组件属性/连接不变,目标料号和 Value 正确 |
| 原始数据 | 源工程目录完整哈希、中央库 .lmc 哈希不变 |
| 最终 ZIP | 完整性、解压 smoke、逐文件与已验收 UI 包比对通过;不含运行 data、任务数据库或现场日志 |
旧外部观察器未扫描批次资源目录造成的验收断言保留在原始记录中。已补齐观察器并完成测试,采用只读续验确认已完成的执行和资源释放,没有再次替换。细节见[工单修复与实机记录](../testing/2026-10-23-issue-2-frozen-runtime.md)。
ZIP:`DxPartReplace-1.1.4-beta.2.zip`,60,682,629 字节。SHA256:`21d242d1c4bd015f3b140d01f08e6779be0b6408f4d0deef09b457ec22a00325`。
附件包括便携 ZIP、默认 BOM 模板、GIF、SHA256SUMS 和逐文件 manifest。GIF 沿用 1.1.2 教程,包内说明已标明。
Beta 1 已撤回为草稿,匿名发布 API 返回 404;其 Git 标签和原附件保留用于回溯。Beta 2 先以草稿上传,回下载核对附件哈希后再公开为 Beta。紧凑证据见[构建 JSON](v1.1.4-beta.2-build.json)。本机原始证据为 `build/release-1.1.4-beta.2`。
+43
View File
@@ -0,0 +1,43 @@
# DxPartReplace V1.1.4 Beta 2
发布日期:2026-10-23。**Beta 预发布版**。替代已撤回的 V1.1.4 Beta 1;旧 Git 标签保留供回溯,旧发布不再提供公开下载。
## 下载与升级
完整解压 `DxPartReplace-1.1.4-beta.2.zip`,运行 `DxPartReplace.exe`。无需安装 Python;本机需要可用的 DxDesigner / Expedition Enterprise 7.9.5、许可证和中央库。
升级前关闭旧程序并备份 `data`,保留原数据,配套更新 EXE 与 `_internal`。不要让不同版本同时打开同一数据目录;历史保护锁不会自动解除。
[中文图文教程](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.2/README.md)。包内包含离线图文教程、GIF、默认 11 列 BOM 模板、构建清单和 SHA256 校验。教程图片及 GIF 沿用已验收的旧版录制,新增的“重新清理资源”与释放日志以本版界面为准。
## Beta 2 修复
- 修复工单 #2(DXT-20261023-A1F7FADF):发布包缺失 `win32timezone`,导致 BOM 导入记录采集进程创建时间时失败。显式打包 pywin32 的动态依赖,无需用户安装 Python。
- 发布门禁改为在完整 EXE 主进程中验证私有桌面、子进程启动、创建时间记录及最终释放,防止源码 Python 的完整环境掩盖打包缺失。
- 不改变替换、保存回读、保护锁及资源恢复规则。
## 继承的批次功能
- 每次 BOM 导入和顺序执行分别作为一个批次,共用一个私有桌面;CAD 按需启动,在批内跨工程复用,批末统一退出。
- 工程之间确认上一工程已关闭,重新核验路径、中心库、图页及目标身份;保留保存、关闭、重开回读流程。
- 首次可能写入前持久化保护标记。只有明确证明尚未修改且旧资源已释放时,允许重建重试一次;身份冲突、已修改或结果不确定时不自动重放。
- 释放失败保留已保存并核验的任务结果,阻止新批次,提供“重新清理资源”;清理操作不重复替换,重启后仍检查未收尾批次。
- 释放日志显示开始、成功、失败和重新检查,包含耗时、CAD退出码、句柄关闭与桌面消失的分别确认、失败原因。同批各任务“完整日志”可见,独立文件位于 `data/batch-resources/<批次ID>/resource-release.log`。
- 修复 BOM 错误回报与清理错误同时发生时丢失逐行报告的问题;清理失败只保留诊断,不提供可应用的部分预览。
- 保留原生 CLI 优先采集,减少不必要的 CAD 回退;原生会话重试耗尽时停止整批。
## Beta 2 发布验证
发布门禁 824 项通过;打包配置检查 2 项、外部验收脚本检查 15 项通过。完整 EXE 在两个全新工程副本上完成创建任务、导出默认模板、错误 BOM 报告(2 通过 / 1 失败)、修正后导入(2 通过 / 0 失败)、保存计划、实际替换、保存重开回读及结果日志查看。两工程各 57 个组件、103 个引脚连接,56 个非目标组件不变;源文件与中心库 `.lmc` 哈希不变。执行批次共一次 CAD 启动、一个桌面代次,最终释放已独立确认。
本轮[工单修复与验收记录](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.2/docs/testing/2026-10-23-issue-2-frozen-runtime.md)包含原验证漏检范围及外部观察器修正后的只读续验说明;已完成替换没有重放。
## 继承的历史验证与范围
两个全新工程副本完成 BOM 导入、实际替换、保存重开、独立完整属性/连接回读和资源释放。两版本保存结果一致;各工程 57 个组件、103 个引脚连接,56 个非目标组件属性和连接不变,源工程及中心库 `.lmc` 哈希不变。
相同样例单次对照:BOM 加执行总耗时 170.860 → 151.859 秒,私有桌面创建 6 → 2 次,CAD 启动 2 → 1 次。该结果不代表固定加速比例;BOM 单次测量 2.250 → 3.187 秒。
工单完整库存覆盖的 31 行回放为 20 通过、11 失败,未强行放行不匹配项;其余 406 条替换行、96 个工程未获对应完整库存,不能宣称全部工程已实机通过。用户机器的外部桌面引用残留根因尚未在本机复现。
详见[批次运行时验收](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.2/docs/testing/2026-10-21-batch-private-runtime.md)、[实机对照](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.2/docs/testing/2026-10-21-batch-private-runtime-live.md)和[释放日志验证](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.2/docs/testing/2026-10-21-resource-release-logging.md)。
@@ -1,5 +1,7 @@
# MentorPDF 原生接口链路补充调研
后续 [2026-10-17 动态取证](2026-10-17-native-replacement-process-trace.md) 补充了实际替换进程树,并在实际加载的 `common/win32/lib/ICE70.dll` 中发现内部 `replaceSymbols` 导出;该目录不在下文原先四个 `bin` 目录的扫描范围内。导出存在已确认,运行时调用及可用替换语义仍待验证。
调研日期:2026-10-14。此次只读取 `mentor_PDF_output` 源码、本机 EE7.9.5 安装目录文件名/PE 字符串和已存在的 Viewdraw 脚本样例;没有启动 `sch2pdf`、`DxPDF`、DxDesigner,也没有附着 COM 或写入工程。
## MentorPDF 的实际原生链路
@@ -0,0 +1,81 @@
# 原生器件采集接入与替换接口续查
## 接入结果(开发版,未打包)
位号采集和 BOM 库存校验优先使用本机官方 `icdb2ascii.exe`,完整身份沿用现有工程、原理图、图页、UID、位号、旧料号和原 Value 模型。不构造假 UID,不修改模板或替换策略。
本机安装路径:`D:/Mentor/7.9.5EE/SDD_HOME/iCDB/win32/bin/icdb2ascii.exe`。程序从已安装 Designer 路径定位同套 iCDB 工具,不随应用分发厂商二进制。
```text
icdb2ascii.exe -project=<临时 input.prj> -icdb=<临时 database>
-snap=DxD -h -t -offline -file=<临时 output/scope.txt>
```
不传 `-blks`,读取报告内的全部原理图块,包括不连通的块。验证报告是未筛选的 FREEFORM / HIER BLOCKS,且包含文本属性。逐器件读取真实 UID、图页及属性;引脚属性不能覆盖器件属性。筛选请求的旧料号后交给原计划校验、BOM 错误报告和缓存。
器件报告不枚举空图页,因此返回 `complete_sheet_manifest=False`。它可以缓存组件库存,但不能作为完整图页查询的缓存命中;完整图页枚举仍使用原 CAD 接口。
## 工程隔离、取消及回退
官方导出工具可能更新运行数据库。本实现先将 `.prj` 与 `database/icdb.dat` 复制到短路径临时目录,改写临时工程的数据库目录并清除专用服务器名称,不复制运行服务器地址文件。CLI 只访问副本,源工程与源数据库在调用前后核对 SHA256。
每次调用使用自有私有桌面及 Job,工具等待上限 30 秒,等待期间检查取消;确认进程和桌面释放后才解析结果或回退。工具缺失、不支持的工程/报告、超时或非零退出码在安全收尾后使用原 COM 采集。取消、源工程变化和清理不确定均阻断,不继续回退。
诊断保存在 `data/quick-run-history/native-inventory-*/native-inventory.json` 和对应 `output`,含状态、退出码、分段耗时、清理记录及原生输出。正常收尾删除临时数据库;清理不确定时保留副本和诊断。
运行前保存并关闭本次目标工程,避免采集到未保存编辑以外的磁盘状态。此后端不执行替换;替换前的目标核验、备份、Library Wins、属性恢复、保存及重开回读继续使用已有执行链。
## 两工程 BOM 实测
在已有测试工程的另一份副本中完成:创建两任务 → 导出默认同批模板 → 填入有效替换和一个不存在的位号 → 导入报错 → 修正后重导入 → 保存计划。
| 项目 | 结果 |
| --- | --- |
| 首次导入 | 5.281 秒;通过 2 行、失败 1 行;未保存预览 |
| 修正后重导入 | 1.093 秒;通过 2 行、失败 0 行;保存成功 |
| 工程一器件采集 | 1.360 秒,4 个目标位号;CLI 本身 0.891 秒 |
| 工程二器件采集 | 0.797 秒,2 个目标位号;CLI 本身 0.734 秒 |
| 工程路径长度 | 141、296 字符 |
| 导入时启动 CAD | 无;两次均使用单个 `icdb2ascii`,未回退 COM |
| 来源工程 | `.prj` 与 `icdb.dat` 哈希未变 |
本地证据:`build/native-cli-bom-offline-final-20261016/report.json`。这只是两个工程的数据,不能据此承诺 400 个工程或 400 条规则的吞吐量。重导入收益包含库存缓存,并非第二次完整 CLI 采集。
原生协议、运行监管、取消、超时、源身份变化、清理失败、图页缓存边界,以及原有 BOM/桌面隔离的针对性回归:128 项通过(26.52 秒)。只读复核另跑原生与缓存测试:56 项通过;未发现未解决的 P1/P2。
## 接入后实际替换回归
只执行上述长路径 Audio 副本:将 `RV05` 从 `4100-CA0000-T7` 替换到 `4100-CA0000-T0`,`RV11` 保持旧料号。任务完成 1 步、保存并重开核验 1 步、失败 0 步。独立 CLI 和另起 COM 会话读取的 UID、位号、料号及 Value 完全相同,来源工程哈希未变。
| 执行阶段 | 耗时 |
| --- | --- |
| 队列准备(包含原 COM 图页枚举与稳定性重读) | 186.393 秒 |
| 工程备份 | 0.677 秒 |
| 进度持久化 | 0.141 秒 |
| 执行接口总耗时(包含上述阶段及 CAD 替换、重开核验、释放) | 372.219 秒 |
CLI 改进的是导入与组件采集;当前执行准备仍有多次 CAD 启动,执行耗时没有同等降低。后续可单独研究从精确位号计划建立执行页范围,不能在此直接取消原有工程稳定性与目标核验。
本轮关闭了 PartLabel 复制:旧 `RV05.Value=0R`,新库件的 Value 为空,最终仍为空;`RV11.Value=0R` 不变。原执行逻辑中的 `preserve` 指保留原生替换后的库件 Value,而不是保留旧器件 Value。初版探针错误地要求选中件 Value 不变,断言失败;补充独立 COM 读取及代码核对后修正测试预期,未修改生产策略,也未以 PartLabel 代填原生清单。
五个 CAD 私有桌面均有正常退出及释放记录,并通过另一个进程枚举桌面确认已消失。初版前台观察器因测试输出目录嵌套,未采集到自有进程句柄,因此不能宣称完成了整轮自有 PID 的独立前台跟踪;该限制保留在验证报告中。
本地证据:`build/native-cli-bom-offline-final-20261016/replacement-acceptance/verified-report.json`、`com-readback.json`,以及任务的 `events.jsonl`、`quick-run/private-desktop.json`。初版失败断言记录仍保留。
## 直接替换 CLI 续查
2026-10-17 补充:已实际跟踪替换时的进程树和模块加载,确认多进程辅助服务,并发现 DataBook ActiveX、中央库类型库及 `ICE70.dll` 的内部符号替换方法。见 [动态取证记录](2026-10-17-native-replacement-process-trace.md)。下文为前一轮的检索结论。
尚未找到本机 7.9.5 可验证的独立替换 CLI,不能把下面线索当作已可用的后端。
- `icdb2ascii`、`icdb2csv`、`icdb2bom`、`icdb2wir` 的本机帮助确认的是导出用途;`icdbPartsLister` 也只验证了清单导出。
- `icscript.bat`、`mgcscript.bat` 是脚本启动/环境转发入口,脚本自身没有定义料号替换、位号范围或 Library Wins 参数合同。
- 在自有桌面对 `viewdraw.exe --help` 做有界探针,未取得可用文本帮助;退出及桌面清理已确认。不能据此证明程序不存在其他命令行能力。
- 再次离线读取本机 `viewdraw.tlb`:版本 1.0,SHA256 `09323c8940f1acf3f469d887dcfdf7bcd114164a29b01ebeb9a7f978fa1a0df7`,没有直接 `ReplacePart`。工作区版本 119.0 wrapper 的同名方法不能证明实装版本支持。
- `viewdraw.exe` 中存在 `ccomp`、`Change Component`、`Preserve REFDES Value` 字符串;已有 TypeLib 包含 `ChangeComponentPreserveRefdes`。这些只证明内部线索,没有验证参数、目标范围、中央库、引脚网络及 Library Wins 语义。
- 本机 CHM 中 `ccomp` 等页仍是跳转 InfoHub 的占位页。对安装样例及 `standard/ee_utils` 的脚本检索未找到可靠替换调用样例。
- 公开搜索没有取得可复核的命令合同;Siemens 社区链接只返回动态通用页面,未获取正文,不能作为替换语义证据。
后续最有价值的方向仍是匹配本机版本的命令/API 手册,或在独立可丢弃工程验证 `ccomp` / `ChangeComponentPreserveRefdes` 的实际语义。在这些证据齐备前,保留当前已验证的原生对话框替换链。
相关证据:`build/native-replacement-cli-20261016/`、`build/native-cli-integration-20261016/current-capabilities.json`;厂商帮助内容和工程数据库不加入 Git。
@@ -0,0 +1,61 @@
# 原生器件清单 CLI:首次运行验证
后续已找到能同时导出 UID 与器件属性的 `icdb2ascii.exe`,并接入开发版正式采集入口。见 [接入与验证记录](2026-10-16-native-cli-integration.md)。下文保留 PartsLister 首次探查结论,不能代表后续后端仍受同样限制。
本次针对大量工程首次 BOM 校验的耗时,继续验证此前仅有静态线索的 `icdbPartsLister.exe`。没有修改正式导入/替换流程,没有打包;所有原生调用在自建私有桌面和 Job 中运行,只使用既有测试工程的另一份副本。
## 已验证的命令入口
安装文件:`D:/Mentor/7.9.5EE/SDD_HOME/wv/win32/bin/icdbPartsLister.exe`。
`--help` 不是它支持的参数,实际返回码为 1,报 Unknown command,同时打印了完整选项:
```text
[-p|-prj]=file.prj project file (with path)
[-b|-board]=name board name
[-s|-block]=name block name
[-a|-architecture]=name architecture name
[-f|-function]=name function name
[-c|-cfg]=file.ipl configuration file
[-o|-out]=file output file
[-v|-variant]=name variant name
[-l|-level]=name custom LEVEL value
```
因此这里不是一次成功的 help 请求,而是由程序自己的参数错误输出确认调用格式。随后以正确参数完成两次真实导出,退出码均为 0:
```text
icdbPartsLister.exe "-prj=<project.prj>" "-block=<root_block>" "-cfg=<config.ipl>" "-out=<output.txt>"
```
安装自带 `standard/PartListerDefaults.ipl` 为 XML 配置。默认按料号合并且按列宽换行,位号可能压缩成区间,不能直接当成逐器件输入。
## 单工程结果
工程为此前已完成真实 COM 库存核对的测试副本,根块为 `1000_PHY`。
| 调用 | 结果 | 进程等待及调用阶段耗时 |
| --- | --- | --- |
| 默认 IPL 导出 | 料号、Value、位号和数量,存在合并/换行 | 3.125 秒 |
| 自定义 IPL 导出 | 93 行器件记录,完整位号、料号、Value | 8.671 秒 |
自定义 IPL 使用 PLAIN 输出,关闭列宽限制,用 `|` 分隔,以 `Ref Designator` 为 PRIMARY,属性列设为 FULL。与既有 COM 快照的 5 个已知目标逐一比对:位号唯一、料号和 Value 全部一致。该比对仅覆盖这 5 个目标,没有宣称核验了全部 93 行、多图页或层级重名场景。
作为耗时参照,同日 QApplication/QThreadPool 中的完整 CAD 启动、工程读取、正常退出与桌面释放用了 56.89 秒,其中启动约 34.89 秒。两种调用的数据字段和生命周期不同,这不是等价的批量性能测试;不能据单工程结果承诺 400 工程吞吐量。
## 尚不能替代正式库存的原因
- 尝试把 `UID` 作为普通属性列导出,93 行均为空。这只证明该属性名写法无效,不能据此断言原生工具完全不支持 UID。
- 尚未验证图页身份、层级实例、同名位号、多单元器件、排除项、变体、长路径及异常后的逐工程恢复。
- CLI 会更新测试工程的 `database/icdb.dat` 以及数据库、CES 运行日志;不能称为对工程字节严格只读。来源测试副本未被调用,首次探针确认其哈希未变。
- 两次导出的自有 Job/进程及私有桌面均正常释放。没有执行器件替换。
## 对后续架构的意义
现在已确认存在能独立调用的本机原生器件清单 CLI,证据强于此前的静态字符串。它适合继续研究作为 BOM 快速预检与清单来源;尚未确认可输出精确目标所需的完整身份,因此还不能直接替换正式库存采集。
可考虑:Excel 本地导入与格式预检 → 仅对有效行涉及的工程调用原生清单工具 → 报告料号/位号匹配结果 → 执行前通过受控 COM 冻结并核验 UID/图页身份。候选 CLI 与现有缓存、指纹规则的衔接还需设计,不能把数据库发生变化后的旧快照视为永久有效。
这不是原生替换 CLI,也没有证据改变此前关于当前安装版没有已确认直接 ReplacePart 接口的结论。
本地证据:`build/native-cli-inventory-20261016/` 下的 `help-result.json`、`export-result.json`、`fields-result.json`、`comparison-result.json` 与输出文件。厂商帮助、IPL 原件和工程内容均未加入 Git。
@@ -0,0 +1,133 @@
{
"source_hashes_unchanged": true,
"cases": [
{
"case": "add-part-plain",
"error": "com_error(-2147352567, '发生意外。', (6055, 'DxDesigner', 'Symbol RESISTOR:res01.1 not found, empty or a block.', None, 0, 0), None)",
"returned": null,
"changed_count": 0,
"dialogs": [],
"call_seconds": null,
"changed_refdes": []
},
{
"case": "add-part-qualified",
"error": "com_error(-2147352567, '发生意外。', (6055, 'DxDesigner', 'Symbol RESISTOR:skyworth:res01.1 not found, empty or a block.', None, 0, 0), None)",
"returned": null,
"changed_count": 0,
"dialogs": [],
"call_seconds": null,
"changed_refdes": []
},
{
"case": "add-part-full",
"error": null,
"returned": null,
"changed_count": 1,
"dialogs": [],
"call_seconds": 0.9060000000026776,
"changed_refdes": [],
"native_part_created": {
"uid": "$2I2277",
"refdes": "R?",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "",
"cell": "RESC1608N",
"location": [
5000,
5000
],
"orientation": 0,
"name_query_result": "$2I2277"
}
},
{
"case": "change-uid-symbol",
"error": "com_error(-2147352567, '发生意外。', (1186, 'DxDesigner', 'No components found to change', None, 0, 0), None)",
"returned": null,
"changed_count": 0,
"dialogs": [],
"call_seconds": null,
"changed_refdes": []
},
{
"case": "change-uid-part",
"error": "com_error(-2147352567, '发生意外。', (1186, 'DxDesigner', 'No components found to change', None, 0, 0), None)",
"returned": null,
"changed_count": 0,
"dialogs": [],
"call_seconds": null,
"changed_refdes": []
},
{
"case": "change-symbol-qualified",
"error": null,
"returned": true,
"changed_count": 19,
"dialogs": [],
"call_seconds": 2.8439999999973224,
"changed_refdes": [
"RV19",
"RV08",
"RV16",
"RV05",
"RV02",
"RV11",
"RV09",
"RV03",
"RV13",
"RV12",
"RV06",
"RV07",
"RV17",
"RV10",
"RV14",
"RV04",
"RV15",
"RV18",
"RV01"
]
},
{
"case": "ccomp-symbol",
"error": null,
"returned": false,
"changed_count": 0,
"dialogs": [
{
"title": "Change Component",
"text": [
"自定义 2",
"确定(&O)",
"取消(&C)"
]
}
],
"call_seconds": 0.15600000000267755,
"changed_refdes": []
},
{
"case": "ccomp-part",
"error": null,
"returned": false,
"changed_count": 0,
"dialogs": [
{
"title": "Change Component",
"text": [
"自定义 2",
"确定(&O)",
"取消(&C)"
]
}
],
"call_seconds": 0.375,
"changed_refdes": []
}
],
"notes": [
"name_query_result is an instance-name query from the initial probe, not a library-symbol identity.",
"ChangeComponentPreserveRefdes was tested with only RV05 selected, but changed 19 same-symbol page components."
]
}
@@ -0,0 +1,358 @@
{
"research_only": true,
"production_backend_changed": false,
"native_query": {
"dll": "PartsDB40.dll",
"sha256": "f24d44eaa13f28550317711df6a6241e227ae56805baa73c8f3020bde513ad0d",
"bitness": 32,
"factory_calling_convention": "cdecl, HRESULT(void**)",
"member_calling_convention": "stdcall, explicit interface pointer first",
"loader_mode": 0,
"queries": [
{
"part": "4100-CA0000-T0",
"exit_code": 0,
"seconds": 0.29699999999138527,
"copy_database_unchanged": true,
"result": {
"requested": "4100-CA0000-T0",
"matches": [
{
"index": 1783,
"number": "4100-CA0000-T0",
"name": "RESC1608N",
"label": "0R",
"symbols_hr": 0,
"symbols": [
"skyworth:res01"
]
}
],
"enumerated": 1021,
"last_hr": 0
}
},
{
"part": "DX_RESEARCH_PART_DOES_NOT_EXIST",
"exit_code": 0,
"seconds": 0.32800000000861473,
"copy_database_unchanged": true,
"result": {
"requested": "DX_RESEARCH_PART_DOES_NOT_EXIST",
"matches": [],
"enumerated": 1021,
"last_hr": 0
}
},
{
"part": "4300-CC1040-7100",
"exit_code": 0,
"seconds": 0.3129999999946449,
"copy_database_unchanged": true,
"result": {
"requested": "4300-CC1040-7100",
"matches": [
{
"index": 1336,
"number": "4300-CC1040-7100",
"name": "CAPC0603X30N",
"label": "C/100NF/16V +/-10% X5R",
"symbols_hr": 0,
"symbols": [
"skyworth:cap01"
]
}
],
"enumerated": 885,
"last_hr": 0
}
},
{
"part": "中文料号测试",
"exit_code": 0,
"seconds": 0.375,
"copy_database_unchanged": true,
"result": {
"requested": "中文料号测试",
"matches": [],
"enumerated": 1021,
"last_hr": 0
}
}
],
"initial_query_samples": [
{
"part": "4100-CA0000-T0",
"exit_code": 0,
"seconds": 0.3129999999946449,
"copy_database_unchanged": true,
"result": {
"matches": [
{
"index": 1783,
"number": "4100-CA0000-T0",
"name": "RESC1608N",
"label": "0R",
"symbols_hr": 0,
"symbols": [
"skyworth:res01"
]
}
],
"enumerated": 1021,
"last_hr": 0
}
},
{
"part": "DX_RESEARCH_PART_DOES_NOT_EXIST",
"exit_code": 0,
"seconds": 0.35899999999674037,
"copy_database_unchanged": true,
"result": {
"matches": [],
"enumerated": 1021,
"last_hr": 0
}
},
{
"part": "4300-CC1040-7100",
"exit_code": 0,
"seconds": 0.39100000000325963,
"copy_database_unchanged": true,
"result": {
"matches": [
{
"index": 1336,
"number": "4300-CC1040-7100",
"name": "CAPC0603X30N",
"label": "C/100NF/16V +/-10% X5R",
"symbols_hr": 0,
"symbols": [
"skyworth:cap01"
]
}
],
"enumerated": 885,
"last_hr": 0
}
}
],
"negative_module_test": {
"exit_code": 2,
"rejected_missing_module": true,
"result": {
"load_error": 126
}
},
"source": "tools/research/native_parts_query.cpp",
"source_sha256": "01da76c3101461687e514dc30694cace634e81487b56b571fe9ea7ca4e163caf",
"reviewed_fixes": [
"Propagate metadata HRESULT failures and validate symbol pointer/count.",
"Encode native ANSI metadata to UTF-8, releasing enum/database/module through RAII.",
"Assert runner exit status, PDB copy hashes, parsed JSON and expected query data."
],
"encoding_scope": "Chinese requested-name roundtrip passed; actual non-ASCII PDB metadata code-page assumption is not independently certified."
},
"installed_list_cli": {
"exe": "ListWGLib.exe",
"arguments": "<library-copy.lmc> PDB <output.txt>",
"exit_code": 0,
"catalog_rows": 9436,
"partitions": 20,
"source_hashes_unchanged": true
},
"replacement": {
"scope": "Audio test copy; same skyworth:res01 symbol; one gate; matching per-label pin-number map",
"verified": true,
"source_hashes_unchanged": true,
"changed_refdes": [
"RV05",
"RV14",
"RV02"
],
"readback": {
"RV02": {
"uid": "$2I1428",
"part": "4100-CA0000-T0",
"value": "2.2K"
},
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T0",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA1030-T7",
"value": "10K/NC"
}
},
"geometry_before": {
"RV02": {
"location": [
1090,
1490
],
"orientation": 3,
"scale": 1.0
},
"RV14": {
"location": [
1540,
1000
],
"orientation": 1,
"scale": 1.0
},
"RV05": {
"location": [
1230,
1320
],
"orientation": 0,
"scale": 1.0
}
},
"attribute_styles_saved_and_reopened_verified": true,
"target_pin_connections_saved_and_reopened_verified": true,
"graph_comparison": {
"hier": {
"verified": true,
"components": 57,
"pins": 103,
"nets": 22,
"unchanged_components": 54,
"rv05_exactly_matches_native_gui": true,
"other_targets_change_only_expected_material_value_and_base_pin_fields": true,
"all_connections_match_native_baseline": true
},
"flat": {
"verified": true,
"components": 57,
"pins": 103,
"nets": 22,
"unchanged_components": 54,
"rv05_exactly_matches_native_gui": true,
"other_targets_change_only_expected_material_value_and_base_pin_fields": true,
"all_connections_match_native_baseline": true
}
},
"worker_phase_seconds": [
{
"phase": "open",
"seconds": 44.187
},
{
"phase": "validate_native_library_metadata",
"seconds": 0.11
},
{
"phase": "create_target_template",
"seconds": 16.797
},
{
"phase": "replace_selected_in_place",
"seconds": 14.625
},
{
"phase": "synchronize_pin_properties",
"seconds": 10.172
},
{
"phase": "delete_template_and_verify",
"seconds": 11.031
},
{
"phase": "save_close",
"seconds": 3.875
},
{
"phase": "reopen_and_verify",
"seconds": 38.922
}
],
"cad_startup_seconds": 66.89100000000326,
"cad_exit_code": 0,
"quit_helper_exit_code": 0,
"cleanup": {
"desktop": "dx-f1e65335ec1a4b369275b1a4d73d1db0",
"processes": [
{
"pid": 48148,
"job_active_processes": 0,
"exit_code": 0,
"descendant_pids": [],
"unconfirmed_descendant_handles": 0,
"process_handle_closed": true,
"job_handle_closed": true,
"errors": []
},
{
"pid": 32732,
"job_active_processes": 0,
"exit_code": 0,
"descendant_pids": [],
"unconfirmed_descendant_handles": 0,
"process_handle_closed": true,
"job_handle_closed": true,
"errors": []
},
{
"pid": 50964,
"job_active_processes": 0,
"exit_code": 0,
"descendant_pids": [],
"unconfirmed_descendant_handles": 0,
"process_handle_closed": true,
"job_handle_closed": true,
"errors": []
},
{
"pid": 50144,
"job_active_processes": 0,
"exit_code": 0,
"descendant_pids": [
42508
],
"unconfirmed_descendant_handles": 0,
"process_handle_closed": true,
"job_handle_closed": true,
"errors": []
}
],
"desktop_handle_closed": true,
"desktop_confirmation": {
"desktop": "dx-f1e65335ec1a4b369275b1a4d73d1db0",
"released": true,
"elapsed_seconds": 0.014999999999417923,
"budget_seconds": 5.0,
"caller_pid": 50324,
"caller_thread_id": 46800
},
"errors": []
},
"clean": true,
"cleanup_errors": []
},
"limitations": [
"RV05 has an exact GUI baseline; RV14/RV02 have expected-field and topology checks, not separate full GUI baselines.",
"Packager/PCB synchronization was not executed.",
"No arbitrary-symbol, multi-gate, hierarchy-occurrence, multi-project, cancellation or production throughput claim.",
"The existing hierarchical inventory misses some instance overrides; this must be handled before promoting the new backend."
]
}
@@ -0,0 +1,173 @@
{
"date": "2026-10-17",
"scope": "Research probes only; no production backend change",
"registered_classes": [
{
"module": "dxdatabook.ocx",
"class": "DxDbSearch",
"clsid": "{7D295F82-86B7-4199-89BF-F16D432731EE}",
"registry": {
"InprocServer32": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\dxdatabook.ocx",
"ProgID": "DxDataBook.AddinCtrl.1"
}
},
{
"module": "dxdatabook.ocx",
"class": "SearchWnd",
"clsid": "{5E02EA46-981F-413A-A976-2807CE734661}",
"registry": {}
},
{
"module": "dxdatabook.ocx",
"class": "TreeRoot",
"clsid": "{60BC62D3-4A75-43D6-A07D-1D6982A52FD3}",
"registry": {}
},
{
"module": "dxdatabook.ocx",
"class": "TreeLibraryNode",
"clsid": "{DFE283B6-4296-4030-B3A9-806B492526D4}",
"registry": {}
},
{
"module": "dxdatabook.ocx",
"class": "SymbolWnd",
"clsid": "{B6AB18AD-0BD7-4F72-86DF-8898DEF4A61B}",
"registry": {}
},
{
"module": "dxdatabook.ocx",
"class": "Search",
"clsid": "{0673DF93-F981-4795-A0FB-0E638D1E40C1}",
"registry": {}
},
{
"module": "dxdatabook.ocx",
"class": "SearchData",
"clsid": "{2AF5C98B-F140-4781-94AE-5D7B9542DBCB}",
"registry": {}
},
{
"module": "CentralLibSvr.dll",
"class": "LibPart",
"clsid": "{91F63192-E31C-4634-A22A-7C5D75BF7D25}",
"registry": {
"InprocServer32": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\CentralLibSvr.dll",
"ProgID": "CentralLibSvr.LibPart.1"
}
},
{
"module": "CentralLibSvr.dll",
"class": "PinMap",
"clsid": "{A2A0076F-5A52-4B7B-9299-FFEE783FE9CD}",
"registry": {
"InprocServer32": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\CentralLibSvr.dll",
"ProgID": "CentralLibSvr.PinMap.1"
}
},
{
"module": "CentralLibSvr.dll",
"class": "PinMaps",
"clsid": "{CBEF1EE2-B5F0-4388-B81C-B1F6778DAD72}",
"registry": {
"InprocServer32": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\CentralLibSvr.dll",
"ProgID": "CentralLibSvr.PinMaps.1"
}
},
{
"module": "CentralLibSvr.dll",
"class": "ExpProjEditor",
"clsid": "{37CB51B8-7705-47B3-81CA-B26284D59B92}",
"registry": {
"InprocServer32": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\CentralLibSvr.dll",
"ProgID": "CentralLibSvr.ExpProjEditor.1"
}
}
],
"vendor_cli_com_calls": [
{
"host": "icscript",
"seconds": 1.1720000000059372,
"exit_code": 0,
"output": "PART=4100-CA0000-T0\nHAS_PINS=1\nMAP_COUNT=2\n",
"desktop_released": true
},
{
"host": "mgcscript",
"seconds": 0.8439999999973224,
"exit_code": 0,
"output": "PART=4100-CA0000-T0\nHAS_PINS=1\nMAP_COUNT=2\n",
"desktop_released": true
}
],
"standard_cscript_output": "PART=4100-CA0000-T0\r\nLIBRARY=F:\\Sync Tool Skyworth\\Work Maps\\Skyworth_CBB_Lib\\Mentor_lib_EE7.9\\mentor_lib.lmc\r\nHAS_PINS=1\r\nMAP_COUNT=skyworth:res01:2\r\nPIN=1:1\r\nPIN=2:2\r\nMAP_COUNT=skyworth:res01.1:0\r\nMAP_COUNT=res01:0\r\n",
"queried_symbol": "skyworth:res01",
"slot": 1,
"library_hash_unchanged": true,
"invalid_part_control": {
"result": "4100-CA0000-T0 ERROR=0 HAS_PINS=1\nDX_RESEARCH_PART_DOES_NOT_EXIST ERROR=0 HAS_PINS=1\n",
"HasPins_is_part_existence_check": false
},
"breakpoint_control": {
"self_test_verified": true,
"symbol": "KernelBase!GetCurrentProcessId",
"original_byte_and_EIP_restored": true
},
"replacement_breakpoint": {
"module": "ICE70.dll",
"export_rva": "0x17c800",
"armed_events": [
{
"pid": 44384,
"address": "0x215c800",
"seconds": 7.062999999994645
},
{
"pid": 44384,
"address": "0x413c800",
"seconds": 8.89100000000326
}
],
"hit_events": 0,
"map_check": [
{
"address": "0x215c800",
"mapped_file": "\\Device\\HarddiskVolume6\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\BusContents.dll"
},
{
"address": "0x413c800",
"mapped_file": "\\Device\\HarddiskVolume6\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\ICE70.dll"
}
],
"export_thunk": {
"export_rva": "0x17c800",
"bytes": "8b4904e978f5ffff",
"disassembly": [
"mov ecx, [ecx+4]",
"jmp 0x17bd80"
],
"direct_jump_target_rva": "0x17bd80",
"target_breakpoint_tested": false
},
"scope_note": "Same skyworth:res01 symbol, different part number; no conclusion about internal implementation or other replacement modes.",
"debug_events": 7021,
"workload_verified": true,
"source_hashes_unchanged": true,
"CAD_exited": {
"44384": true
},
"desktops_absent": {
"dx-da8f3b8af97d49fdad9a1a7e2ef6c184": true
}
},
"artifacts": {
"build\\internal-module-script-hosts-20261017\\report.json": "48c3cc5ef088b1a3d9cc0473937d7876d9d23af41c6f0bb27024a0ce7166353c",
"build\\internal-module-script-hosts-20261017\\vendor-cli-com-report.json": "dea9f29a6d655c4a1de5b22ea16595df348f8850931d1774bab47375dc018208",
"build\\internal-module-script-hosts-20261017\\part-validation\\report.json": "e986071ad3e1974c5bc79788f97c6a863b59495263121a6f072c921b0fad7a83",
"build\\native-internal-breakpoint-20261017\\debug-events.jsonl": "a46fa61692b1e4f548973d91285d549a3f7e446d7ef5e02a995dbc7c42431f51",
"build\\native-internal-breakpoint-20261017\\debug-summary.json": "0069eeeb9da8318c01fbad93979614e65b28cf34762432be030aefd4902c407c",
"build\\native-internal-breakpoint-20261017\\workload-report.json": "00f81cd84ae3607f743e455eae4a5914ae4be5819135c46d4d5b1f8909f96871",
"build\\debug_internal_replace.py": "a3237db7b915a8650f043188d9a9c2d231fa558fa8b8a0ae0feff6d808965316",
"build\\oneshot_native_breakpoint.py": "67a0c7253d9507b5598337e9e0f69aec4cdba0872b24f27bdd725734a1cb3e38"
}
}
@@ -0,0 +1,69 @@
# 内部模块能否通过 CLI 调用
已验证本机存在可工作的 **厂商脚本 CLI → VBS → 内部 COM DLL** 调用链。当前跑通的是指定符号的库引脚映射查询,尚未取得可直接完成精确料号替换的调用合同。
## 已跑通的入口
安装的两个脚本宿主都支持并实际执行了 VBS:
```text
D:\Mentor\7.9.5EE\SDD_HOME\wv\win32\bin\icscript.exe "<library-query.vbs>"
D:\Mentor\7.9.5EE\SDD_HOME\common\win32\_bin\mgcscript.exe "<library-query.vbs>"
```
脚本的核心调用为:
```vbscript
Set part = CreateObject("CentralLibSvr.LibPart.1")
part.CentralLibraryPath = "<中央库完整路径.lmc>"
part.PartNumber = "4100-CA0000-T0"
Set maps = part.PinMaps("skyworth:res01", 1)
```
脚本通过 FSO 把查询结果写到任务输出目录,不依赖厂商脚本宿主提供 `WScript.Echo`。测试环境设置了 `SDD_HOME`、`SDD_PLATFORM=win32`,并把本套安装的 `common/win32/lib`、`common/win32/bin` 加入该子进程的 PATH;没有修改用户环境变量。
| 实际宿主 | 退出码 | 完整启动、查询与收尾耗时 | 结果 |
| --- | ---: | ---: | --- |
| `icscript.exe` | 0 | 1.172 秒 | 指定符号返回 2 个引脚映射 |
| `mgcscript.exe` | 0 | 0.844 秒 | 指定符号返回 2 个引脚映射 |
| 32 位 `cscript.exe` | 0 | 1.016 秒 | 同一 COM 类可创建,读取映射 `1→1`、`2→2` |
它们不需要启动 CAD。本次每个调用都在自有私有桌面与 Job 中运行,15 秒有界等待;本轮均正常退出并释放。两个厂商宿主查询前后的中央库 `.lmc` SHA256 未变。
同一个库对象中,`PinMaps("skyworth:res01", 1)` 返回 2 项;`skyworth:res01.1` 和 `res01` 返回 0 项。这说明已经验证的名称合同是带分区、不带 `.1` 的形式,不能混用。
**这还不是料号存在性校验。** 独立对照发现,合法料号和不存在的 `DX_RESEARCH_PART_DOES_NOT_EXIST` 都得到 `HasPins=1` 且无错误;`PartNumber` 的回读也不能排除只是返回刚设置的属性。不能用它替代 DataBook 的精确料号匹配。这里确认的是 COM 调用和指定符号的引脚映射读取。
## 注册的内部 COM 类
32 位注册表与文件内类型库一致,关键类为:
| 模块 | ProgID | 已确认的暴露方式 |
| --- | --- | --- |
| `dxdatabook.ocx` | `DxDataBook.AddinCtrl.1` | 进程内 ActiveX;本轮只检查注册与接口,未独立实例化运行中的 CAD 控件 |
| `CentralLibSvr.dll` | `CentralLibSvr.LibPart.1` | 进程内 COM;上述脚本已实际调用 |
| `CentralLibSvr.dll` | `CentralLibSvr.PinMaps.1`、`CentralLibSvr.PinMap.1` | 注册的映射对象;本轮从 LibPart 的返回对象读取 |
| `CentralLibSvr.dll` | `CentralLibSvr.ExpProjEditor.1` | 注册的工程编辑器对象;未调用其打开工程方法 |
这些类使用 `InprocServer32`,不是各自带参数的替换 EXE。可以用支持对应位数的脚本宿主封装调用;本机 32 位 `cscript.exe` 的路径是 `C:\Windows\SysWOW64\cscript.exe`。普通 `rundll32` 的回调合同与内部 COM / C++ 方法不同,不能据 DLL 导出存在就直接调用。
## 对替换核心候选的断点验证
针对上一轮发现的 `ICE70!CICEController::replaceSymbols`,在新的可丢弃工程副本上设置一次性导出入口断点。先在独立 32 位 PowerShell 测试进程中显式调用 `KernelBase!GetCurrentProcessId`,验证断点命中、读取寄存器、恢复原指令字节及 EIP、继续执行并正常退出。该控制探针验证通过后才用于 CAD。
本轮 CAD 验证完成:`RV05` 从 `4100-CA0000-T7` 换为 `4100-CA0000-T0`,`RV11` 保持旧料号;开启 PartLabel 复制,两者 Value 均为 `0R`。保存、重开核验、独立磁盘读回均通过,来源工程哈希不变,CAD 和私有桌面均已释放。调试器记录 7,021 个事件,所有跟踪进程正常退出。
**导出入口的断点命中次数为 0。** 运行中对地址映射做了补充检查:临时加载的第一处 ICE 地址后来已被 `BusContents.dll` 使用;当前有效 ICE 映射仍保留所设断点。因此不能把临时模块地址当作始终有效的调用地址。
还有两个必须保留的范围限制:
- 此次新旧料号使用相同的 `skyworth:res01` 符号,不能推断更换不同符号时也不经过该入口。
- 导出 RVA `0x17c800` 起始指令为 `mov ecx,[ecx+4]`,随后直接跳转至 RVA `0x17bd80`。本轮只在导出入口设断点,未在后者设断点;内部调用可能直接进入后者或其他实现,不能用入口零命中证明内部方法未参与。
因此,当前不能把这个候选发布为可调用替换 CLI,也不能从几个布尔参数推断 Library Wins。继续研究应优先核对内部跳转目标的调用栈,以及原生替换窗口如何从 DataBook 的选中事件取得库件对象和映射。
## 对工具的意义
内部模块并非无法调用:**库查询已经存在实际可用的脚本 CLI 路径**,可以继续研究批量读取中央库符号和引脚映射。执行替换的精确范围、Library Wins、连接保持、Undo 和保存回读仍需要单独证明;本轮没有修改正式替换后端,也没有打包。
取证摘要:[内部模块 CLI 证据](2026-10-17-internal-module-cli-evidence.json)。一次性探针和原始输出保存在 `build/internal-module-script-hosts-20261017/`、`build/native-internal-breakpoint-20261017/`;脚本为 `build/probe_library_module.vbs`、`build/debug_internal_replace.py`、`build/oneshot_native_breakpoint.py`。早期断点控制探针的失败记录也保留,后续复用探针时需继续核对模块卸载、重载及实际地址。
@@ -0,0 +1,96 @@
# 替换时的多进程与进程内组件跟踪
后续已实际跑通 `icscript / mgcscript → VBS → CentralLibSvr` 查询,并完成导出入口断点探针。见 [内部模块 CLI 调用验证](2026-10-17-internal-module-cli.md)。断点仅覆盖导出入口,尚未证明其内部跳转目标的调用情况。
在本机 Mentor 7.9.5EE 上实际跟踪了一次完整替换。观察结果是多个原生进程与 CAD 内组件共同参与;没有捕获到选料或确认替换时新启动的独立替换 EXE。新线索在进程内 ActiveX 和 C++ 符号替换方法。
## 实测范围与取证方式
- 使用已有 Audio 测试工程的全新副本,只选中 `RV05`,将 `4100-CA0000-T7` 换为已验证库件 `4100-CA0000-T0`,保留 `RV11`;开启 PartLabel 复制到 Value。
- 从新鲜原生库存中指定已知的单页范围,调用正式单步替换接口,完成备份、替换、保存、重开核验及关闭。此探针没有重复执行生产队列的完整图页发现,不用于和此前队列总耗时作比较。
- 用 Windows `DEBUG_PROCESS` 启动自有研究进程,捕获其后代的进程创建、退出及 DLL 加载事件;在进程创建事件暂停期间读取父 PID 和完整命令行,能够捕获仅存在很短时间的子进程。使用 `cmd /c exit 0` 的独立探针先验证了捕获与参数读取。
- 补充约每 100 毫秒的进程快照,只保留可访问的 Mentor 进程信息,检查可能由其他代理启动的进程。该快照不能保证捕获树外的短命进程或权限不足的服务。
- 现有 WPR 未在记录;当前权限下 `Win32_ProcessStartTrace` 订阅被拒绝,因此没有使用系统级 ETW/WMI 事件覆盖。没有开启提权采集、接管用户 CAD 或修改正式执行代码。
## 进程数量
调试器记录 6,634 个事件、17 个进程实例,所有记录到的进程退出码均为 0,没有未退出的跟踪进程。厂商 EXE 共 5 种、8 次启动。
| 厂商程序 | 启动次数 | 触发位置与观察到的用途 |
| --- | ---: | --- |
| `viewdraw.exe` | 1 | CAD 主进程;承接原生替换窗口和 COM 对象 |
| `vnsd.exe` | 1 | 由 CAD 在初始化时启动,命令为 `vnsd.exe -idle 1`;二进制含 `License Server Daemon` 标识 |
| `iCDBNetServer.exe` | 2 | 由 CAD 打开工程时启动;保存后重开工程再次启动;参数包含数据库目录、工程、dbid、客户端与 `-autoclose` |
| `xprobSvr.exe` | 2 | 由 CAD 打开工程时启动;重开时再次启动;参数包含数据库、快照 `DxD` 和端口;二进制自述为 `Cross Probing Server` |
| `icdb2ascii.exe` | 2 | 本工具显式进行替换前采集和替换后独立磁盘读回;没有参与替换写入 |
只统计替换执行阶段,是 **4 种厂商 EXE、6 个实例**。其中 3 种是许可证、数据库和交叉探查辅助服务,不能把进程数量直接理解为 4 个可组合的批量替换 CLI。另有本工具的 4 个 Python 实例、1 个 `cscript.exe` 和 4 个系统 `conhost.exe`,合计 9 个,不计为 Mentor 原生接口。
辅助进程启动形式如下,省略仅用于本次会话的具体 ID:
```text
vnsd.exe -idle 1
iCDBNetServer.exe -db <database> -prj <project.prj>
-dbid <session-db-id> -autoclose -client <host:user:cad-pid>
xprobSvr.exe -db <host:database> -sn DxD -port <port>
```
这些是本次观察到的启动参数,不是替换参数合同。本轮进程快照没有发现可访问的新 Mentor 进程位于调试树外;不能据此证明所有配置都不存在其他代理服务。
## 实际触发关系
```mermaid
flowchart LR
Supervisor[工具 Python 调度] --> CAD[viewdraw.exe]
Supervisor --> VBS[cscript.exe / 原执行 VBS]
VBS --> Helper[工具 Python 原生窗口助手]
Helper -->|WM_COMMAND 33977| CAD
CAD --> License[vnsd.exe]
CAD --> Database[iCDBNetServer.exe]
CAD --> CrossProbe[xprobSvr.exe]
CAD -. 加载 .-> DataBook[dxdatabook.ocx / dxodbci32.dll]
CAD -. 加载 .-> Parts[ThinPartsDB.dll / PartsDB40.dll]
CAD -. 加载 .-> Library[CentralLibSvr.dll / EditProj.dll]
```
实线表示本次进程创建或源码及窗口助手证据确认的触发关系;虚线只表示模块加载,不能代替函数调用跟踪。具体原生窗口命令 ID 来自本机资源,本次为 `33977`,不应作为跨版本常量。
相对研究进程启动的时间:CAD 在 9.844 秒创建,许可证辅助进程在 23.547 秒创建;第一轮数据库服务和交叉探查服务分别在 63.266、73.109 秒创建。原生窗口助手在 120.797 秒启动。选料及替换区间中没有新增厂商 EXE;新的厂商活动表现为 CAD 内部 DLL 加载。
## 新的进程内接口线索
本次观察到 155 个不同路径的厂商 DLL/OCX。对实际加载模块的取证补齐了此前只扫描几个 `bin` 目录的不足。
| 模块 | 首次加载时间 | 已确认的内容 |
| --- | ---: | --- |
| `ICE70.dll` | 10.219 秒 | 导出内部 C++ 方法 `ICE::ICECTRL::CICEController::replaceSymbols(...)` |
| `dxdatabook.ocx` | 33.906 秒 | 存在 `DXDBSEARCHLib` 类型库,属于进程内 ActiveX 组件 |
| `dxodbci32.dll` | 34.250 秒 | 与 DataBook 同在 CAD 内加载;未证明具体查询调用 |
| `ThinPartsDB.dll` | 145.594 秒 | 原生窗口助手等待期间加载,存在物料属性相关 C++ 导出 |
| `PartsDB40.dll` | 145.656 秒 | 同一区间加载,存在 `GetPart`、`GetPartProperties` 等导出 |
| `CentralLibSvr.dll` | 165.906 秒 | 类型库包含 `ILibPart`、`IPinMaps`、`IPinMap` 等接口 |
| `EditProj.dll` | 165.984 秒 | 同一区间加载;没有取得可用类型库 |
`dxdatabook.ocx` 的本机类型库确认:
- `_DDxDbSearch` 有 `LoadConfiguration`、`NewSearch`、`AddSelectionObserver`、`SelectLibrarySymbol(Partition, Name, bReuse)` 等方法。
- `_DDxDbSearchEvents` 有 `SelectComponent(Attributes)`、`AddComponent(Component)`、`AnnotateComponent(Component)`、`LoadComponent(Components)` 等事件。
- `ISearch` 有 `Execute`、`Annotate`、`GetResults` 等方法。
这提供了继续研究选料与事件传递的具体入口,但事件存在不等于可以直接向 CAD 提交替换,当前尚未验证如何取得运行中的正确控件实例及其数据对象。
`CentralLibSvr.dll` 类型库确认:`ILibPart` 暴露 `PartNumber`、`CentralLibraryPath`、`HasPins` 和 `PinMaps(SymbolName, Slot)`;`IPinMap` 暴露引脚 `Label`、`Number`。这些是料号和引脚映射线索,没有直接 `ReplacePart` 方法。
`ICE70.dll` 的候选导出为 x86 `__thiscall`,ordinal `1767`、RVA `0x17c800`。解码后的签名包含一组内部对象 UID、另一个 UID、3 个字符串、4 个布尔开关及返回 UID 向量。不能从参数类型推断哪个是 Library Wins,也不能把 UID 集合假定为已经验证的当前位号集合。它需要有效的 `CICEController` 实例、厂商 UID 类型及匹配的 C++ 标准库 ABI。
**本轮没有观察该方法的运行时调用,也没有调用它。** 单独检查 `viewdraw.exe` 和 `ForeignDatabase70.dll` 的静态导入表,未命中该完整符号;其是否参与当前替换,仍需断点或调用栈验证。完整修饰名、解码签名及模块哈希保存在 [取证摘要](2026-10-17-native-replacement-trace-evidence.json)。
## 验证结果及下一步
最终保存并重开核验成功;独立 CLI 磁盘读回确认:`RV05=4100-CA0000-T0`、`RV11=4100-CA0000-T7`,两者 UID 不变、Value 均为 `0R`。来源测试工程的 `.prj` 与 `icdb.dat` 哈希未变。自有 CAD 退出、私有桌面消失均由观察器独立确认,期间没有成为主桌面前台窗口。
调试器会改变进程调度和启动行为;本次替换执行耗时 388 秒、整轮跟踪约 400 秒,只用于关联事件,不作为吞吐量或性能回归数据。
优先继续:对 `ICE70!CICEController::replaceSymbols` 做一次只记录命中与调用栈的断点探针,确认当前原生替换是否经过它;同时研究 DataBook 控件如何把选中料号与引脚映射交给 CAD。相比直接重放数据库服务启动命令,这两处更接近已观察到的替换行为。当前正式执行仍使用原已验证路径。
原始事件、命令行、类型库扫描、测试工程及一次性探针保存在忽略目录 `build/native-replace-process-trace-20261017/`;探针脚本为 `build/debug_process_trace.py`、`build/trace_native_replacement_workload.py`。没有提交厂商二进制、数据库或完整厂商日志。
@@ -0,0 +1,272 @@
{
"date": "2026-10-17",
"installed_version": "Mentor 7.9.5EE",
"method": "Windows DEBUG_PROCESS on a self-owned disposable workload and descendants; DLL load events; supplementary accessible vendor process snapshots",
"scope": "One page, one selected RefDes, source test project copied to build; no production change",
"process_instances": 17,
"counts": {
"python.exe": 4,
"conhost.exe": 4,
"icdb2ascii.exe": 2,
"viewdraw.exe": 1,
"vnsd.exe": 1,
"cscript.exe": 1,
"iCDBNetServer.exe": 2,
"xprobSvr.exe": 2
},
"debug_event_count": 6634,
"vendor_execution_types": {
"viewdraw.exe": 1,
"vnsd.exe": 1,
"iCDBNetServer.exe": 2,
"xprobSvr.exe": 2
},
"native_inventory_invocations": 2,
"unmatched_new_accessible_vendor_processes": 0,
"process_timeline": [
{
"seconds": 0.297,
"pid": 46648,
"ppid": 40216,
"name": "python.exe",
"phase": "bootstrap",
"exit_seconds": 400.172,
"exit_code": 0
},
{
"seconds": 0.547,
"pid": 32748,
"ppid": 46648,
"name": "conhost.exe",
"phase": "bootstrap",
"exit_seconds": 400.359,
"exit_code": 0
},
{
"seconds": 6.25,
"pid": 43548,
"ppid": 46648,
"name": "icdb2ascii.exe",
"phase": "native_inventory",
"exit_seconds": 8.047,
"exit_code": 0
},
{
"seconds": 9.844,
"pid": 24216,
"ppid": 46648,
"name": "viewdraw.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 397.187,
"exit_code": 0
},
{
"seconds": 9.984,
"pid": 21152,
"ppid": 46648,
"name": "python.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 60.844,
"exit_code": 0
},
{
"seconds": 10.031,
"pid": 47224,
"ppid": 21152,
"name": "conhost.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 60.859,
"exit_code": 0
},
{
"seconds": 23.547,
"pid": 29412,
"ppid": 24216,
"name": "vnsd.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 396.437,
"exit_code": 0
},
{
"seconds": 60.937,
"pid": 20104,
"ppid": 46648,
"name": "cscript.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 389.656,
"exit_code": 0
},
{
"seconds": 63.266,
"pid": 47528,
"ppid": 24216,
"name": "iCDBNetServer.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 273.969,
"exit_code": 0
},
{
"seconds": 73.109,
"pid": 47128,
"ppid": 24216,
"name": "xprobSvr.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 274.656,
"exit_code": 0
},
{
"seconds": 120.797,
"pid": 48152,
"ppid": 20104,
"name": "python.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 176.125,
"exit_code": 0
},
{
"seconds": 120.812,
"pid": 48768,
"ppid": 48152,
"name": "conhost.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 176.234,
"exit_code": 0
},
{
"seconds": 276.172,
"pid": 20420,
"ppid": 24216,
"name": "iCDBNetServer.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 386.625,
"exit_code": 0
},
{
"seconds": 287.281,
"pid": 5336,
"ppid": 24216,
"name": "xprobSvr.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 387.531,
"exit_code": 0
},
{
"seconds": 389.844,
"pid": 45888,
"ppid": 46648,
"name": "python.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 395.422,
"exit_code": 0
},
{
"seconds": 389.875,
"pid": 46140,
"ppid": 45888,
"name": "conhost.exe",
"phase": "replacement_save_reopen",
"exit_seconds": 395.469,
"exit_code": 0
},
{
"seconds": 397.578,
"pid": 2420,
"ppid": 46648,
"name": "icdb2ascii.exe",
"phase": "independent_native_readback",
"exit_seconds": 399.703,
"exit_code": 0
}
],
"first_module_loads": [
{
"name": "dxdatabook.ocx",
"seconds": 33.906,
"pid": 24216,
"cad_last_log": "quick_run_prepared task_id=93d136ba-a5b9-44a9-94a7-6006f1e8b6cd run_token=f0e2d18090e0487bab7c6e783adbe6c1"
},
{
"name": "dxodbci32.dll",
"seconds": 34.25,
"pid": 24216,
"cad_last_log": "quick_run_prepared task_id=93d136ba-a5b9-44a9-94a7-6006f1e8b6cd run_token=f0e2d18090e0487bab7c6e783adbe6c1"
},
{
"name": "ThinPartsDB.dll",
"seconds": 145.594,
"pid": 24216,
"cad_last_log": "2026/10/17 9:32:19\tINFO\tawaiting_native_replace count=1"
},
{
"name": "PartsDB40.dll",
"seconds": 145.656,
"pid": 24216,
"cad_last_log": "2026/10/17 9:32:19\tINFO\tawaiting_native_replace count=1"
},
{
"name": "CentralLibSvr.dll",
"seconds": 165.906,
"pid": 24216,
"cad_last_log": "2026/10/17 9:32:19\tINFO\tawaiting_native_replace count=1"
},
{
"name": "EditProj.dll",
"seconds": 165.984,
"pid": 24216,
"cad_last_log": "2026/10/17 9:32:19\tINFO\tawaiting_native_replace count=1"
},
{
"name": "ICE70.dll",
"seconds": 10.219,
"pid": 24216,
"cad_last_log": "quick_run_prepared task_id=93d136ba-a5b9-44a9-94a7-6006f1e8b6cd run_token=f0e2d18090e0487bab7c6e783adbe6c1"
}
],
"internal_export_candidate": {
"export": {
"name": "?replaceSymbols@CICEController@ICECTRL@ICE@@QAE_NABV?$set@VCICEObjectUID@ICEDATALAYER@ICE@@U?$less@VCICEObjectUID@ICEDATALAYER@ICE@@@std@@V?$allocator@VCICEObjectUID@ICEDATALAYER@ICE@@@5@@std@@ABVCICEObjectUID@ICEDATALAYER@3@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@5@22_N333AAV?$vector@VCICEObjectUID@ICEDATALAYER@ICE@@V?$allocator@VCICEObjectUID@ICEDATALAYER@ICE@@@std@@@5@@Z",
"ordinal": 1767,
"demangled": "public: bool __thiscall ICE::ICECTRL::CICEController::replaceSymbols(class std::set<class ICE::ICEDATALAYER::CICEObjectUID,struct std::less<class ICE::ICEDATALAYER::CICEObjectUID>,class std::allocator<class ICE::ICEDATALAYER::CICEObjectUID> > const &,class ICE::ICEDATALAYER::CICEObjectUID const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool,bool,bool,bool,class std::vector<class ICE::ICEDATALAYER::CICEObjectUID,class std::allocator<class ICE::ICEDATALAYER::CICEObjectUID> > &)",
"sha256": "83f696cc3a7b75ed926f7b6150a05e318fbbe62336ff43e5b202abe5e12fa297",
"machine": "0x14c",
"rva": "0x17c800",
"module": "ICE70.dll"
},
"static_importers_checked": [
"D:\\Mentor\\7.9.5EE\\SDD_HOME\\wv\\win32\\bin\\viewdraw.exe",
"D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\ForeignDatabase70.dll"
],
"static_import_matches": [],
"runtime_call_observed": false
},
"verified": true,
"replacement": {
"refdes": "RV05",
"old": "4100-CA0000-T7",
"new": "4100-CA0000-T0",
"value": "0R"
},
"unchanged": {
"refdes": "RV11",
"part": "4100-CA0000-T7",
"value": "0R"
},
"source_hashes_unchanged": true,
"cad_exit_confirmed": {
"24216": true
},
"desktop_absent": {
"dx-399f1eec8de94541bb71e34fb6de69b8": true
},
"owned_cad_became_foreground": false,
"observed_execution_seconds": 388.0,
"performance_benchmark": false,
"artifacts": {
"debug-events.jsonl": "16e6937c83df52e711bb57369b2c60fa052f971696a3f061f6036d4366d7023b",
"debug-summary.json": "3f3665c870fd0a4168ad1ada190fe021d6ba1547bf20767b33c3ce109653c55c",
"workload-report.json": "e78efe0418aa41568810dafc5d0bdbb5e52f0c973269044078bcbe1fd136a1f8",
"desktop-observation.json": "e64da8c1b6d22ab43ab4619de26164d15e5acfad696b5e6634def930de889cef",
"debug_process_trace.py": "4b4028317da8440345f0ffb57ca11ad30463bd9e60db9017d54d36efcb05b723",
"trace_native_replacement_workload.py": "0a7296ba9d8b83a8d47a945b4dd74e79b9885877b81c14110fb46c1f8811a429"
}
}
@@ -0,0 +1,363 @@
{
"date": "2026-10-17",
"baseline": "2ad0a3c",
"production_backend_changed": false,
"scope": "effective inventory, native target readiness, targeted queue preparation, session control sharing violations",
"source_sha256": {
"src\\dx_productivity\\trial_task_center\\native_inventory.py": "892876a777f0045238a19cd8c7fe3a84dbda404366c53801eeacd68ceb92d0fd",
"src\\dx_productivity\\trial_task_center\\native_inventory_protocol.py": "5f74effae184205955f3dd5af5f74c5674b5f968f6f6ca9cf856e6ef13363f55",
"src\\dx_productivity\\trial_task_center\\native_helper.py": "b83845da53ee822145ba5c68d7abeb50e5b34d6061c5499e3765c777341ae65e",
"src\\dx_productivity\\trial_task_center\\quick_run.py": "8baeca57b29954f4ba9326b7e84ddab684cb08d436e61348ba057406971e2bc8",
"src\\dx_productivity\\trial_task_center\\inventory.py": "5234a4c33b4d78aa096e105aba54c073e64b9091e031d5caa0ed5f0194dcccde",
"src\\dx_productivity\\trial_task_center\\project_session.py": "ef1896a3796ea019aae8279e9de450fef108fcdb34dc79905dc4eddec62bcc61"
},
"effective_inventory_live_cases": [
{
"project": "build\\headless-inplace-20261017-a\\project\\Audio_D2128.prj",
"seconds": 1.4069999999919673,
"components": {
"RV14": {
"uid": "$2I1766",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T0",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA1030-T7",
"value": "10K/NC"
}
}
},
{
"project": "build\\speed-final-20261017-gui-many\\project\\Audio_D2128.prj",
"seconds": 1.25,
"components": {
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA0000-T0",
"value": "0R/NC"
}
}
},
{
"project": "build\\speed-final-20261017-headless-rules\\project\\Audio_D2128.prj",
"seconds": 1.0310000000026776,
"components": {
"RV02": {
"uid": "$2I1428",
"part": "4100-CA0000-T0",
"value": "2.2K"
},
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T0",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA1030-T7",
"value": "10K/NC"
}
}
}
],
"formal_queue": {
"verified": true,
"source_hashes_unchanged": true,
"selected_refs": [
"RV05",
"RV14"
],
"unchanged_refs": [
"RV11",
"RV08",
"RV19"
],
"native_results": [
{
"stage": "native_replace_verified",
"ok": true,
"target_text": "4100-CA0000-T0",
"symbol_text": "skyworth:res01.1",
"target_submit_enabled": true,
"replaced_uids": [
"$2I2014"
]
},
{
"stage": "native_replace_verified",
"ok": true,
"target_text": "4100-CA0000-T0",
"symbol_text": "skyworth:res01.1",
"target_submit_enabled": true,
"replaced_uids": [
"$2I1766"
]
}
],
"metrics": [
{
"phase": "collect_inventory",
"unit": "component",
"completed_units": 5,
"state": "completed",
"elapsed_seconds": 2.37478139999439,
"units_per_minute": 126.32741691538796
},
{
"phase": "prepare_queue",
"unit": "step",
"completed_units": 2,
"state": "completed",
"elapsed_seconds": 232.9237998000026,
"units_per_minute": 0.5151899466822911
},
{
"phase": "backup_project",
"unit": "operation",
"completed_units": 1,
"state": "completed",
"elapsed_seconds": 1.530766299998504,
"units_per_minute": 39.19605494323897
},
{
"phase": "persist_progress",
"unit": "operation",
"completed_units": 1,
"state": "completed",
"job_id": "759dda6d24bc4fcfafb1d23fe09ac188_0",
"elapsed_seconds": 0.02788229999714531,
"units_per_minute": 2151.9028202889654
},
{
"phase": "execute_step",
"unit": "step",
"completed_units": 1,
"state": "saved_ok",
"schematic_name": "Audio-D2128",
"sheet_number": "S905L CVBS-LR",
"old_part_number": "4100-CA0000-T7",
"new_part_number": "4100-CA0000-T0",
"job_id": "759dda6d24bc4fcfafb1d23fe09ac188_0",
"worker_stage_seconds": {
"starting": 0.9689999999973224,
"session_startup": 4.3439999999973224,
"check_project": 0.09399999999732245,
"open_project": 38.60900000001129,
"open_sheet": 23.577999999994063,
"session_ready": 0.15599999998812564,
"query_components": 2.4530000000086147,
"index_components": 10.408000000010361,
"find_components": 2.5780000000086147,
"index_pins": 14.515999999988708,
"snapshot_attributes": 1.4369999999908032,
"capture": 7.282000000006519,
"before_native": 0.20299999999406282,
"native_replace": 30.187000000005355,
"restore_preflight": 13.139999999984866,
"before_restore_transaction": 2.625,
"restore_attribute_fields": 7.094000000011874,
"restore_attributes": 0.030999999988125637,
"verify_restoration": 0.8599999999860302,
"verify_attribute_fields": 1.9060000000172295,
"finished": 14.218000000008033,
"save_and_close": 5.046999999991385,
"verify_saved_project": 0.04700000000593718
},
"elapsed_seconds": 232.98710869999195,
"units_per_minute": 0.2575249778186636
},
{
"phase": "persist_progress",
"unit": "operation",
"completed_units": 1,
"state": "completed",
"job_id": "759dda6d24bc4fcfafb1d23fe09ac188_1",
"elapsed_seconds": 0.011202500012586825,
"units_per_minute": 5355.94732716676
},
{
"phase": "execute_step",
"unit": "step",
"completed_units": 1,
"state": "saved_ok",
"schematic_name": "Audio-D2128",
"sheet_number": "S905L CVBS-LR",
"old_part_number": "4100-CA1030-T7",
"new_part_number": "4100-CA0000-T0",
"job_id": "759dda6d24bc4fcfafb1d23fe09ac188_1",
"worker_stage_seconds": {
"check_project": 0.09399999999732245,
"open_sheet": 13.625,
"query_components": 3.2809999999881256,
"index_components": 10.828000000023167,
"find_components": 2.75,
"index_pins": 12.98399999999674,
"snapshot_attributes": 1.6720000000059372,
"capture": 14.389999999999418,
"before_native": 0.40699999999196734,
"native_replace": 28.389999999999418,
"restore_preflight": 11.501000000003842,
"before_restore_transaction": 2.389999999999418,
"restore_attribute_fields": 8.078999999997905,
"restore_attributes": 0.07799999999406282,
"verify_restoration": 0.6720000000059372,
"verify_attribute_fields": 1.4219999999913853,
"finished": 13.906000000002678,
"save_and_close": 3.610000000000582,
"verify_saved_project": 0.014999999999417923,
"open_project": 13.577999999994063
},
"elapsed_seconds": 144.9269440000062,
"units_per_minute": 0.4140016917764956
},
{
"phase": "task_total",
"unit": "task",
"completed_units": 1,
"state": "completed",
"completed_steps": 2,
"saved_steps": 2,
"failed_steps": 0,
"elapsed_seconds": 623.6726321000024,
"units_per_minute": 0.09620431763691586
}
],
"owners": [
{
"stage": "quick-run",
"clean": true,
"cad_exit_code": 0,
"desktop_released": true,
"startup_seconds": 50.828000000008615,
"shutdown_seconds": 5.360000000000582
},
{
"stage": "sheet-discovery-2432783abf1d4597b6f3ee4207b455cb",
"clean": true,
"cad_exit_code": 0,
"desktop_released": true,
"startup_seconds": 44.85899999999674,
"shutdown_seconds": 7.0939999999973224
},
{
"stage": "sheet-discovery-b1479e2de99e48dabbc60e7f03578aac",
"clean": true,
"cad_exit_code": 0,
"desktop_released": true,
"startup_seconds": 37.38999999999942,
"shutdown_seconds": 4.202999999994063
},
{
"stage": "sheet-discovery-b3fcfc662ce144cda2f4b33bf6040a02",
"clean": true,
"cad_exit_code": 0,
"desktop_released": true,
"startup_seconds": 34.375,
"shutdown_seconds": 6.01600000000326
}
],
"independent_read": {
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T0",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA1030-T7",
"value": "10K/NC"
}
},
"input_desktop_unchanged": true,
"no_owned_cad_on_input_desktop": true,
"no_owned_cad_foreground": true,
"all_owned_desktops_released": true,
"limits": "Formal queue completed after target-readiness change but before queue-preparation optimization was loaded. This is correctness evidence, not a final end-to-end speed comparison. Final context guard and control-file retry added afterward have separate targeted regression checks."
},
"optimized_preparation_live": {
"verified": true,
"inventory_seconds": 2.6410000000032596,
"prepare_seconds": 0.375,
"cad_startups": 0,
"native_inventory_sessions": 1,
"native_exports": 2,
"selected_refs": [
"RV05",
"RV14"
],
"queue_items": 2,
"source_hashes_unchanged": true
},
"limits": [
"single-machine samples, OS/library caches not reset",
"paired CLI inventory rejects nested/repeated/missing UID mapping and falls back to CAD; no universal native inventory coverage claim",
"optimized prepare timing excludes inventory, replacement, backup and save/reopen",
"no headless replacement backend promotion, packaging or release"
]
}
@@ -0,0 +1,51 @@
# 原生采集与执行流程巡检修复
本轮从 `2ad0a3c` 继续巡检,修复现有正式流程,不切换无弹窗替换后端,不打包发布。原始实测保存在本机 `build` 副本目录,精简结果见 [证据 JSON](2026-10-17-patrol-remediation-evidence.json)。
## 已修复
| 问题 | 原因与影响 | 修复 |
| --- | --- | --- |
| 原生采集可能返回旧料号/旧 Value | `icdb2ascii -h` 只有基础属性,实例层覆盖不一定生效;按旧料号过滤会静默漏项 | 同一数据库副本依次导出分层与展开报告,先按完整 UID 范围一一核对,再按展开后的生效料号过滤,保留分层中的工程、图页和 UID |
| 同一新料号被重复选择时,就绪判断过早 | 只等料号文本;符号/gate 和提交按钮可能尚未就绪 | 料号、合法符号/gate、提交按钮同时满足并稳定 0.45 秒;上下文校验后再次核对,若需要重新等待则重验工程、图页、选中 UID 和旧属性 |
| 位号队列准备重复启动 CAD 枚举全工程 | 已有精确位号清单,却按需要包含空白页的全图页发现流程准备队列 | 位号模式复用受内容指纹约束的器件清单,并逐目标检查 UID、位号、旧料号及旧 Value;普通全工程料号规则保留完整枚举 |
| 会话续执行指令写入可能被短时文件占用打断 | VBS 正在读取时,Windows 可能拒绝替换控制文件;原写入无重试 | 原子发布失败时最多重试 1 秒,成功或失败均清理本次临时文件;原控制内容在成功发布前保持完整 |
替换结果等待超时还会保存目标器件实际料号、封装、Part Label 和 Value,以及选料控件读数;两类诊断独立捕获,窗口失效不再连带丢掉器件诊断。不会自动重复执行可能已经发生的替换。
## 核验
原生采集在三个已有真实工程副本上验证:实例覆盖实验中的 RV05 正确返回新料号,RV11 保持旧料号;一对多及多规则副本中的目标、NC 和未选中位号读回正确。缺少展开报告、重复/嵌套 UID、配置不唯一、范围不一致、必需属性缺失时拒绝原生结果,安全回退 CAD;明确空属性与缺少属性行分开处理。两次 CLI 导出共用一个临时数据库副本和私有桌面,各自日志分别保留。
正式服务队列连续执行两个不同旧料号、相同新料号的规则:
| 位号 | 新料号 | 保存后 Value | 结果 |
| --- | --- | --- | --- |
| RV05 | 4100-CA0000-T0 | 0R | `saved_ok / session_verified` |
| RV14 | 4100-CA0000-T0 | 0R/NC | `saved_ok / session_verified` |
每条规则都由正式 VBS 保存关闭、重开核验;独立原生清单再次读回通过,RV11、RV08、RV19 保持原料号和 Value。源工程 `.prj`、`icdb.dat` 哈希未变。观察到的四个自有 CAD 会话全部正常退出,Job 清空、句柄关闭、私有桌面释放;主输入桌面未切换,自有 CAD 未占用主桌面或前台。
这次正式队列在队列准备优化载入前启动,用于验证新选料等待和正式多规则执行。它不能作为全部最终改动的完整执行测速。随后新增的提交前上下文守门和控制文件占用重试由针对性回归核验;本轮没有重跑一遍整批替换来制造速度对照。
另在全新测试副本单独核验优化后的准备路径:
| 指标 | 本次耗时/次数 |
| --- | ---: |
| 采集 5 个相关位号,分层及展开各导出一次 | 2.641 秒 |
| 生成 RV05、RV14 两项精确位号队列 | 0.375 秒 |
| CAD 启动 | 0 次 |
| 原生采集会话 | 1 次,2 份导出 |
较早的正式实跑中,准备队列耗时 232.924 秒,包含三次 CAD 读取;随后两步执行分别为 232.987、144.927 秒,任务总计 623.673 秒。优化后的 0.375 秒只对应队列准备,不含采集、备份、替换和保存重开;两次不是完整执行的重复对照,不计算整批加速百分比。
自动回归:涉及原生清单、BOM 导入结果、精确位号队列、发现缓存、多工程、失败恢复、会话控制和 Value 策略的 250 项检查通过;最后的选料守门增量另以 22 项针对性检查复核。Windows 文件共享拒绝和实例覆盖读取均在修复前复现失败,再验证修复后通过;独立代码复核未留下阻断项。
## 当前仍需改进
- CAD 启动、图页打开、全页属性/引脚快照和逐规则重开仍耗时明显。当前保留每条规则的保存校验,尚未做合并提交;跨任务复用 CAD 也未引入。
- 重复或嵌套层级实例无法用本轮简单 UID 一一对应方案认证,仍回退 CAD,不能承诺所有工程都使用原生快速采集。
- 无弹窗替换仍是研究原型,只验证同符号、单 gate、相同引脚映射;不同符号、多 gate、PCB 打包同步和任意库的覆盖尚未完成。
- `quick_run.py`、`service.py`、`store.py` 仍偏大。本轮将新增目标库存校验放在 `inventory.py`,没有进行大规模文件搬迁;后续可按队列协议、持久化、执行监督逐步拆分,并保持现有回归边界。
本轮针对读取正确性、精确目标校验、选料等待、文件共享、正式多规则流程和资源释放进行验证;不等于重新完成所有 UI 页面及发布包验收。
@@ -0,0 +1,66 @@
{
"source_hashes_unchanged": true,
"cases": [
{
"case": "add-part-invalid",
"error": null,
"returned": null,
"changed_count": 1,
"dialogs": [],
"call_seconds": 1.110000000000582,
"changed_count_certified": true
},
{
"case": "ccomp-colon",
"error": null,
"returned": false,
"changed_count": 0,
"dialogs": [
{
"title": "Change Component",
"text": [
"自定义 2",
"确定(&O)",
"取消(&C)"
]
}
],
"call_seconds": 0.3600000000005821,
"changed_count_certified": true
},
{
"case": "ccomp-colon-preserve",
"error": "AttributeError(\"'NoneType' object has no attribute 'Query'\")",
"returned": true,
"changed_count": null,
"dialogs": [
{
"title": "DxDesigner",
"text": [
"确定",
"提交数据库事务被拒。\n正在重新导入项目。"
]
}
],
"call_seconds": 0.6879999999946449,
"changed_count_certified": false,
"note": "Active view disappeared after transaction-rejected dialog. Final component state of the disposable copy is not certified."
}
],
"invalid_part_creation": {
"$2I2277": {
"uid": "$2I2277",
"refdes": "R?",
"part": "DX_RESEARCH_PART_DOES_NOT_EXIST",
"label": "",
"value": "",
"cell": "",
"symbol": "res01",
"location": [
5000,
5000
],
"orientation": 0
}
}
}
@@ -0,0 +1,101 @@
# 替换 CLI 替代:核心调用与无弹窗实验
这份记录继续验证本机 Mentor 7.9.5EE 的实际替换路径。**同符号、单 gate、相同引脚映射的无弹窗替换已有真实验证路径**:原生 DLL 查询物料 → COM 在原 UID 上应用库属性和引脚号 → 保存重开 → 原生 CLI 独立读回。它需要 CAD 进程,并非独立编辑数据库的替换 EXE。正式替换后端未切换,没有打包或发布。
## 已确认的原生提交链
在全新 Audio 测试副本中,只替换 RV05,保留同料号 RV11。多断点跟踪完成原生替换、保存重开和独立磁盘读回,全部跟踪进程退出,私有桌面释放,来源工程哈希未变。
实际命中顺序(均为本机二进制 RVA):
| 阶段 | 模块与入口 | 证据 |
| --- | --- | --- |
| 打开替换窗口 | viewdraw.exe `0x207bd0 → 0x167880` | WM_COMMAND 33977 的 MFC handler 与委托函数均命中 |
| 接收选料 | viewdraw.exe `0x168190` | 返回地址位于 PlaceDevice.dll `0x1e67b` |
| 提交替换 | viewdraw.exe `0x432f90` | 返回地址为 viewdraw.exe `0x262676`,对应调用点 `0x262671` |
`0x432f90` 也是旧 `ccomp` 命令静态引用的核心。命令 handler 传入多个空字符串,原生选料提交路径传入目标数据;存在共同核心不代表 `ccomp` 已提供完整的料号替换参数。
本次提交栈的 flags 为 9。提交后只读检查相关内存,取得目标料号 `4100-CA0000-T0`、Part Name `RESC1608N`、Part Label `0R`,与实际读回一致。该检查发生在函数返回之后,仅作辅助证据,不能用于认定完整参数类型或对象生命周期。
ICE70.dll 的 `replaceSymbols` 导出入口 `0x17c800` 及内部跳转目标 `0x17bd80` 均未命中。调试器跟踪了模块卸载和重载;结论仅适用于这次同符号替换,不能推广到所有替换。
PlaceDevice.dll 有 `NotifySelectionObservers`、`SelectLibrarySymbol`、`CreatePDController` 等 C++ 导出,当前没有取得可用类型库。它传递选择事件并需要已初始化的 CAD、库服务及回调对象,不能作为独立替换 EXE 调用。
## 公开 API 的实际边界
- `AddPartInstance("skyworth", "4100-CA0000-T0", "res01.1", x, y)` 已无弹窗创建库件,取得真实 Part Name 和 Part Label。第一个参数在此安装中需要符号分区。
- `ChangeComponentPreserveRefdes` 的两个参数均为字符串。传精确 UID 报未找到器件;传符号名时,即使只选择 RV05,也实际改变页内 19 个同符号器件,包含 RV11,并清空部分物料属性,不能用作精确位号替换。
- 创建新器件后删除旧器件,即使坐标与方向一致,也会失去旧引脚网络连接;零长度 AddNet 未能恢复。这条实验路径已排除。
直接接口的范围证据见 [JSON](2026-10-17-direct-api-scope-evidence.json)。
## 同符号原位实验与属性层级
原型通过 `AddPartInstance` 创建远处未连接的目标模板,从库模板取得属性,再应用到原器件;删除模板,保留原器件 UID、坐标、方向和连接。仅覆盖单 gate、同符号、同引脚编号集合。
首个原型只写 `InstanceValue`。CAD 保存重开核验通过;当前工具的分层清单却仍返回旧料号。进一步用 `icdb2ascii` 的 flat 和 instance 报告核实:新料号和封装已写到实例属性,基础属性仍旧。不能把该现象误判为完全没有保存,也不能忽略分层采集与有效实例值的差别。
该原型与原生替换的 flat 输出已逐器件、逐引脚比较:57 个器件、103 个引脚、22 个网络一致。比较保留引脚对应的连接,仅忽略同层属性顺序。分层输出仍有差别,因此尚未将它认定为等价的正式后端。
只改 `Value` 的对照实验在 Part Name 的有效值断言处失败,说明已有实例值会覆盖基础值。同时写基础与实例属性后,料号独立读回通过;再把目标引脚的 `Pin Number` 基础值和实例值一起同步,才补齐原生替换在分层输出中的引脚号。
最终批量实验只修改三个目标,使用同一个真实库模板,覆盖旋转及 Value/NC 选项:
| 位号 | 原方向枚举 | 新料号 | 最终 Value | 核验 |
| --- | ---: | --- | --- | --- |
| RV05 | 0 | 4100-CA0000-T0 | 0R | 与原生 GUI 基准完整比较 |
| RV14 | 1 | 4100-CA0000-T0 | 0R/NC | 保留旧 NC、检查预期字段变化 |
| RV02 | 3 | 4100-CA0000-T0 | 2.2K | 保留旧 Value、检查预期字段变化 |
保存重开后,三个 UID、位置、方向、比例、属性显示样式与引脚网络均通过核验,独立清单返回上述结果,RV11、RV08、RV19 等未选中同料号器件不变。分层和展开的完整输出均核验 57 个器件、103 个引脚、22 个网络:54 个未选中器件不变,所有连接保持一致;RV05 与原生 GUI 基准相同。RV14/RV02 没有各自再跑一轮 GUI 对照,不能宣称所有选项均已证明与 GUI 等价。
实际研究命令为 `python build/probe_headless_batch.py build/<新的输出目录>`,会复制固定 Audio 测试工程,在自有私有桌面打开新副本;不是面向任意生产工程的正式命令。来源测试工程的 `.prj` 与 `icdb.dat` 哈希核验通过,CAD 正常退出,桌面释放。
## 料号有效性与真实库接口
负例证实:`AddPartInstance` 接受不存在的 `DX_RESEARCH_PART_DOES_NOT_EXIST`,生成空 Part Name/Part Label 的器件。因此必须先查真实库,不能靠设置 PartNumber 后回读、HasPins、GetSlotsCount 或创建模板成功判断料号有效。
已验证安装自带命令:
```text
ListWGLib.exe <中央库副本.lmc> PDB <输出.txt>
```
本次在只含中央库文件及 PartsDBLibs 的副本上执行,退出码 0,列出 20 个分区、9,436 条料号,来源库哈希未变。它返回 `分区:料号`,可以精确匹配料号,不能单独证明料号关联哪个符号。
进一步将 **PartsDB40.dll 实际导出**封装成 32 位研究 CLI,已成功读取关联符号。可复用查询源码保留在 [native_parts_query.cpp](../../tools/research/native_parts_query.cpp),编译说明见 [README](../../tools/research/README.md):
```text
native_parts_query.exe <原生DLL目录> <分区副本.pdb> <料号>
```
调用 `GetPartsDBPtr` 创建对象,再调用导出的 Loader、GetPartEnum、GetPartNumber、GetPartName、GetPartLabel、GetSymDfnList、GetSymDfnName;枚举与数据库对象均 Release。使用简单指针和整数参数,没有构造厂商 STL/MFC 对象,也没有调用未导出的进程地址。
| 查询 | 真实返回 | 单次子进程调用耗时 |
| --- | --- | ---: |
| 4100-CA0000-T0 | RESC1608N / 0R / skyworth:res01 | 0.313 秒 |
| 不存在料号 | matches 为空 | 0.359 秒 |
| 4300-CC1040-7100 | CAPC0603X30N / C/100NF/16V +/-10% X5R / skyworth:cap01 | 0.391 秒 |
这三个进程退出码为 0,PDB 副本字节不变。`matches=[]` 是未找到料号,调用方必须处理,退出码 0 只表示查询完成。以上是库查询耗时,不能当作替换或全流程耗时。接口 ABI 只在本机 x86 DLL 上验证,不是厂商承诺的公开接口。
复核后补齐属性读取失败返回、符号指针/数量校验、UTF-8 输出及对象/模块释放。最终源码重新编译,前三种实际查询及中文请求名回传均通过,耗时 0.297~0.375 秒;缺少 DLL 的负例返回非零退出码 2。中文回传验证的是参数与序列化,不等于已验证所有中文 PDB 元数据的实际代码页。
## 命令边界与后续接入条件
带前导冒号的 `ccomp :skyworth:cap01.1` 仍弹出 Change Component。附加 `1` 的实验返回 True,却触发“提交数据库事务被拒,正在重新导入项目”,当前视图丢失。因此 ExecuteCommand 的 True 也不是替换成功证据;这两种写法均排除。该实验未主动保存,视图丢失后不能认证副本的最终器件状态;来源测试工程哈希未变。见 [边界证据](2026-10-17-replacement-boundaries-evidence.json)。
适合接入的受限路线是:精确验证料号存在及关联符号 → 冻结工程/图页/UID → 拒绝多 gate 或符号、引脚映射不一致 → 在原 UID 上应用模板属性,同时同步基础值和实例值、引脚号 → 按现有策略处理 Value/NC、显示样式 → 删除未连接模板 → 验证范围、连接、保存重开和独立读回。可按目标料号复用一个模板。
后续 [性能评估](2026-10-17-replacement-speed-evaluation.md) 已取得一对多的有效 GUI 对照:本次完成替换阶段缩短 32.2%,含 CAD 启停、复核及独立读回的总耗时反而增加 7.2%。分层与展开图完整一致;多规则 GUI 基准未完成且仍有逐项保存重开流程差异,不能计算多规则加速倍数。该单次结果不能外推到任意 BOM。
正式切换前仍需要补齐:
- 原生采集对实例覆盖值的读取已在[本轮巡检](2026-10-17-patrol-remediation.md)补齐:分层与展开清单按完整 UID 范围核对,读取生效值;嵌套、重复或范围无法对应时回退 CAD。复杂层级实例仍未覆盖。
- 不同符号、多 gate、不同引脚映射、重复层级实例及任意库的属性策略。这些不能直接使用此次受限路径。
- 打包/PCB 同步、Undo/取消恢复、连续多工程和重复执行的正式回归。完整原生图数据一致并不代替 PCB 打包实测。
对不同符号等范围,当前可用路径仍是已有原生替换窗口;没有确认可安全直调的通用替换 CLI。内部核心已定位,但其对象生命周期与完整 ABI 尚不具备正式封装条件。替换实验脚本、工程副本与原始报告保存在忽略目录 build 中,均为研究原型。保留的查询源码不参与应用构建或发布。
核心调用证据见 [JSON](2026-10-17-replacement-core-trace-evidence.json),批量与库查询结果见 [JSON](2026-10-17-headless-replacement-evidence.json)。所有内部地址都需要匹配模块哈希,不能写成跨版本正式接口。
@@ -0,0 +1,297 @@
{
"installation": "Mentor 7.9.5EE",
"scope": "Fresh Audio test-project copy, RV05 only; same skyworth:res01 symbol; PartLabel copied to Value",
"verified": true,
"source_hashes_unchanged": true,
"process_count": 17,
"debug_event_count": 7888,
"all_process_exit_codes": [
0,
1
],
"still_alive": {},
"errors": [],
"hits": [
{
"seconds": 253.14100000000326,
"label": "wm_command_handler_A",
"module": "viewdraw.exe",
"rva": 2128848,
"stack_words": [
1558943379,
218711080,
24049612,
1558943861,
33977,
57,
219817104,
218711080,
0,
24049676,
1558960284,
33977,
0,
0,
0,
2524577804
],
"resolved_return_addresses": [
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x89693",
"address": "0x5ceb9693"
},
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x89875",
"address": "0x5ceb9875"
},
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x8d89c",
"address": "0x5cebd89c"
},
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x61670",
"address": "0x5ce91670"
},
{
"module": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\wv\\win32\\bin\\viewdraw.exe",
"rva": "0x1b6d61",
"address": "0x5b6d61"
}
]
},
{
"seconds": 253.23500000000058,
"label": "replace_dialog_entry",
"module": "viewdraw.exe",
"rva": 1472640,
"stack_words": [
1558943379,
218711080,
24049612,
1558943861,
33977,
57,
219817104,
218711080,
0,
24049676,
1558960284,
33977,
0,
0,
0,
2524577804
],
"resolved_return_addresses": [
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x89693",
"address": "0x5ceb9693"
},
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x89875",
"address": "0x5ceb9875"
},
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x8d89c",
"address": "0x5cebd89c"
},
{
"module": "C:\\Windows\\WinSxS\\Fusion\\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3b_none_eaa49612b1f5b2ea\\9.0\\9.0.30729.6161\\mfc90.dll",
"rva": "0x61670",
"address": "0x5ce91670"
},
{
"module": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\wv\\win32\\bin\\viewdraw.exe",
"rva": "0x1b6d61",
"address": "0x5b6d61"
}
]
},
{
"seconds": 263.8439999999973,
"label": "replace_dialog_impl_A",
"module": "viewdraw.exe",
"rva": 1474960,
"stack_words": [
234350203,
470834792,
24049844,
24049900,
24049956,
24049928,
217320392,
64396220,
554450416,
554450416,
554687208,
1958530064,
216733504,
24049700,
0,
470834792
],
"resolved_return_addresses": [
{
"module": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\common\\win32\\lib\\PlaceDevice.dll",
"rva": "0x1e67b",
"address": "0xdf7e67b"
}
]
},
{
"seconds": 269.5,
"label": "legacy_change_core",
"module": "viewdraw.exe",
"rva": 4403088,
"stack_words": [
6694518,
435566232,
523421360,
554450456,
554450224,
470833488,
0,
9,
2390341880,
10882096,
162418352,
24048864,
0,
9,
16777217,
523421360
],
"resolved_return_addresses": [
{
"module": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\wv\\win32\\bin\\viewdraw.exe",
"rva": "0x262676",
"address": "0x662676"
}
]
},
{
"seconds": 425.8289999999979,
"label": "replace_query_factory",
"module": "viewdraw.exe",
"rva": 2017440,
"stack_words": [
6664601,
1,
2390340768,
0,
12331056,
24051408,
27089544,
27089544,
216441600,
24051408,
1559013441,
27089544,
0,
15,
24051556,
10348040
],
"resolved_return_addresses": [
{
"module": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\wv\\win32\\bin\\viewdraw.exe",
"rva": "0x25b199",
"address": "0x65b199"
}
]
},
{
"seconds": 425.8600000000006,
"label": "replace_dialog_impl_B",
"module": "viewdraw.exe",
"rva": 1475872,
"stack_words": [
5666157,
1,
2390340752,
162417904,
162417904,
24051340,
10214643,
1,
5666520,
12331056,
6814637,
1,
2390340776,
10615712,
162519336,
24051420
],
"resolved_return_addresses": [
{
"module": "D:\\Mentor\\7.9.5EE\\SDD_HOME\\wv\\win32\\bin\\viewdraw.exe",
"rva": "0x16756d",
"address": "0x56756d"
}
]
}
],
"negative_points": [
{
"module": "viewdraw.exe",
"label": "wm_command_handler_B",
"rva": 2133696
},
{
"module": "viewdraw.exe",
"label": "ccomp_handler",
"rva": 630032
},
{
"module": "ICE70.dll",
"label": "ice_replace_export",
"rva": 1558528
},
{
"module": "ICE70.dll",
"label": "ice_replace_body",
"rva": 1555840
}
],
"readback": [
{
"uid": "$2I2014",
"refdes": "RV05",
"part": "4100-CA0000-T0",
"value": "0R"
},
{
"uid": "$2I2022",
"refdes": "RV11",
"part": "4100-CA0000-T7",
"value": "0R"
}
],
"limitations": [
"One same-symbol replacement; no inference for other symbols or installations.",
"Observed flags value 9 is not decoded as Library Wins.",
"Runtime addresses and internal ABI are not public CLI contracts.",
"Debugger timing is not a performance benchmark."
],
"module_identities": [
{
"module": "viewdraw.exe",
"process": "viewdraw.exe",
"sha256": "80f7350dbfd283f637df15e513d1a0657b5ac908f30e9a0e540ca3d8c978e07a"
},
{
"module": "ICE70.dll",
"process": "viewdraw.exe",
"sha256": "83f696cc3a7b75ed926f7b6150a05e318fbbe62336ff43e5b202abe5e12fa297"
}
],
"nonzero_exit_notes": "A startup conhost.exe exited with code 1. All tracked vendor processes and workload exited 0; CAD/desktop cleanup was independently confirmed."
}
@@ -0,0 +1,87 @@
# 替换加速评估:原生窗口与无弹窗原型
评估日期:2026-10-17。环境:本机 Windows、Mentor 7.9.5EE、Python 3.12;工具代码基线 `cf0ba73`。
## 测量范围
比较现有原生替换窗口适配器与同符号、单 gate、相同引脚映射的无弹窗研究原型。旧路径使用正式 `native_helper` 独立进程;新路径由 32 位研究 CLI 查询真实 PartsDB,再通过 COM 创建一个未连接库模板,在原 UID 上更新库属性及引脚号,删除模板。**替换仍通过 COM,需要启动 CAD;查询 CLI 不是通用替换 CLI。正式后端未切换,本轮未打包或发布。**
只在 `build` 下新复制的 Audio_D2128 工程运行,图页为 `Audio-D2128 / S905L CVBS-LR`。两条路径都恢复坐标、方向、比例、Refdes、Value/NC 和属性显示样式,检查未选中器件、引脚网络、保存重开,并在 CAD 退出后用原生清单独立读回。
| 场景 | 选中对象 | 保留对象与选项 |
| --- | --- | --- |
| 一对多 | RV14、RV08:`4100-CA1030-T7 → 4100-CA0000-T0` | 同一旧料号 RV19 不改;两个目标 Value 为 `0R/NC` |
| 多规则共用目标料号 | RV05、RV14、RV02,三个不同旧料号统一换为 `4100-CA0000-T0` | 最终 Value 分别为 `0R`、`0R/NC`、`2.2K`;覆盖 Part Label、保留旧 Value、NC 同步和不同方向 |
旧路径在一对多场景只调用一次批量替换,不人为拆成逐位号点击。多规则场景逐规则替换并恢复属性;新路径复用一个目标料号模板。两者比较的是当前适配器与受限原型的实际工作负载,收益不能全部归因于 DLL/COM 调用方式;旧适配器包含逐组遍历、选择、检查及助手开销。
每个场景、每条路径各尝试一次,三次完成,GUI 多规则失败。运行顺序为 GUI 一对多 → 原型一对多 → 原型多规则 → GUI 多规则;没有同时运行其他研究 CAD/CLI。每次创建新 CAD 会话,但未清空操作系统、DLL 或库缓存,不能称为冷缓存测试,也不能给出稳定均值、显著性或 400 项 BOM 的吞吐量。
## 计时定义
- **完成替换阶段**:`save_close` stage 时间减 `backend_start` stage 时间,包含替换、Value/样式恢复、保存前校验和 Undo 事务结束;保存从该阶段之后开始。
- **CAD 会话**:私有桌面 CAD 启动前至会话退出后,包含打开工程、初始快照、完成替换、保存关闭、重开验证、退出和清理。
- **含独立读回总耗时**:CAD 会话 + CAD 退出后的原生清单独立读回。它不包含副本克隆、Excel 导入、创建任务、队列调度和额外的 ASCII 全图对照导出,不是产品点击执行到完成的全链路计时。
- 各阶段还单列启动、打开及初始读取、保存关闭、重开验证、退出。阶段和与会话可能有少量差异,来自进程创建、导入和阶段外收尾。
原始 `replace_and_restore_seconds` 在新路径的 Undo 提交之前停止,存在边界不对齐,因此不用于性能主比较。所有比例以统一完成边界计算:耗时缩短率 = `100 × (1 − 新/旧)`;速度比 = `旧/新`。负缩短率表示变慢。
## 结果
**本次一对多样本:完成替换阶段缩短 32.2%,但含启停和独立读回的总耗时增加 7.2%。当前只能证明受限替换阶段有收益,尚未证明总流程提速。**
| 一对多对照 | 现有 GUI 适配器 | 无弹窗原型 | 本次变化 |
| --- | ---: | ---: | --- |
| 完成替换阶段 | 39.578 秒 | 26.844 秒 | 节省 12.734 秒,缩短 32.17%,速度比 1.474× |
| CAD 会话 | 149.547 秒 | 160.156 秒 | 增加 10.609 秒 |
| 会话后独立读回 | 0.828 秒 | 1.015 秒 | 增加 0.187 秒 |
| 含独立读回总耗时 | 150.375 秒 | 161.171 秒 | 增加 10.796 秒,变慢 7.18% |
分阶段实测如下。打开包含初始全页读取;重开包含重新打开、读取及核验,不能据此认定某一个 API 单独变慢。
| 阶段 | GUI 一对多 | 原型一对多 | 原型多规则 |
| --- | ---: | ---: | ---: |
| CAD 启动与身份绑定 | 50.750 秒 | 48.890 秒 | 51.000 秒 |
| 打开工程、图页及初始快照 | 26.063 秒 | 29.734 秒 | 27.938 秒 |
| 完成替换、恢复及校验 | 39.578 秒 | 26.844 秒 | 32.562 秒 |
| 保存关闭 | 3.172 秒 | 3.703 秒 | 6.891 秒 |
| 重开验证 | 23.718 秒 | 40.156 秒 | 31.359 秒 |
| 退出与私有桌面清理 | 3.578 秒 | 7.296 秒 | 4.109 秒 |
| 会话后独立读回 | 0.828 秒 | 1.015 秒 | 0.813 秒 |
| 含独立读回总耗时 | 150.375 秒 | 161.171 秒 | 157.375 秒 |
一对多原型的库查询阶段约 0.578 秒,模板创建及映射检查约 6.266 秒,库属性应用约 1.219 秒,引脚同步约 6.734 秒,模板删除约 0.141 秒,Value/样式恢复约 6.219 秒,保存前检查及 Undo 完成约 5.687 秒。这些是阶段区间,包含区间内的断言和记录开销,不能当成孤立 API 调用时间。
一对多样本中,重开验证增加约 16.4 秒、退出增加约 3.7 秒,抵消了替换阶段节省的约 12.7 秒。单次测量不能判断这些差值是路径引起还是会话/系统波动,因此不能从本次数据认定原型稳定地更慢或更快。
多规则原型的三个目标已通过保存重开及独立读回,完成替换 32.562 秒,含独立读回 157.375 秒。GUI 基准在第一组 RV05 成功后,第二组 RV14 的 `Native replacement did not complete` 等待超时;**没有有效 GUI 多规则对照,不计算加速倍数,也不宣称这个场景与 GUI 完全等价。**
只读复核确认,多规则基准仍漏了正式 VBS `QPFinishBatchItem` 的逐项保存关闭、重开检查点(`integration/dxdesigner795/QuickPartReplace.vbs:912-929`),基准只在所有组完成后重开。该差异尚未补齐,不能将超时归为产品故障。重复选同一新料号时,GUI 目标字段可能尚在更新,也是未证实的时序线索。失败试验耗时不作为成功执行时间。
## 核验结果
- 有效一对多两条路径的初始/最终器件记录、初始目标引脚、几何、样式及最终独立读回逐项相等。
- 一对多的分层与展开图均完整一致:57 个器件/符号实例、103 个引脚、22 个网络。清单字段只有 RV14、RV08 改变;55 个其他实例的清单字段不变,包括同料号 RV19。
- 多规则原型的清单字段只有 RV05、RV14、RV02 改变,54 个其他实例的清单字段不变;目标 UID、坐标、方向、比例、属性样式、引脚网络通过保存前及重开后的检查。
- 三次成功及一次失败试验的来源工程 `.prj`、`icdb.dat` 哈希均未变;四次 CAD 正常退出、所属 Job 清空、句柄关闭,私有桌面释放确认通过。
- 四次试验使用同一冻结脚本,SHA-256 为 `c6b70769bc4a1ec1e7e1806fac6d8ba60caee269f29a6237fae9dd636fecd89d`。
## 后续优化优先级
1. **先处理会话固定开销。** 本次启动与首次打开合计约 77~79 秒。可研究同一批任务复用自有 CAD 会话的收益,同时保留工程隔离、取消、异常重启和最终释放;这只是优化方向,尚未实现或测出收益。
2. **按图页和目标料号批处理。** 复用目标库模板、合并重复的全页属性/引脚读取,保留未选中器件和连线校验。库查询已不足一秒,继续只优化查询无法解决主要耗时。
3. **先补齐基准的逐项检查点,再评估合并策略。** 正式流程每条规则保存重开有额外代价,也可能承担提交稳定性与故障恢复职责,不能为追求速度直接删除。补齐后测同一工程多规则、多个工程,以及不同目标料号;重复测量后再决定正式接入范围。
现阶段保留正式后端。受限原型可继续研究,不具备据此宣称所有料号、不同符号、多 gate、PCB 打包同步或 400 项任务统一提速的证据。
## 有效性与排除项
只有替换结果、来源哈希和私有桌面清理均通过的样本才能纳入。有效一对多场景比较了 GUI 与原型的初始/最终器件记录、引脚记录、几何、样式及独立读回,并用安装自带 `icdb2ascii` 导出分层和展开图逐器件、逐引脚、逐网络比较;多规则缺少成功 GUI 结果,不满足成对比较条件。图比较忽略同层属性及网络连接行的排列顺序,保留连接内容。这是导出图数据一致,不是工程数据库字节相同。
前期调试试验不纳入计时:同进程直接调用 GUI 适配器导致 COM 代理断连;基准漏掉每条规则后的正式恢复事务,后续规则超时;一对多替换成功后,基准错误假设 Value 属性仍存在,恢复阶段失败。冻结基准已补齐逐规则属性恢复及缺失 Value 重建,重新尝试四次,但仍存在上述多规则逐项保存重开差异。上述失败不能用来认定正式工具存在相应缺陷。
之前带调试器的核心跟踪和较早的无弹窗实验边界不同,均不与本轮数据相除。
## 证据
本轮原始报告、工程副本、固定基准脚本保留在本机忽略目录 `build/speed-final-20261017-*`,导出结果位于 `build/speed-final-ascii-20261017-*`;固定脚本为 `build/benchmark_replacement_backends-final.py`。精简计时、各阶段间隔、脚本/原始报告/初始与最终记录哈希、目标变化、独立读回和清理结果已保留在 [评估证据 JSON](2026-10-17-replacement-speed-evidence.json)。原生接口范围及尚未覆盖的替换类型见 [接口研究](2026-10-17-replacement-cli-alternative.md)。
@@ -0,0 +1,612 @@
{
"date": "2026-10-17",
"production_backend_changed": false,
"metrics": {
"replacement_completed_seconds": "stage(save_close) - stage(backend_start); includes restoration, pre-save verification and undo completion; excludes saving",
"guarded_total_seconds": "session_seconds + independent_seconds; excludes cloning, Excel/task/queue preparation and additional ASCII comparison exports",
"reduction_percent": "100 * (1 - headless/gui); negative means slower",
"speed_ratio": "gui/headless"
},
"limits": [
"one sample per backend per workload",
"new CAD session, OS and library caches not reset",
"same symbol, single gate, equal pin mapping only",
"shared destination part template; no extrapolation to arbitrary BOM or 400 items",
"replacement uses COM and requires CAD; query CLI only"
],
"workloads": {
"one_to_many": {
"targets": [
"RV14",
"RV08"
],
"runs": {
"gui": {
"verified": true,
"report_path": "build/speed-final-20261017-gui-many/report.json",
"raw_report_sha256": "cb29ab1e4363c56960bb65f94d411363616466558e609aa21237af1333b6bb15",
"harness_sha256": "c6b70769bc4a1ec1e7e1806fac6d8ba60caee269f29a6237fae9dd636fecd89d",
"samples": 1,
"replacement_completed_seconds": 39.57799999999406,
"session_seconds": 149.54700000000594,
"independent_seconds": 0.8279999999940628,
"guarded_total_seconds": 150.375,
"phase_seconds": {
"startup": 50.75,
"open_and_initial_snapshot": 26.062999999994645,
"replacement_restoration_verification_undo": 39.57799999999406,
"save_close": 3.172000000005937,
"reopen_and_verify": 23.71799999999348,
"shutdown": 3.577999999994063,
"independent_read": 0.8279999999940628
},
"native_library_query_seconds": null,
"stage_offsets_seconds": {
"open": 0.0,
"backend_start": 26.062999999994645,
"gui_replace_RV14_RV08": 26.062999999994645,
"restore_value_display": 55.187999999994645,
"verify_before_save": 60.280999999988126,
"save_close": 65.64099999998871,
"reopen_and_verify": 68.81299999999464,
"verified": 92.53099999998813
},
"stage_interval_seconds": [
{
"from": "open",
"to": "backend_start",
"seconds": 26.062999999994645
},
{
"from": "backend_start",
"to": "gui_replace_RV14_RV08",
"seconds": 0.0
},
{
"from": "gui_replace_RV14_RV08",
"to": "restore_value_display",
"seconds": 29.125
},
{
"from": "restore_value_display",
"to": "verify_before_save",
"seconds": 5.092999999993481
},
{
"from": "verify_before_save",
"to": "save_close",
"seconds": 5.360000000000582
},
{
"from": "save_close",
"to": "reopen_and_verify",
"seconds": 3.172000000005937
},
{
"from": "reopen_and_verify",
"to": "verified",
"seconds": 23.71799999999348
}
],
"before_sha256": "3cdbf2ee6af01826cca545fe02a4c0bd55d39ff795cf006f922a959807a9977e",
"after_sha256": "d0ab69d75239b17f54f90669df88d20ef194799b734a02f76ec93b9a35847550",
"changed_components": [
{
"uid": "$2I1766",
"before": {
"refdes": "RV14",
"part": "4100-CA1030-T7",
"label": "10K",
"value": "10K/NC",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV14",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "0R/NC",
"footprint": "RESC1608N"
}
},
{
"uid": "$2I820",
"before": {
"refdes": "RV08",
"part": "4100-CA1030-T7",
"label": "10K",
"value": "10K/NC",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV08",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "0R/NC",
"footprint": "RESC1608N"
}
}
],
"unchanged_component_count": 55,
"independent_read": {
"RV02": {
"uid": "$2I1428",
"part": "4100-CA2220-T7",
"value": "2.2K"
},
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA0000-T0",
"value": "0R/NC"
}
},
"source_hashes_unchanged": true,
"cleanup": {
"state": "released",
"clean": true,
"cad_exit_code": 0,
"quit_helper_exit_code": 0,
"cleanup_errors": [],
"desktop_handle_closed": true,
"desktop_release_confirmed": true,
"owned_process_records": 4,
"all_owned_jobs_empty_and_handles_closed": true
}
},
"headless": {
"verified": true,
"report_path": "build/speed-final-20261017-headless-many/report.json",
"raw_report_sha256": "d4deb2a8f6a7c2e8f0b0cdb4cb173c2e213cd17ffb7d49e8c33775961cd84ac6",
"harness_sha256": "c6b70769bc4a1ec1e7e1806fac6d8ba60caee269f29a6237fae9dd636fecd89d",
"samples": 1,
"replacement_completed_seconds": 26.844000000011874,
"session_seconds": 160.15600000000268,
"independent_seconds": 1.014999999999418,
"guarded_total_seconds": 161.1710000000021,
"phase_seconds": {
"startup": 48.88999999999942,
"open_and_initial_snapshot": 29.73399999999674,
"replacement_restoration_verification_undo": 26.844000000011874,
"save_close": 3.702999999994063,
"reopen_and_verify": 40.15600000000268,
"shutdown": 7.2960000000020955,
"independent_read": 1.014999999999418
},
"native_library_query_seconds": 0.4850000000005821,
"stage_offsets_seconds": {
"open": 0.0,
"backend_start": 29.73399999999674,
"native_library_query": 29.73399999999674,
"create_target_template": 30.312000000005355,
"apply_library_attributes": 36.578000000008615,
"synchronize_pin_properties": 37.79700000000594,
"delete_template": 44.53100000000268,
"restore_value_display": 44.67200000000594,
"verify_before_save": 50.89100000000326,
"save_close": 56.578000000008615,
"reopen_and_verify": 60.28100000000268,
"verified": 100.43700000000536
},
"stage_interval_seconds": [
{
"from": "open",
"to": "backend_start",
"seconds": 29.73399999999674
},
{
"from": "backend_start",
"to": "native_library_query",
"seconds": 0.0
},
{
"from": "native_library_query",
"to": "create_target_template",
"seconds": 0.5780000000086147
},
{
"from": "create_target_template",
"to": "apply_library_attributes",
"seconds": 6.26600000000326
},
{
"from": "apply_library_attributes",
"to": "synchronize_pin_properties",
"seconds": 1.2189999999973224
},
{
"from": "synchronize_pin_properties",
"to": "delete_template",
"seconds": 6.73399999999674
},
{
"from": "delete_template",
"to": "restore_value_display",
"seconds": 0.14100000000325963
},
{
"from": "restore_value_display",
"to": "verify_before_save",
"seconds": 6.2189999999973224
},
{
"from": "verify_before_save",
"to": "save_close",
"seconds": 5.687000000005355
},
{
"from": "save_close",
"to": "reopen_and_verify",
"seconds": 3.702999999994063
},
{
"from": "reopen_and_verify",
"to": "verified",
"seconds": 40.15600000000268
}
],
"before_sha256": "3cdbf2ee6af01826cca545fe02a4c0bd55d39ff795cf006f922a959807a9977e",
"after_sha256": "d0ab69d75239b17f54f90669df88d20ef194799b734a02f76ec93b9a35847550",
"changed_components": [
{
"uid": "$2I1766",
"before": {
"refdes": "RV14",
"part": "4100-CA1030-T7",
"label": "10K",
"value": "10K/NC",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV14",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "0R/NC",
"footprint": "RESC1608N"
}
},
{
"uid": "$2I820",
"before": {
"refdes": "RV08",
"part": "4100-CA1030-T7",
"label": "10K",
"value": "10K/NC",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV08",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "0R/NC",
"footprint": "RESC1608N"
}
}
],
"unchanged_component_count": 55,
"independent_read": {
"RV02": {
"uid": "$2I1428",
"part": "4100-CA2220-T7",
"value": "2.2K"
},
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA0000-T0",
"value": "0R/NC"
}
},
"source_hashes_unchanged": true,
"cleanup": {
"state": "released",
"clean": true,
"cad_exit_code": 0,
"quit_helper_exit_code": 0,
"cleanup_errors": [],
"desktop_handle_closed": true,
"desktop_release_confirmed": true,
"owned_process_records": 4,
"all_owned_jobs_empty_and_handles_closed": true
}
}
},
"comparisons": {
"replacement_completed_seconds": {
"gui": 39.57799999999406,
"headless": 26.844000000011874,
"seconds_saved": 12.733999999982188,
"reduction_percent": 32.17444034560639,
"speed_ratio": 1.474370436595759
},
"guarded_total_seconds": {
"gui": 150.375,
"headless": 161.1710000000021,
"seconds_saved": -10.796000000002095,
"reduction_percent": -7.179384871156835,
"speed_ratio": 0.9330152446780007
}
},
"paired_records_equal": {
"before": true,
"after": true,
"pins_before": true,
"styles_before": true,
"geometry_before": true,
"independent_read": true
},
"graph_comparison": {
"hier": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "686bbd1bff29832fa073ce5a56838a8ed6ab83ecf73ee91a2c8aa5f4758470e0"
},
"flat": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "72f929f06aadfa2cd4224e652b2d0613263da95a58796255f76e317a1c13de53"
}
}
},
"multi_rule": {
"targets": [
"RV05",
"RV14",
"RV02"
],
"runs": {
"gui": {
"verified": false,
"included_in_speed_comparison": false,
"report_path": "build/speed-final-20261017-gui-rules/report.json",
"raw_report_sha256": "7f162995170c93715b55252b559222291a3a033c4ad1806680521ca53c1689dd",
"harness_sha256": "c6b70769bc4a1ec1e7e1806fac6d8ba60caee269f29a6237fae9dd636fecd89d",
"failure": "Second group RV14: native_helper wait_for selected_replaced timed out (Native replacement did not complete); first group RV05 passed",
"source_hashes_unchanged": true,
"cleanup": {
"clean": true,
"cad_exit_code": 0,
"desktop_release_confirmed": true
},
"root_cause": "unresolved; confirmed harness difference: production QPFinishBatchItem saves/closes/reopens each item, benchmark only reopens after all groups; failure cannot be attributed to product"
},
"headless": {
"verified": true,
"report_path": "build/speed-final-20261017-headless-rules/report.json",
"raw_report_sha256": "4e85fa75f9c95412033f86827634c82b76228950f4e8a9d544b3488b3c85e8ef",
"harness_sha256": "c6b70769bc4a1ec1e7e1806fac6d8ba60caee269f29a6237fae9dd636fecd89d",
"samples": 1,
"replacement_completed_seconds": 32.562000000005355,
"session_seconds": 156.56200000000536,
"independent_seconds": 0.8129999999946449,
"guarded_total_seconds": 157.375,
"phase_seconds": {
"startup": 51.0,
"open_and_initial_snapshot": 27.937999999994645,
"replacement_restoration_verification_undo": 32.562000000005355,
"save_close": 6.89100000000326,
"reopen_and_verify": 31.35899999999674,
"shutdown": 4.10899999999674,
"independent_read": 0.8129999999946449
},
"native_library_query_seconds": 0.34399999999732245,
"stage_offsets_seconds": {
"open": 0.0,
"backend_start": 27.937999999994645,
"native_library_query": 27.937999999994645,
"create_target_template": 28.421999999991385,
"apply_library_attributes": 35.046999999991385,
"synchronize_pin_properties": 37.11000000000058,
"delete_template": 44.78199999999197,
"restore_value_display": 44.937999999994645,
"verify_before_save": 52.01600000000326,
"save_close": 60.5,
"reopen_and_verify": 67.39100000000326,
"verified": 98.75
},
"stage_interval_seconds": [
{
"from": "open",
"to": "backend_start",
"seconds": 27.937999999994645
},
{
"from": "backend_start",
"to": "native_library_query",
"seconds": 0.0
},
{
"from": "native_library_query",
"to": "create_target_template",
"seconds": 0.48399999999674037
},
{
"from": "create_target_template",
"to": "apply_library_attributes",
"seconds": 6.625
},
{
"from": "apply_library_attributes",
"to": "synchronize_pin_properties",
"seconds": 2.063000000009197
},
{
"from": "synchronize_pin_properties",
"to": "delete_template",
"seconds": 7.671999999991385
},
{
"from": "delete_template",
"to": "restore_value_display",
"seconds": 0.15600000000267755
},
{
"from": "restore_value_display",
"to": "verify_before_save",
"seconds": 7.078000000008615
},
{
"from": "verify_before_save",
"to": "save_close",
"seconds": 8.48399999999674
},
{
"from": "save_close",
"to": "reopen_and_verify",
"seconds": 6.89100000000326
},
{
"from": "reopen_and_verify",
"to": "verified",
"seconds": 31.35899999999674
}
],
"before_sha256": "3cdbf2ee6af01826cca545fe02a4c0bd55d39ff795cf006f922a959807a9977e",
"after_sha256": "9d3f8f180378aa750d4fd1da196bc40030dd543009389759398127c1a929aa08",
"changed_components": [
{
"uid": "$2I1428",
"before": {
"refdes": "RV02",
"part": "4100-CA2220-T7",
"label": "2.2K",
"value": "2.2K",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV02",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "2.2K",
"footprint": "RESC1608N"
}
},
{
"uid": "$2I1766",
"before": {
"refdes": "RV14",
"part": "4100-CA1030-T7",
"label": "10K",
"value": "10K/NC",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV14",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "0R/NC",
"footprint": "RESC1608N"
}
},
{
"uid": "$2I2014",
"before": {
"refdes": "RV05",
"part": "4100-CA0000-T7",
"label": "0R",
"value": "0R",
"footprint": "RESC1005N"
},
"after": {
"refdes": "RV05",
"part": "4100-CA0000-T0",
"label": "0R",
"value": "0R",
"footprint": "RESC1608N"
}
}
],
"unchanged_component_count": 54,
"independent_read": {
"RV02": {
"uid": "$2I1428",
"part": "4100-CA0000-T0",
"value": "2.2K"
},
"RV14": {
"uid": "$2I1766",
"part": "4100-CA0000-T0",
"value": "0R/NC"
},
"RV19": {
"uid": "$2I1885",
"part": "4100-CA1030-T7",
"value": "10K/NC"
},
"RV05": {
"uid": "$2I2014",
"part": "4100-CA0000-T0",
"value": "0R"
},
"RV11": {
"uid": "$2I2022",
"part": "4100-CA0000-T7",
"value": "0R"
},
"RV08": {
"uid": "$2I820",
"part": "4100-CA1030-T7",
"value": "10K/NC"
}
},
"source_hashes_unchanged": true,
"cleanup": {
"state": "released",
"clean": true,
"cad_exit_code": 0,
"quit_helper_exit_code": 0,
"cleanup_errors": [],
"desktop_handle_closed": true,
"desktop_release_confirmed": true,
"owned_process_records": 4,
"all_owned_jobs_empty_and_handles_closed": true
}
}
},
"comparisons": null,
"reason": "No successful GUI multi-rule baseline; prototype absolute times only, no speed ratio or GUI equivalence claim"
}
},
"all_four_harness_hashes_equal": true
}
@@ -0,0 +1,78 @@
# 执行重复步骤扫描与修复
基线 `196c84b`;修复代码 `0714c77`、`5a0f62f`、`e5ebc5d`。本轮只优化已能证明重复的读取和提交步骤,保留逐项保存与故障隔离,不打包发布。
## 扫描范围与处理结果
| 范围 | 原先重复或现有边界 | 处理 |
| --- | --- | --- |
| 正式队列整页保护 | 恢复前、恢复后、保存前、重开后共 4 次全量读取 | 合并为保存前与重开后 2 次;未通过前只保留内部待提交状态 |
| 手动恢复整页保护 | 操作者已完成替换,恢复前后分别保护未选中器件 | 两侧均保留,手动模式没有正式队列的保存提交边界 |
| 未选中 U/G 快照 | U 查找 4 个身份属性,G 又枚举全部属性及样式 | 从同一份 C/A 完整序列生成 U 和 G,消除重复 COM 查询,保持 U7/X/G 协议 |
| 属性坐标采集 | 读取 X、Y 时各调用一次 GetLocation | 同一次采集只取得一个 Point,读取两个坐标;任一读取异常仍拒绝采集 |
| 未选中引脚采集 | 先查询 pins 判断是否为空,再在连接函数中查询同一集合 | 传入已经查询的 pins;保持 owner UID、Net UID、名称和逐引脚几何核验 |
| 命令/快照校验 | 同一调用内部两次读取解析同一快照 | 使用已经解析的 Records 校验工程/图页;跨替换、重开等边界仍重新校验 |
| 原生 helper 读回 | 精确位号模式对同一未选中器件做两套相同身份检查,且额外建立第二份基线 | 精确模式使用持久化 U 基线一次读回;旧全量模式保留内存基线保护 |
| 设置选择前的上下文核验 | require_selection=False 仍查询随后完全忽略的选择集合 | 跳过该次选择查询;设置选择后、最终提交前继续检查精确选择集合 |
| 已保存结果的恢复 | 新会话读磁盘已验证正确,仍由 Finish 再保存重开 | 自有新会话只读核验通过后不保存关闭,确认关闭后生成原有 recovery_saved_verified 证明 |
| 非复用会话的最终关闭 | 保存一次、重开核验后,最后关闭仍传 SaveChanges=True | 重开后的只读关闭改为 False,实际替换总共只保存一次 |
| 非复用会话的未命中任务 | 没有任何替换写入仍保存工程 | 不保存关闭,不设置已保存标记,未命中结果仍需确认工程关闭 |
| 需要修复属性的恢复 | 初始只读预检、实际恢复写入、提交及磁盘读回 | 保留初始预检,后续使用正式队列的两个完整提交检查 |
| 引脚/组件索引 | 替换、Undo、保存重开后刷新 | 保留,不能跨 CAD 修改复用旧代理;已查询的 pins 只在同次只读采集中复用 |
| 原生 UI 加载与提交 | 异步等待前后核对目标、工程、图页和选择 | 保留,这些检查之间有等待或选择修改,不是同一状态的重复读取 |
| 取消、失败、Undo | 失败后重新读取并验证回滚状态 | 保留;原生替换失败、恢复失败、保存后失败不能共用旧成功结果 |
| BOM 库存与执行采集 | 导入已有库存可复用,执行前再次核对 UID/旧料号/Value | 保留不同阶段的认证;导入预览不能替代真正执行前的核对 |
| 队列、备份与进度 | 已单次解析队列、按共享工程根备份、按工程边界持久化总体进度 | 保留现有优化;备份和证据的前后哈希针对外部操作的不同时间点 |
| 工程会话 | 同工程多项已经共用私有 CAD 进程 | 继续保留,不把原有复用计为本轮新增提速 |
## 核验边界
正式队列现在为:采集原始基线 → 原生替换与目标库核验 → 目标器件的引脚/属性恢复核验 → **保存前全页检查** → 保存关闭 → 重开 → **磁盘状态全页检查与目标器件核验** → 生成完成证明。
未把多个料号规则合成一次保存事务。那会改变单项失败的回滚范围、取消点、断电恢复和完成记录,需要独立改造事务协议;当前已证明冗余的步骤均通过上述方式消除,无需提前生成“已完成”状态。
也未跨规则缓存完整页状态:现有事件/文件变更机制尚不足以证明所有外部及 CAD 内部变更都必然通知,缓存上轮成功结果会削弱准确性。
## 反例与回归
- 保存前未选中器件变化:禁止保存,不生成完成结果。
- 重开后未选中器件变化:保留已保存未核验状态,不生成完成结果。
- 已保存结果恢复:不再保存重开;关闭失败不得生成恢复完成证明。
- 非复用会话:新增反例约束替换任务恰好保存一次、未命中任务零次保存;原代码两例均失败,修复后通过。
- 相同属性仅一次位置读取、U/G 共享属性枚举、pins 集合只查一次、helper 身份字段只读一次;均有真实 cscript 或实际 Python 函数的失败复现与修复回归。
- 综合回归:**724 passed、1 deselected,154.35 秒**;包含现有准确性、UI、多工程、恢复、VBS 及脚本契约测试。排除项是已有的 1000 步 `<30 秒` 性能门槛,不能据此声称所有测试全绿。
- 追加非复用会话修复后,VBS/恢复/脚本契约的最终针对性回归 **130 passed,36.03 秒**;两组用例有交集,不相加。
- 34,868 字节的实际快照在独立 cscript 中解析 3 次约 **0.191 秒**,因此快照解析不是之前约 800 秒耗时的主要来源,重点为全量 COM 读取次数及读取字段的重复调用。
## 实机验证
在新副本 `build/duplicates-formal-bom-20261019/` 执行与基线相同的默认 BOM 流程和两条规则;运行前记录 VBS/helper 的 SHA256。
| 项目 | 基线 | 本轮 |
| --- | --- | --- |
| 两项正式 BOM 队列总耗时 | 799.50 秒 | **403.625 秒** |
| 耗时减少 | — | **49.52%**,约 1.98 倍速度 |
| 保存前/重开后全页核验 | 每项 4 次 | 每项 2 次,两个提交边界均保留 |
| 第一项/第二项执行器耗时 | — | 232.01 / 166.83 秒,第一项含私有 CAD 启动 |
| 目标器件 | RV05/RV14 | 两项新料号正确,Value 为 0R / 0R/NC,原 UID 保留 |
| 其余器件与连接 | 55 个未选中器件、103 个引脚、22 个网络 | 独立层级/扁平导出均确认不变 |
| 原始快照字段等价 | 120 行,排除工程路径元数据行 | 本轮 120 行逐行内容多重集完全相同,没有删减采集字段 |
| 后台释放 | 自有进程和桌面释放 | 释放确认通过,主桌面与前台不受接管,原始工程哈希不变 |
该对比是同机、同库、同源工程的单轮实测;两轮负载存在差异,不替代连续多轮性能验收。总耗时含队列内的启动、保存重开及收尾,不含 BOM 编辑/导入和独立 ASCII 对比。
只读恢复实机在这个副本队列中模拟一项“已保存、读回证明丢失”,保留原状态证据后调用正式 `recover_quick_run`:**87.797 秒**完成 `recovery_saved_verified`,没有再次调用原生替换。恢复前后全部 57 个器件、103 个引脚、22 个网络的层级/扁平导出完全相等;恢复私有桌面与 CAD 释放确认通过。
上述两项正式队列和恢复运行使用 `5a0f62f` 的脚本。追加的 `e5ebc5d` 仅改非复用会话的两处只读关闭;另在全新副本 `build/duplicates-non-session-bom-20261019/` 做专门实机验证:单项 BOM 替换 **207.469 秒**,`saved_ok/batch_closed`,独立读回正确;其余 56 个器件、103 个引脚接网和 22 个网络的层级/扁平导出不变,原始工程哈希与私有桌面释放确认通过。该单项结果不与双项队列直接比较。
独立代码审查已分别复核两个提交范围,未发现新的 Critical/Important;审查指出的非复用会话重复保存已由 `e5ebc5d` 修复。
精简机器证据见 [execution-duplicates.json](../testing/evidence/2026-10-19-execution-duplicates.json)。原始工程、桌面观察、阶段明细和测试 XML 均留在上述 `build` 目录中,不提交工程数据或厂商二进制。
## 仍未达到的发布条件
403.625 秒仍高于建议的同样例 180 秒目标。剩余主要成本为必要的完整 COM 采集和每项保存重开;若继续提速,需要认证更快的完整读取接口,或单独改造图页事务及恢复协议。当前不能直接跨 CAD 修改使用旧快照。
Cell Name 与新 Part Name 的封装映射证明、复杂层级/多 gate 实机认证、现有 1000 步性能门槛仍按准确性审查报告保留,未因本轮提速宣称已解决。
后续 [器件索引按需采集优化](2026-10-19-lazy-component-indexes.md) 已将同源工程单轮实测进一步降至 **375.688 秒**;本报告的 403.625 秒保留为前一阶段基线。
@@ -0,0 +1,55 @@
# 器件索引按需采集优化
后续原生宿主完整采集已取得新的同源实测:189.250 秒,见 [原生快照报告](2026-10-19-native-snapshot.md)。下文保留本阶段真实基线。
在上一轮重复步骤修复 `2ad36ba` 基础上继续优化。正式代码提交为 `8fe82c3`,追加防护用例为 `998d78d`。本轮不打包、不发布,不改变逐项保存、磁盘重开和故障恢复协议。
## 本轮修改
- 采集直接遍历已查询的器件集合,移除随后没有消费者的完整定位索引。未命中任务不再为定位索引读取器件坐标。
- 精确 UID 范围只对目标器件执行旧料号和 Value 的匹配查询;未选中器件仍由同一次完整 C/A 快照生成 U/G 基线。全匹配模式仍检查全部器件的旧料号,读取错误仍向上传递。
- 恢复定位先建立 UID 索引;UID 缺失才采集位号,位号也未找到才采集坐标。三种索引保留重复项,不把冲突器件静默覆盖或丢弃。
- 索引只在原有当前上下文中复用;建立前后核对工程和图页,工程/图页变化或显式失效后重新采集。替换、保存重开后的刷新及保存前、磁盘重开后的完整检查均保留。
这里没有跨料号规则缓存完整页快照,也没有合并多个规则的保存事务。只把未使用的读取移除,把备用定位字段延迟到实际需要时读取。
## 回归与审查
先以实际 cscript 运行生产函数复现:未命中仍读取坐标、精确选择查询了无关器件的 FindAttribute、UID 已命中仍读取备用坐标。修复后这些反例通过。
- 执行、恢复、VBS、脚本合同及自动替换回归:**147 passed,43.59 秒**。
- 追加定位保护:**7 passed,3.73 秒**;其中 1 项与上述套件重叠,不能将两组数量相加。覆盖 UID/位号/坐标冲突、共享 UID 的备用桶、显式失效、工程上下文变化后重新读取坐标。
- 完整脚本经 Option Explicit 编译检查,未启动 CAD。
- 独立审查未发现 Critical/Important 问题;建议补充的冲突与上下文变化用例已补齐。
## 同源工程实机验证
从原始 Audio 工程创建全新 `build/lazy-index-formal-bom-20261019/project/` 副本,运行与上一轮相同的流程:创建任务 → 导出默认 BOM → 填入 RV05/RV14 两条替换 → 数值型新料号反例拒绝且不保存计划 → 修正为文本 → 导入预览 → 确认 → 正式顺序执行 → 每项保存重开 → 独立原生库存及 ASCII 读回。
| 指标 | 上一轮 | 本轮 |
| --- | --- | --- |
| 两条规则的正式队列总耗时 | 403.625 秒 | **375.688 秒** |
| 耗时减少 | — | **27.937 秒,6.92%** |
| 首项执行器耗时,含自有 CAD 启动 | 232.011 秒 | 230.117 秒 |
| 第二项执行器耗时 | 166.829 秒 | 140.349 秒 |
| 成功保存 / 失败 | 2 / 0 | 2 / 0 |
相对最初 799.50 秒基线,当前样例累计减少 **53.01%**。这三次均是同机、同库、同源工程的单轮测量,运行时负载和缓存并不完全相同,不能据此承诺其他工程均有相同收益。第一项总耗时变化很小,也说明局部减少调用不等于每一阶段都会按比例变快。
完整保护证据:
- RV05/RV14 新料号均为 `4100-CA0000-T0`,Value 分别为 `0R`、`0R/NC`,原 UID 保留。
- 第一项原始快照排除路径元数据后,**120 行内容多重集与上一轮完全相同**,没有减少采集字段。
- 独立层级、扁平导出均核对 **57 个器件、103 个引脚、22 个网络**;55 个未选中器件及所有引脚连接、网络关系不变。
- 本轮最终层级、扁平导出的完整图数据与上一轮最终结果完全相等,比较保留属性、引脚及连接内容,仅忽略同层行顺序。
- 来源 `.prj` 和 `icdb.dat` 哈希不变;自有 CAD、私有桌面释放通过,未接管主桌面前台。
运行前记录脚本和 helper 的 SHA256,核对与当前源码一致。机器证据见 [JSON](../testing/evidence/2026-10-19-lazy-component-indexes.json)。原始报告、桌面观察、快照及导出留在忽略的 `build/lazy-index-formal-bom-20261019/`、`build/lazy-index-ascii-result-20261019/` 中,不提交工程或厂商文件。
## 后续边界
本机类型库确认有 `IVdComp.GetBatchAttributes` 和 `GetBatchOats`。参考手册的 Component Object 章节(PDF 页 297–298)将返回格式描述为 `Visibility Name=Value<CR>`;没有坐标、字体、颜色等完整快照字段,因此本轮未用它替代完整采集,也未声称已经完成本机现场等价认证。源手册位于 AppTraceRecorder/reference/SiemensEDA_Python_Interface/xpedition_designer/SEDA_Xpedition_Designer_automation/designer_auto_ref.pdf。
1000 步模拟队列在修改前的 cProfile + tracemalloc 定位运行中为 **36.198 秒**、峰值约 **2.17 MiB**,仍未通过 30 秒门槛。剖析指向逐项命令原子发布、日志写入和文件状态检查;本轮仅修改 VBS,未改变 Python 队列持久化,也未通过减少可靠落盘来让门槛通过。该结果包含剖析开销,不是 CAD 实际替换吞吐量。
当前样例仍高于建议的 180 秒目标。若需大幅继续提速,应认证能够返回完整保护字段的批量读取路线,或单独改造图页事务、取消及恢复协议。Cell Name 映射证明、复杂层级/多单元/多 gate 认证等既有发布缺口继续保留。
@@ -0,0 +1,59 @@
# 原生采集进度与库列表刷新修复
本轮处理两项执行稳定性问题,并继续只读核对封装映射。没有合并保存事务,没有减少采集、保存前或重开后的完整检查,未打包发布。
## 采集仍在工作时的超时误判
原生脚本在 CAD 内执行,外部调用在返回前无法取得它的 stdout。上一版本只有调用前后两次进度,采集超过 150 秒时,即使 CAD 仍在逐件读取,监控也可能请求停止。
原生宿主现在通过本次 attempt 专用的 ASCII 侧文件发布真实进度,常规更新按约一秒节流,并在阶段完成时发布。它在完成器件或引脚读取等原有进度边界产生,不使用独立定时器伪造活跃;卡住的 COM 调用仍会触发原超时保护。
监控只在 native_snapshot_read 阶段接收,逐项验证本次 token、初始监控 job、当前 job、父 stdout 序号、独立递增的原生序号、安全标记及计数。它只更新活跃时间和显示计数,不能推进 stdout 序号、把不安全阶段变成安全阶段,也不能形成任何保存成功证明。跨调用、跨 job、旧令牌、重复或不完整帧均不能延长等待。
取消文件仍先在原有安全边界检查,然后才尝试发布进度。侧文件暂时不能读写时,监控继续按原超时预算处理;可选进度 I/O 错误不覆盖真实读取错误,原生完整结果仍必须经过原有严格校验。监控主进度文件的非共享类 I/O 错误继续向上传递。
界面增加该阶段的中文说明“采集并核验器件完整状态”。新增 native_progress_frames 仅用来记录实际接收数量,切换 job 后归零,不参与成功判定。
## DxDataBook 刷新时的失效 UIA 行
首次新副本实机回归中,第一项在获取库行时失败:pywinauto 的 UIA wrapper 对已失效行读取到 control_type=None,查找包装类抛出 KeyError(None)。原始 traceback 位于 build/native-progress-formal-bom-20261019/ 的 native JSON。该项停在提交原生替换之前,关闭工程未保存;第二项继续正常保存。这一轮为 1 成功 / 1 失败,报告保留 verified=false,源工程哈希不变,两个自有 CAD 与私有桌面释放通过,不计作成功验收。
wait_for_library_rows 现在只对这个明确的 KeyError(None) 重新读取列表,清空之前的稳定期并重新等待稳定,沿用原 30 秒总期限。持续失效会超时;其他 KeyError 或运行错误直接抛出。没有重试替换、点击提交或任何 CAD 写入。回归反例先复现 2 failed / 7 passed,修复后相关组 49 passed。
## 封装映射诊断
使用另一个私有 CAD 会话,在成功工程的新副本上只读获取属性层,确认:
| 位号 | 保存料号 | Part Name | Cell Name 的 Value / InstanceValue |
| --- | --- | --- | --- |
| RV05(已替换) | 4100-CA0000-T0 | RESC1608N | 空 / RESC1005N_0402 |
| RV14(已替换) | 4100-CA0000-T0 | RESC1608N | 空 / RESC1005N_0402 |
| RV11(未替换) | 4100-CA0000-T7 | RESC1005N | 空 / RESC1005N_0402 |
旧 Cell Name 作为实例属性保留,不能仅以 Part Name 更新认定 PCB 封装同步成功。当前恢复代码只恢复 Comment/Notes/User_ 等实例值,其余属性只恢复显示样式;该 Cell Name 不是本轮显示恢复把旧值写回的结果。但本次没有取得替换提交后、恢复前的独立采样,不能进一步声称已经证明原生替换内部如何处理了该实例。
目标料号的权威 Cell 映射及多候选选择规则仍未确认。本轮没有按名字推断封装、清空实例值或直接覆写。下一步应先取得目标库允许的 Cell 集合,再验证替换后的有效 Cell 和保存重开结果,遇到歧义时停止。独立属性层证据留在 build/cell-instance-read-20261019/report.json,来源哈希及自有会话释放通过。
安装中还发现 pdbext.exe / pdbquery.exe,隔离桌面下的 -h 探针均未在十秒内给出命令行帮助,已由自有 Job 清理;没有把它们接入生产,也不将它们称作可用替换 CLI。
## 定向回归与审查
- 原生采集、运行时组合、监控、阶段计时、执行反馈、会话、安全及恢复:110 passed,59.13 秒。
- 追加跨 job 和失效监控 job 边界:13 passed,0.67 秒;其中 11 项已在上述套件,不将两组直接相加。
- 库目标就绪、自动替换及安全:49 passed,8.88 秒;安全文件与上述套件有重叠,不把数量相加作为独立用例总数。
- 实际子进程仅用侧文件、没有 stdout 心跳,运行超过设置的 idle 限制仍正常完成;旧版相同反例会误超时。持续重放、旧调用、旧 job、错误计数、安全标记改变及不完整行不能延长等待。生成器覆盖不能写进度文件、会话初始/当前 job 不同以及不安全阶段保留取消请求的路径。
- 独立只读审查未发现 Critical/Important 问题,覆盖进度与完整证明的隔离、取消、计数重置和 UIA 只读重试。生产提交为 `911afdf`。
超大页仍缺真实规模认证;短 idle 的子进程反例不能代替所有复杂工程实测。180 秒样例目标、千步队列性能和 Cell 映射等既有发布缺口没有因本轮测试通过而自动关闭。
## 修复后完整 BOM 实机回归
另建 build/native-progress-formal-bom-20261019-v2/ 副本,重新走创建任务、导出默认模板、数值料号失败提示、修正文本、导入预览确认、正式替换、逐项保存重开、独立库存和 ASCII 导出。RV05/RV14 两项保存成功、零失败,料号为 4100-CA0000-T0,Value 分别为 0R 和 0R/NC,原 UID 保留。
完整队列耗时 **188.937 秒**,上一轮为 189.250 秒,基本持平;本轮不声称取得新的吞吐量提升。最后一项记录实际接收到 **8 条**原生进度,未触发 stop_requested。两项共 6 次完整原生采集;首项快照排除 M 行后仍为 120 行,与上一轮内容多重集完全一致。
独立层级、扁平导出均确认 57 个器件、103 个引脚、22 个网络;55 个未选中器件、全部引脚连接和网络关系不变,完整最终图与上一轮结果完全相等。来源工程哈希未变,自有 CAD 和私有桌面释放,未抢主桌面前台。启动时记录四个执行模块的哈希,完成后与当前源码核对一致。
这一轮没有额外重跑故障恢复实机;恢复代码经过定向回归,上一轮完整只读恢复的证据继续按其版本边界保留。UIA 瞬时失效的重试由反例测试证明,新实机成功本身不证明该瞬时错误在本次再次发生过。
机器证据:[JSON](../testing/evidence/2026-10-19-native-progress-and-library-redraw.json)。没有以首次失败回归的部分成功覆盖最终结论,两个原始报告均保留。
@@ -0,0 +1,56 @@
# 原生脚本宿主完整采集优化
同源工程的两条默认 BOM 替换,正式队列从上一轮 **375.688 秒降至 189.250 秒,减少 49.63%**。相对最初 799.50 秒基线,累计减少 76.33%。这是同机、同库、同源样例的单轮对比,不能推广为所有工程的固定加速倍数。本轮未打包、未发布。
正式集成提交:`81f3468`;原生适配模块初版:`2f6060d`;同次快照内 UID 复用:`5b625b0`。机器证据见 [JSON](../testing/evidence/2026-10-19-native-snapshot.json)。
## 改动与边界
安装自带 `wv/samples/viewdraw/scripting/menu.vbs` 描述了 `run <script.vbs>` 命令。本机实测可通过 `ExecuteCommand` 让 CAD 自带宿主在进程内执行完整只读采集,减少逐字段跨进程 COM 调用。它仍使用原来的 COM 对象模型;本轮没有找到或引入独立的无界面替换 CLI。
- 单独新增 `NativeSnapshotReader.vbs`,生成器从当前生产脚本提取白名单内的原有只读函数,不另写一套字段采集。保留属性、样式、位置、几何、引脚及实际归属、连接和上下文检查。
- 每次调用使用独立令牌、结果文件和 CAD GUID,验证工程、图页、完整 U/G 配对、UID 集合、总数与结束帧。未选中器件的完整 U/G 字符串必须与持久化基线完全一致。
- 仅自有私有桌面批次启用。手动模式、旧运行时和缺模块时使用原外部路径。原生命令所需短路径不受支持时,只能在派发前退回原路径;命令发出后,失败或不完整证明会停止当前步骤。
- 采集、保存前检查和磁盘重开检查各自重新读取。原生替换、属性恢复、逐项保存、重开、恢复和私有桌面释放协议保留。
- `worker_runtime.copy_worker_script` 统一处理准备、开始会话、恢复执行步骤和故障恢复这四处运行时复制。自定义脚本没有同级适配模块时保持原字节;重复准备不会累计追加;同路径复制不改源文件。资源清单已加入模块,但没有运行打包。
- 同次快照复用已读 UID,逐引脚实际 owner 读取保留。没有跨替换或重开复用完整页状态。
## 实机默认 BOM 与恢复验收
在新的 `build/native-read-formal-bom-20261019/project/` 副本上创建任务、导出默认模板、填写 RV05/RV14、导入预览并确认后,正式顺序执行两项替换。另把一个新料号填为数值,确认拒绝该行并且不持久化替换计划,再改为文本继续。
| 指标 | 上一轮 | 本轮 |
| --- | --- | --- |
| 两条规则正式队列总耗时 | 375.688 秒 | **189.250 秒** |
| 首项执行器耗时,含自有 CAD 启动 | 230.117 秒 | 121.005 秒 |
| 第二项执行器耗时 | 140.349 秒 | 62.386 秒 |
| 成功保存 / 失败 | 2 / 0 | 2 / 0 |
完整队列总耗时还包含准备、备份、持久化和会话释放,不能直接用两项执行器耗时相加替代。原始阶段计时保留在机器证据中;第二项阶段计数来自最后一次 worker-progress 采样,最终关闭耗时可能未计全,不当成精确的互斥阶段分解。
核对结果:
- RV05 与 RV14 均变为 `4100-CA0000-T0`,Value 分别为 `0R`、`0R/NC`,原 UID 保留。Part Label 拷贝和默认开启的 NC 同步走正式流程。
- 日志确认两项共执行 **6 次**完整原生采集:每项采集、保存前、重开后各一次。
- 第一项原始快照仅排除路径元数据 M 行后,**120 行内容多重集与上一轮完全一致**,没有减少字段。
- 独立层级及扁平 ASCII 导出均核对 **57 个器件、103 个引脚、22 个网络**;55 个未选中器件、全部引脚连接和网络关系不变。完整最终图与上一轮最终结果相等。
- 在已成功的副本队列中注入“已保存、缺少回读证明”状态,正式只读恢复用时 **61.062 秒**,返回 `recovery_saved_verified`。没有再次调用原生替换,关闭工程时不额外保存;恢复前后独立导出的完整图相等。此注入验证不等同于随机杀进程或断电认证。
- 来源 `.prj` 和 `icdb.dat` 哈希不变。执行和恢复的观察均确认主输入桌面未切换,自有 CAD 未抢前台,自有进程退出且私有桌面释放;主桌面文件持续可读。
启动时记录主脚本与 native_helper 的哈希;验收后核对实际执行和恢复使用的合成脚本字节,均精确等于当前主脚本加适配模块,另记录适配模块及组合器哈希。工程、厂商文件和完整现场日志只留在忽略的 build/ 下。
## 定向回归与研究结果
最终相关套件 **239 passed,64.63 秒**;队列、安全、恢复和打包资源合同 **81 passed,43.65 秒,1 deselected**。320 项分属不重叠的文件组。旧的 1000 步模拟性能门槛没有通过,本轮明确排除且不计作成功。
覆盖了旧令牌、错误工程/图页/GUID、截断、重复或丢失 UID、U/G 不一致、数量错误、完整几何变化、取消、原生错误传播、适用条件、派发前路径回退以及派发后禁止回退。完整合成脚本通过 Option Explicit 编译检查。独立只读审查没有 Critical/Important 发现,建议的调用编排及开关边界用例已补齐。
此前接入套件曾为 201 passed / 13 failed:提取式 guard 测试没有带入新增的 QPUseNativeSnapshot,修正测试夹具后重跑取得上述最终结果;失败证据保留。首次宿主探针也失败过:CAD 预定义了三个 Vd 枚举,重复声明引发编译错误对话框。生成器已删除重复声明,后续两轮及同会话连续调用通过。首次探针的自有错误对话框经定向确认后,CAD 正常退出,桌面释放,源哈希不变;其 clean=false 保留为探针异常记录。
纯只读宿主对照:57 个器件的 114 行完整 U/G,与外部读取相等。第二轮原生读取 **0.844 秒**,同会话重复 **0.765 秒**,外部读取 **33.235 秒**;这是局部采集耗时,不能称作整个替换流程快了约 39 倍。
`GetBatchAttributes + GetBatchOats` 的 57 器件对照虽然为 0.446 秒、逐属性为 6.038 秒,但 RV01 的 Part Label 出现单空格与空串差异,且不包含完整样式字段,因此没有用于生产保护。
## 尚待认证
189.250 秒仍高于建议的 180 秒目标。原生采集期间没有逐器件的外部心跳;现有 150 秒 idle 监控、停止文件和安全边界取消继续保留,超大页需要单独验证。复杂层级、多单元/多 gate、PCB Cell Name 映射以及旧 1000 步模拟队列性能门槛仍是缺口,本轮不能据此宣布全面具备发布条件。
@@ -0,0 +1,105 @@
# 目标封装选择:实现决策与审查
功能对应源码 `ec75445`。审查按阶段保留,最终功能结论应结合[最终实机验收](../testing/2026-10-19-target-cell-acceptance.md)和本文件末尾的修复复审读取。没有发布或合并到其他分支。
## 本轮实现决策及代价
1. 沿用已授权的 `codex/bom-import-state` 工作区继续迭代,保留未跟踪的 `feedback/`。理由是既有采集改动和实机任务正在该分支进行;若隔离边界判断有误,需要按分段提交回退重做,不能清除其他工作。
2. target_cell 保存精确原生 Cell Name,不发明分区限定名。跨分区同名候选阻止执行;代价是这种库需要先人工消除歧义。
3. BOM 保留原 11 列,封装从显式规则或相同料号映射中传递。料号变更清空失去绑定的选择;代价是旧规则及新映射需要手工补选。
4. 原生 helper 只使用重新完整核对源及证据的缓存。原因是冷读最多可能等待互斥 120 秒再等待工作进程 90 秒,不能挤占原生写入的 120 秒预算;代价是缓存丢失或源变化后需回规则重新读取。
5. 独立 Python 恢复预检允许在启动恢复 CAD 前冷读,但必须完全匹配原事务证据。它位于原生写入计时器之外,且中断时规则编辑可能锁定;代价是明确的恢复操作可能等待一次有上限的冷读,而不能用新证据替换旧事务的绑定。
规则/UI、目录及执行传输分别通过独立审查;BOM 先保存后补规则的空封装传播修正也已复审。以下保留整体验收审查及唯一一次最终修复复审。
---
# Final feature review — explicit target Cell
Reviewed committed feature range `5ad0c66..4d1b825`, including the shared-cache follow-up `cf671a1` and BOM-first propagation fix `27dec68`. This is a read-only implementation review; the only file written is this requested review artifact. No tests, CAD operations, process changes, source edits, Git mutations, or subagents were used.
## Strengths and plan alignment
- The exact native Cell name is preserved through schema migration, rules, batch signatures, saved target plans, BOM imports, target-rule grouping, queues, the separate L snapshot record, and native transaction evidence. Existing M positions and the default 11 BOM columns are preserved. Legacy selections stay empty rather than being guessed.
- The BOM-first integration fix compares the effective OLD→NEW mapping after existing propagation and fills only blank Cells. Its added tests check add/update, disabled rows, independent nonblank selections, unrelated destinations, custom Value, and NC preservation (`batch_rules.py:94`; `test_target_cell_rules.py:278`).
- Asynchronous UI results are bound to generation, destination PN, selection changes, dialog lifetime, and current project scope. Candidate loading does not automatically select a single candidate. The GUI checks missing selections before confirmation/startup; the native helper independently requires a valid L row before attaching.
- The catalogue uses exact COM enumeration on a complete owned clone, verifies physical partition dependencies, rejects empty/ambiguous results, and checks original-source manifests around copying/reading. Its cleanup certificate and digest-bound evidence precede cache publication. No raw PDB negative filter was introduced.
- Shared cache placement is safe with respect to authority: `native_helper.py:77` only changes the evidence location. `cell_catalog.py:185` still keys proof by resolved original library path, full source fingerprint, PN, and requested partition; evidence validation repeats those bindings and cache hits rehash the source. It does not turn into a PN-only cache.
- The helper validates the actual active project's library, exact chosen membership, and native Part partition, then revalidates before native submit. Queue selection, snapshot hash, project/sheet, target UIDs, native identity, selected Cell, complete candidates, and source fingerprint remain bound through resume/recovery.
- Selected Cell assignment is an explicit `InstanceValue` write on each preflighted target, after ordinary restoration and inside the existing undo transaction (`QuickPartReplace.vbs:1597`, `:1672`). The effective Cell check runs after restoration and through the shared verification routine after disk reopen. Recovery rejects changed/missing catalogue evidence before its worker, checks the actual recovery library, and does not allow Cell mismatch error 878 into its restore-only fallback.
- NR2 retains the original selected C/A snapshot routine while combining it with correlated untouched U/G capture. The parser rejects incomplete/foreign/duplicate selected states and the consumer rechecks PN/target identity. NR1 saved/untouched verification remains in place.
## Issues
### Critical
None found.
### Important
1. **New catalogue work consumes the unchanged hard native-mutation deadline.**
- Location: `src/dx_productivity/trial_task_center/native_helper.py:517` and `:699`, under the timer at `:816`; catalogue lock wait at `src/dx_productivity/trial_task_center/cell_catalog.py:342` and worker wait at `:389`.
- Trigger: execute a persisted valid selection with an unpopulated/invalidated cache, or while an obsolete asynchronous UI catalogue read still owns the catalogue mutex. Closing the dialog does not cancel its background read. The catalogue permits a 120-second lock wait plus a 90-second worker operation, while `run()` starts one 120-second timer before *all* catalogue and native replacement work. The actual standalone cold read evidence is already 83.9345502 seconds; subsequent native selection/replacement/verification and the second source check must fit into the remaining budget.
- Impact: an otherwise valid operation can be killed by `os._exit(2)` during preflight or, worse operationally, after native submit and before verification. Existing rollback/uncertainty handling should prevent a false success, but this creates avoidable failed/protected tasks and makes a warm UI cache an undocumented prerequisite for reliable execution. Concurrent catalogue work can exhaust the deadline before replacement even begins.
- Fix: give read-only catalogue preflight its own bounded phase and preserve an independent native-mutation deadline; coordinate outer worker idle/progress limits with those phases. Keep the immediate pre-submit source/membership revalidation. Do not merely assume the UI warmed the cache or relax the performance acceptance threshold. Add focused clock-controlled coverage for a cold/queued catalogue read and for timeout after the mutation phase begins.
- Accepted alternative proposed by root after this review: explicitly forbid cold catalogue launches in both native-helper checks and recovery. A fully fingerprint-revalidated cache hit may proceed; absent, stale, corrupt, or otherwise invalid evidence must fail before mutation with an actionable “重新读取目标封装” instruction. UI explicit reading may perform the cold read. This removes the mutex/worker delay from the mutation budget without weakening authority. Cover each miss/error path with assertions that no isolated reader launches, cover successful validated reuse, and document the reread requirement. This proposal is sufficient in principle; implementation has not yet been reviewed.
- Evidence limit: this finding follows the actual timeout composition and inspected cold-read evidence. The root is observing a new cold-cache cross-Cell run; this review has not inspected or certified that still-running result, and does not claim it has already timed out.
### Minor
1. **User instructions refer to a target-plan column that is not displayed.**
- Location: `docs/user/target-cell-selection.md:11`.
- The step asks users to inspect the target plan's “目标封装”. `ui/target_table.py:6` and its `data()` still expose ten columns without Cell; only the rules table displays the new selection. Users cannot perform that stated check.
- Correct the wording to the actual rules table, or deliberately add a read-only plan display in a separate authorized UI change. No BOM column change is needed.
## Evidence inspected and limits
- Read the spec, plan, task 2/3/4 reports, their independent reviews, the BOM fix review, ledger, all changed implementation areas, and focused test code for catalogue/NR2/Cell transport/BOM-first behavior. Bounded surrounding reads checked current-command publication, exact queue comparisons, the helper watchdog, shared cache location, undo boundaries, saved verification, and recovery fallback behavior.
- Parsed existing `build/cell-transport-verified-20261019.xml`: 137 tests, zero failures/errors/skips, 49.444 seconds. Parsed `build/native-selected-commit-20261019.xml`: 55 tests, zero failures/errors/skips, 16.669 seconds. These are existing reports, not fresh reruns or a whole-suite pass claim.
- Independently checked the recorded v3 catalogue evidence offline: all 86 before/after manifest entries match; recomputed fingerprint is `7b66672325b41c0915b1f4c1f8fb64b7cd2bda526e64721d85b66a17647b5d9f`; cache digest matches catalogue bytes; worker verification and Quit are true; both Jobs report zero active processes and closed handles with no cleanup errors; private desktop release is confirmed; the clone is absent. The inspected summary records cold 83.9345502 seconds and cache 2.3448634 seconds.
- The task reports retain 138 scoped rule checks, 64 BOM-fix checks, and 29 catalogue/application checks. The reviewed test bodies substantiate their intended contracts; this review did not independently rerun those commands.
- Inspected the retained simulated-worker comparison: current 33.6976356 seconds versus baseline 30.0630522 seconds; both fail the unchanged 30-second threshold. Neither general speed improvement nor release readiness is established. Broader-suite/legacy-UI limitations remain in the task reports.
- Prior selected-capture acceptance is same-Cell evidence; it does not certify this feature's cross-Cell writes. The root's current explicit cross-Cell BOM/save/reopen/source-hash/owned-resource acceptance remains a separate pending gate. No packaging or frozen-release acceptance was performed, consistently with scope.
## Assessment
**Ready to merge: With fixes.** Resolve the Important deadline integration issue and collect the pending explicit cross-Cell acceptance before claiming the feature complete. Apart from that issue, the reviewed implementation consistently maintains Cell choice and source authority across the existing execution safety boundaries; no additional Critical or Important defect was identified.
---
# Final scoped fixwave review — 4d1b825..ec75445
## Findings disposition
### Important: catalogue work inside the native 120-second deadline — ADDRESSED
- `native_helper.py:90` explicitly passes `allow_cold_read=False`, and the shared binding helper defaults to the same mode at `:93`. Both the initial active-project catalogue check and final pre-submit check use this route. The native watchdog remains 120 seconds (`:817`); no timeout or performance threshold was relaxed.
- `cell_catalog.py:175` retains a backward-compatible, keyword-only optional mode. Source manifests, the path/fingerprint/PN/partition cache key, evidence SHA256, exact evidence binding, candidate validation, worker/Quit verification, and owned cleanup proof remain necessary. A valid hit still performs the second full source manifest check. Source changes during that check fail closed.
- Missing/stale cache or damaged/invalid evidence cannot reach read-directory creation, cloning, the launch mutex, or a cold worker when cold reading is forbidden (`cell_catalog.py:199`, `:203`). The error tells the user to reread target Cells in the rule editor. Catching invalid evidence object shapes as `AttributeError` closes the malformed-proof path without accepting such proof.
- The new behavioral native test reaches the first and second actual catalogue calls in turn and asserts explicit cache-only mode, no replacement submit, and no transaction publication on failure (`test_target_cell_execution.py:117`). Catalogue tests cover absent, changed-source, damaged-digest, invalid-cleanup and malformed proof; the latter two recompute the digest to exercise validation beyond hashing (`test_cell_catalog.py:96`). Positive reuse and change during the second rehash are also covered (`:128`, `:142`).
**Standalone recovery exception accepted.** `recovery.py:98` deliberately permits a cold read, but the call at `:166` precedes CAD launch at `:225` and does not run inside `native_helper.run()` or its watchdog. It still compares the complete current catalogue binding to the original transaction before proceeding. This avoids a lost-cache recovery dead end while interruption protection locks the rule editor, without reintroducing the reported native timeout composition. The new test verifies explicit cold permission before the recovery worker and the continued protection lock (`test_recovery.py:323`); the existing source/choice/proof mismatch negatives still prevent worker launch. My earlier suggestion to require cache-only mode in recovery was broader than the actual deadline defect; this reviewed exception supersedes it.
Full source hashing still consumes native time, as required for authority. This change removes the specific 120-second mutex/90-second cold-reader waits; it does not claim unlimited library size or universal runtime guarantees.
### Minor: nonexistent target-plan Cell column in instructions — ADDRESSED
`docs/user/target-cell-selection.md:11` now directs users to check the actual **本批料号规则** table. The guide also explains execution cache misses and the separate recovery preflight behavior. No new table or BOM column was introduced.
## New issues
- Critical: **0**.
- Important: **0**.
- No new actionable minor issue found in this scoped fix.
## Evidence and scope
- Reviewed the supplied seven-file `4d1b825..ec75445` diff and `final-fix-report.md`, focusing on the two original findings and new breakage. No tests rerun, CAD/LM operation, process changes, Git mutation, source edits, or subagents. Only this requested review artifact was written.
- Independently parsed `build/cell-finalfix-scoped-20261019.xml`: **177 tests, 0 failures, 0 errors, 0 skips**, suite time **75.853 seconds**. The report's **76.24 seconds** is its CLI elapsed result, not a conflicting suite count. Reviewed focused test bodies rather than relying on counts alone.
- Read the completed **pre-fix** cross-Cell acceptance `build/explicit-cell-formal-bom-20261019/report.json`, `independent-graph-verification.json`, and `desktop-observation.json`. They record two saved/reopened replacements at 267.375 seconds, actual saved Cell instances `RESC1608N_0603` replacing `RESC1005N_0402`, 55 untouched components, 103 pins, 22 nets, unchanged connectivity, source-hash equality reported, no owned CAD foreground/input-desktop takeover, and released owned processes/desktop. These artifacts support actual cross-Cell behavior but are not evidence that the new cache-only execution path has completed its current live acceptance. The source-hash equality here is the inspected report's assertion, not a fresh full source-file rehash by this reviewer.
- The post-fix warmed-rule-read/BOM run under `ec75445` remains root-owned and was reported running at review time. I did not inspect its incomplete artifacts or certify its outcome. Existing performance limitations, broader-suite qualifications, and no-package/no-release scope remain unchanged.
## Assessment
**Scoped fixwave: Approved.** Both original findings are addressed; no new Critical or Important issue was found. The native deadline fix preserves source authority and failure-before-submit behavior while the recovery exception stays outside that deadline. Root should collect the running post-fix live acceptance before the final whole-feature completion claim.
@@ -0,0 +1,47 @@
# Optional Cell release review — 2026-10-19
## Scope
- Reviewed commit range `81a8547..d12478e` against the requirement that target Cell is optional.
- Read the changed source, documentation, and tests, plus the surrounding command, snapshot, native transaction, restoration, saved-file verification, recovery, and BOM code.
- Confirmed the inspected production files match `d12478e`. Unrelated working-tree test harness cleanup was excluded.
- No tests, CAD sessions, original CAD/library writes, source edits, or Git mutations were performed. This report is the only review output written.
## Strengths
- Native execution treats an absent `L` record as no selection and skips both catalog checks. It retains ordinary native part identity validation and transaction evidence.
- VBS treats both an absent command field and an empty command field as no selection. `QPSetTargetCell` and `QPVerifyTargetCell` return before accessing the component in that case. Generic instance restoration is restricted to Comment, Notes, and user attributes, so it does not restore an old Cell Name instance value.
- Mixed optional/explicit queues retain their complete original command rows when publishing the current command. Cell values remain part of queue-to-input comparison, including per-row comparisons, so swapping selections invalidates the queue.
- Optional snapshots omit `L`; present `L` records still require exactly one nonempty, valid selection. Empty, duplicate, and extra-field records remain errors in the VBS reader and Python selection parser.
- Explicit selections retain exact project library/catalog authority, the final catalog check before native submission, partition binding, the explicit instance write and immediate readback, and verification after restoration and saved-file reopening.
- Recovery binds queue selection, snapshot hash, project/sheet/rule/source identities, and transaction evidence before launching the worker. Unselected snapshots reject added Cell evidence and skip catalog preflight. Explicit selections retain the original complete catalog comparison and active-library check. Protection is cleared only after correlated recovery success and unchanged original evidence checks.
- The default BOM header remains the existing 11 columns, with no Cell column.
## Issues
### Critical
None found.
### Important
None found.
### Minor
None raised within this release review scope.
## Validation evidence
Read the existing XML summaries without executing tests:
| Evidence | Tests | Failures | Errors | Skipped |
| --- | ---: | ---: | ---: | ---: |
| `build/optional-cell-green-20261019.xml` | 73 | 0 | 0 | 0 |
| `build/release-safety-fixes-20261019.xml` | 109 | 0 | 0 | 0 |
The reviewed test changes cover optional execution reaching native submission without catalog reads, empty/missing VBS selection no-ops, mixed queue binding, malformed `L` records, rejecting unexpected Cell transaction evidence, and optional recovery preserving protection until worker verification. Existing explicit-selection tests retain authority, write/readback, and catalog-drift checks.
## Assessment
**Approved for the reviewed scope.** No Critical or Important findings. The change makes selection optional while preserving explicit-selection authority and verification. This is a static code review supported by the supplied test reports; live CAD behavior was not exercised.
+47
View File
@@ -0,0 +1,47 @@
# V1.1.3 final artifact review — 2026-10-19
## Verdict
**Approved for the reviewed V1.1.3 local release artifacts. No remaining Critical or Important findings and no artifact blocker to the authorized draft-upload, download-hash verification, then publication sequence.** Existing V1.1.2 release assets remain outside this update.
This is a read-only artifact/evidence review, not a claim that publication has already happened or that the application works on every machine. No CAD, tests, Git changes, application launches, remote writes, uploads, or publication were performed. This report is the only output written.
## Identity and files
- Source code commit recorded consistently: `95c7f9b775af2f7f220c349f897144cf745027b4`.
- Version is consistently 1.1.3, with Windows FileVersion 1.1.3.0. The runtime screenshot shows the V1.1.3 title and intended application icon.
- Actual ZIP SHA-256: `f1fe7d7f2eb8fe83928f0fa7a3ab59638032b05bc66f89c92c00dd428ccf3fcd`.
- Actual extracted EXE SHA-256: `12e299042dd5ecd5d7bd02cf4dd80f72b31a425c5e1702a2f717999fb132a05e`.
- All **233 program-file hashes** in the outer release manifest match the final extracted package. The runtime icon exists at the corrected package resource path. No extracted application `data` directory is included.
- The ZIP contains **256 files**, is **58,119,736 bytes**, and has no matching task-data/database/log/project-backup paths in the inspected entry names.
- `docs/releases/v1.1.3-build.json` and `dist/release-manifest-1.1.3.json` are identical. Their recorded artifact identity agrees with the build notes and icon verification.
## Actual five upload paths
The publication script was inspected without executing it. Its file list uses:
1. `dist/DxPartReplace-1.1.3.zip`
2. `dist/SHA256SUMS-1.1.3.txt`
3. `dist/release-1.1.3/BOM-template.xlsx`
4. `dist/window-tutorial-1.1.3.gif`
5. `dist/release-manifest-1.1.3.json`
The listed ZIP, manifest, GIF, and **new versioned BOM path** match the checksum file. The checksum file itself is the fifth verified local artifact by presence/readability; remote download verification remains the next release step.
The initial BOM discrepancy reported during review was a reviewer path-selection mistake: `dist/BOM-template.xlsx` is intentionally retained historical material and is **not** the V1.1.3 upload source. The actual new path, final extracted template, and ZIP entry `DxPartReplace/BOM-template.xlsx` all hash to `877c9164e5230219a43c4c3df0b204be7fa08419e95080ffe782fbb8311761a8`. That finding is withdrawn; no attachment or checksum rewrite is required.
## Icon and build evidence
- `build/release-113-build-final.log` records **701 passed, 1 warning, 101.11 seconds**, followed by a successful PyInstaller build. The warning is the previously known pywinauto STA fallback message.
- `icon-verification.json` identifies the final extracted EXE, reports success, FileVersion 1.1.3.0, and all ten embedded sizes from 16 through 256 pixels.
- Actual window icons returned 20- and 40-pixel images. Both match the source icon with maximum RGB difference 1, and the process exited normally with code 0. These results close the earlier frozen entry-script resource-path issue.
- `icon-recording/frame-000.png` was viewed read-only and is consistent with the reported V1.1.3 title and icon.
## Business scope and packaging assertions
- The final manifest records **78 business compiled-code comparisons all true** against accepted commit `e6ec267a26efedbab796207b8044533d02222350`, plus equality of both packaged VBS runtimes. The intended changed product modules are application identity initialization and version metadata. No new CAD behavior is claimed for the icon release.
- The record explicitly states that native replacement was not rerun for this icon-only rebuild. The existing two-project live CAD/independent readback acceptance is referenced accurately rather than presented as a fresh V1.1.3 CAD run.
- The template has 11 header cells and two worksheet rows; all data cells after the header are empty. Replacing the old `max_row == 1` assertion with a semantic empty-data check is justified by the valid styled blank editing row. The earlier staging directory remains present.
- The GIF checksum matches the release record, and the ZIP README explicitly identifies the recording as V1.1.2 with V1.1.3-applicable steps. It is not represented as a new recording.
The proposed separate V1.1.3 tag/assets and unchanged V1.1.2 assets are consistent with the documented scope. Main-branch/tag remote state and downloaded remote attachment bytes have not been checked by this reviewer; the coordinator should complete the already authorized publication sequence and its hash checks.
+36
View File
@@ -0,0 +1,36 @@
# V1.1.3 icon and packaging review — 2026-10-19
## Scope and verdict
Read-only review of application identity setup, icon assets/generator, package data, PyInstaller icon/data/version settings, Windows version resource, and the targeted test adjustments. No tests, CAD, Git commands, source edits, or release operations were performed. This report is the only output written.
**Approved for the final reviewed source/packaging design. No remaining Critical or Important findings.** The frozen-resource path issue identified during review is corrected. Final build and frozen runtime verification remain release prerequisites. The review does not invalidate the existing v1.1.2 artifact or authorize overwriting its attachments; v1.1.3 is a separate release scope.
## Resolved Important finding
### Resolve the runtime icon from a package module, not the frozen entry script directory
**Location:** `src/dx_productivity/trial_task_center/application.py:43`.
The initial `configure_application_identity` constructed `Path(__file__).parent / 'assets/app.ico'`. That works from the source package directory, but the spec supplies `application.py` as the executable's PYSOURCE entry script. PyInstaller's entry-script location differs from the data destination `_internal/dx_productivity/trial_task_center/assets/app.ico`.
That mismatch could leave a correct EXE/Explorer icon while the application/window QIcon is null. The final reviewed code now imports `dx_productivity.trial_task_center` and resolves the asset from that package module's `__file__`, matching both source and frozen package layouts.
The new regression replaces the entry module's `__file__` with a relocated script path and checks a non-null application icon and decoded 32-pixel pixmap. The retained red report records 1 failure; the green report records 9 passing application checks. Actual frozen icon/version inspection is still needed for the final artifact.
## Other reviewed behavior
- The application AppID is stable and excludes the release version: `DxProductivity.DxPartReplace`. GUI application name/version/icon setup occurs after QApplication construction and before top-level window creation.
- Native helper, private CAD action, Cell catalog worker, and SceneOS CLI branches still return before GUI construction and identity setup. The added top-level QIcon import does not itself construct a GUI application.
- The packaged EXE icon points directly to the source ICO. The data destination matches the package-data hierarchy. Wheel/source package-data patterns include ICO, PNG, and SVG.
- `VERSION`, project package version, and Windows ProductVersion are 1.1.3. Windows fixed versions and FileVersion consistently use 1.1.3.0. Product/Internal/OriginalFilename strings are consistent with DxPartReplace.exe.
- The editable SVG is a self-contained vector asset with no external references. The generator validates it, renders a transparent 512-pixel PNG, and creates a multi-size ICO. A read-only binary directory inspection confirms ten ICO sizes: 16, 20, 24, 32, 40, 48, 64, 96, 128, and 256 pixels. The icon assets exist and are nonempty. The coordinator supplied visual inspection; this reviewer did not rerender them.
- Comparing current source files to the final v1.1.2 candidate's 101-file source manifest identifies only `application.py` and `version.py` as changed existing product modules. No replacement, Cell authority, CAD mutation, recovery, or persistence module change was found in that comparison.
## Tests and build evidence
`build/release-113-bootstrap.xml` records 14 tests, 0 failures, 0 errors. The two fake-Qt startup tests isolate identity configuration without removing the original logging/startup/smoke-close assertions. The project-task UI version assertion now follows `VERSION`; its editing/gating/persistence checks remain intact. `release-113-icon-path-red.xml` records 1 failure and `release-113-icon-path-green.xml` records 9 passes, with no errors.
The initial full `release-113-build.log` records 699 passes and one failure in the fake-Qt startup recovery test. Its application log identifies `AttributeError: 'Application' object has no attribute 'setApplicationName'`, rather than a recovery assertion failure. The final reviewed recovery test now isolates identity configuration while preserving the paused/failed recovery states, before/after event phases, and diagnostic-log assertions. The replacement full build is recorded separately in `release-113-build-final.log` and was still progressing when inspected. No final build or frozen runtime success is claimed here. Existing preceding-candidate TOCs were not used as v1.1.3 resource evidence.
Retain the new versioned release identity and verify the newly built EXE's embedded icon/version plus its running window icon before publishing v1.1.3. Business behavior remains outside this icon-only change. The user has authorized packaging/publication; this review itself performs no publication and adds no confirmation requirement.
@@ -0,0 +1,45 @@
# Final acceptance tools review — 2026-10-19
## Scope and verdict
Reviewed the current uncommitted `tools/accept_packaged_ui.py`, `tools/probe_packaged_upgrade.py`, and `tests/integration/test_packaged_acceptance_guards.py`. Includes the final exact-entry-key assertion and its two malformed-checkpoint regression cases added during review.
**Approved for the reviewed tooling scope. No Critical or Important findings; no remaining Minor finding.** This does not approve the still-pending real execution acceptance in the corrected fixture root.
Review was read-only except for writing this report. No tests, CAD, application/process operations, product edits, or Git mutations were performed.
## Execution completion checks
- The driver snapshots existing queue filenames immediately before clicking the execution confirmation. Only newly created queue checkpoints are considered, and their ordered `task_ids` must match the tasks read in execution order.
- Durable `failed`, `blocked`, or `skipped` entries now raise an acceptance failure even when the legacy database task status remains `running` or `ready`. The tool neither retries native execution nor rewrites checkpoints.
- Success requires exactly one matching new queue, nonempty task states, all database tasks completed, and all queue entries completed. The final `set(entries) == set(queue['task_ids'])` assertion rejects missing, empty, or foreign task entries before completion is evaluated. This addresses the initially identified nonblocking vacuous-completion case.
- Old queue failures are excluded using the pre-confirmation filename snapshot. Missing/running checkpoints cannot produce success. The surrounding execute stage still requires real saved/readback events for both tasks and subsequent CAD observation verification.
- The product queue writer was inspected for schema/state alignment: it creates entries for every ordered task and persists safe failures as `failed`, unsafe failures as `blocked`. These are the states the new tool consumes.
## Other retained safeguards
- CLI BOM resource checks still inspect **all** inventory attempts. Uncertain/incomplete states and cleanup errors are rejected; every recorded workspace, Job/process, descendant-handle, and desktop cleanup record is checked. Successful project coverage is derived only from ready rows. The earlier Important filtering defect remains fixed.
- Actual CAD sessions remain required by default for execution/independent-read observation. CLI-only BOM collection uses its separate resource proof.
- Read-only BOM continuation still requires the saved functional evidence and exact persisted target rows; it does not repeat imports or mutate plans. Previous failed evidence is retained.
- The legacy upgrade probe still verifies the old executable hash, creates/uses the real legacy fixture, backs it up to a separate destination, invokes the frozen candidate smoke migration, and compares task identities and every original rule value using strict rule-count pairing. Migrated Cell selections must be empty and the legacy source database hash unchanged.
## Evidence inspected
| Existing report | Tests | Failures | Errors |
| --- | ---: | ---: | ---: |
| `build/release-cli-resource-verifier-red-20261019.xml` | 4 | 3 | 0 |
| `build/release-cli-resource-verifier-green-20261019.xml` | 4 | 0 | 0 |
| `build/release-execution-verifier-red-20261019.xml` | 8 | 4 | 0 |
| `build/release-execution-verifier-green-20261019.xml` | 8 | 0 | 0 |
The initial four new execution cases exercise failed/blocked entries with nonfailed database task states, exclusion of an old queue failure, and the requirement for both a current completed checkpoint and completed tasks. The final malformed-checkpoint cases additionally exercise empty and foreign entry keys; their matching source guard was inspected. This reviewer did not rerun any suite.
`build/packaged-optional-acceptance-20261019/v111-upgrade-report.json` records two preserved tasks, one preserved rule, empty migrated Cell selection, candidate exit code 0, and unchanged legacy source database. Accepting one rule reflects the actual legacy fixture rather than weakening preservation checks.
## Diagnosis update and limits
Both prepared v1 project files were read directly and contain `KEY CentralLibrary "S:\mentor_lib.lmc"` at line 28. A read-only existence check of that exact library returned false. The coordinator also reports that direct native row count was zero and both MTA/STA UIA calls returned without exception. Together these support the fixture's missing library binding and provide no evidence that freezing caused the empty DxDataBook.
The earlier diagnosis report's UIA/apartment/dependency possibilities remain historical hypotheses, not confirmed product defects. The coordinator's STA diagnostic worker pipe saturation/timeout and final `clean=false` are also diagnostic-tool outcomes; they do not establish a product failure. All original failures should remain preserved alongside the corrected v2 acceptance evidence.
A corrected build-only project/library fixture and a new real execution run are still needed to establish native replacement acceptance. Neither the verifier fixes nor the successful legacy metadata upgrade substitute for that result.
@@ -0,0 +1,54 @@
# Final frozen candidate evidence review — 2026-10-19
## Verdict and scope
**Approved for this machine's reviewed frozen candidate evidence. No Critical or Important evidence-consistency findings.** This approval applies to the identified local acceptance candidate and the exercised projects/workflow. It is not a guarantee of success on every machine or every CAD project, and it does not authorize or perform a remote Release publication.
Acceptance root: `build/packaged-optional-final-20261019`.
This review read the existing artifacts and checked hashes/source consistency. No tests, CAD, acceptance steps, process operations, product changes, or Git mutations were run. This report is the only output written.
## Candidate identity
- Manifest source commit: `e6ec267a26efedbab796207b8044533d02222350`.
- Extracted EXE SHA-256, independently recomputed: `de21d56084d9adde155311c5679fd4ea2bca7b981e42cc1748fc72dbaba32c45`.
- Candidate ZIP SHA-256, independently recomputed: `aee87aa879b61164731cab9914ea5c84b22f645ef016d55c915fa256db447d7b`.
- Packaged QuickPartReplace VBS SHA-256, independently recomputed: `024b2859d10566d9df3d96f3f98a6ba6bf3b4b94dfc577e7132f0570e23cd48e`.
- All 101 source-file hashes listed in the manifest match the current source files. The manifest and compact archived evidence both record eight successful frozen-module compiled-code comparisons, including the optimized filesystem helpers and lifecycle guards.
- `ui-session.json` names the extracted EXE inside this exact final root. The manifest classifies it as a local acceptance candidate with task data excluded.
## Cross-checked workflow evidence
| Area | Evidence and consistency |
| --- | --- |
| BOM | `ui-acceptance.json` records the unchanged 11-column template, invalid import 2 passed/1 failed, corrected import 2 passed/0 failed, search preserving tasks, four saved targets, and two enabled targets. All four saved Cell selections are empty. |
| Project scope | `inputs.json`, completed-task records, native transaction paths, and independent read paths agree on the two disposable projects. Actual path string lengths are 362 and 135 characters. |
| Native execution | Both archived native reports have `ok=true`, `stage=native_replace_verified`, target Part Number `4100-CA0000-T0`, and UID `$2I2014`. Neither transaction contains `target_cell` or `cell_catalog`. |
| Durable saved result | Both archived status files contain `saved_ok/session_verified`. Each task has a matching genuine `quick_run_executed` saved event naming RV05, old/new Part Numbers, and saved/reopened readback. UI execution time is 167.0 seconds; the enclosing driver stage is 172.125 seconds, which includes stage overhead. |
| Independent attributes | `independent-report.json` records fresh private-CAD reads for both projects: RV05 is `4100-CA0000-T0`, RV11 remains `4100-CA0000-T7`, and both retain/read back Part Label and Value `0R`. The report passes. |
| Independent graph | `independent-graph-verification.json` and successful continuation output agree for both hierarchical and flat exports: 57 components, 103 pins, 22 nets, 56 untouched components, selected UID `$2I2014`, unchanged pin connections and net graph. The graph checker reads before/after ASCII files and asserts the comparisons; it does not execute replacement. |
| UI completion | Result accessibility cells show RV05, the intended old/new Part Numbers, and saved/readback status. Log dialog reopening and new-round reset both pass. Two referenced archived plan files exist, and saved native/status evidence remains inside those round archives. |
| Real legacy upgrade | `v111-upgrade-report.json` and `upgrade.log` agree: two tasks and one actual legacy rule preserved, candidate exit 0, empty migrated Cell selection, unchanged legacy source database. |
| Source integrity | The three roots in `source-integrity-before.json` contain 473, 474, and 86 tracked hashes, totaling 1,033. `source-integrity-after.json` and `final-acceptance.json` record no changed files. This review checked those evidence totals; it did not regenerate the full external engineering/library hash inventory. |
| GUI closure | `final-acceptance.json` and the compact archived evidence both record `gui_exit_confirmed=true`. This review did not query or alter live processes. |
## Resource and desktop evidence
- BOM observation: 90 samples and 90 successful file reads, unchanged `Default` input desktop, no observer errors or owned foreground/input-desktop CAD. Zero CAD sessions is consistent with the two native CLI inventory records.
- Both CLI inventory records are ready, source hashes unchanged, workspaces deleted, desktops released, and cleanup errors empty. Every recorded process has zero active Job processes, exit code 0, closed process/Job handles, no unconfirmed descendant handles, and no errors.
- Execution observation: 777/777 successful samples, two released CAD sessions, both process exits confirmed, both desktops absent, no observer errors or owned CAD stealing the foreground/input desktop.
- Independent-read observation: 318/318 successful samples. It includes the two earlier released execution sessions plus two fresh read sessions; all four are released/exited with desktops absent. The cumulative count is consistent with the observer scanning retained session evidence, rather than four new independent readers.
## Preserved failures and continuation
`final-acceptance.json` intentionally retains the initial graph stage exit code 1. `graph.log` confirms a driver import failure: the relocated graph script could not find `compare_speed_graphs`. The next step is explicitly named `graph-readonly-continuation`, exits 0, and produces the matching graph report. The continuation reason is retained in both final and compact evidence. The recorded steps contain one BOM execution stage and one replacement execution stage; the correction reruns only graph verification and does not conceal or repeat those mutations.
The older `packaged-optional-acceptance-20261019` failed fixture root and `packaged-optional-acceptance-20261019-v2` successful root remain present. Their outcomes are separate from this final candidate. Earlier zero-row results with an unresolved `S:\mentor_lib.lmc` fixture binding are not treated as proof of a frozen-package defect or silently replaced by the final result.
## Build and final performance gate
- `build/release-candidate-build-freeze-20261019.log` records **700 passed, 1 warning**, then a successful PyInstaller build. The warning is pywinauto reverting to STA in the named test; it is not a failed test.
- `build/release-queue-performance-frozen-final-20261019.xml` records 1 passed, 0 failures, 0 errors, 0 skipped. Its log records pytest duration 23.21 seconds.
- The final metrics file records **21.091375 seconds** for the unchanged 1,000-step simulated-worker workload with tracemalloc, 91 saved steps, and 2,222,949 peak bytes. The source still requires elapsed time below 30 seconds and unchanged completion/count/memory assertions. The compact archived evidence repeats these final metrics correctly. This is a separate source-level queue performance gate, not a claim that 1,000 real CAD replacements took that time.
The complete final-root evidence, compact archive, candidate identity, and final performance result are mutually consistent within the reviewed scope. No remote Release was published or requested by this review.
@@ -0,0 +1,34 @@
# Queue filesystem optimization review — 2026-10-19
## Verdict
**Approved for the final reviewed diff. No remaining Critical or Important findings.** The initial rotation exception-semantics issue identified during review has been corrected. The optimization retains live filesystem validation, per-step evidence, fsync, atomic command publication, and file identity checks.
Reviewed `legacy_paths.py`, `retention.py`, `logging_setup.py`, `quick_run.py`, the new filesystem-work tests, relevant existing long-path/logging/cache/retention coverage, and supplied XML/metrics artifacts. No tests, CAD, application operations, source changes, or Git mutations were performed. This report is the only output written.
## Final code review
- `_prepare_project_access` uses a local `seen` set keyed by the exact raw project-path field. Repeated commands resolve each input once within that preparation call. Different raw paths are not silently merged, and the set is discarded afterward. Strict short-path/alias identity checks and before/after-worker access validation remain. This is not a lifetime cache of filesystem trust.
- `rotate_text_log` performs one fresh `stat` for normal files. If that query raises `OSError` or `ValueError`, the exceptional branch invokes `Path.exists()` to retain pathlib's own platform-specific distinction between an absent/invalid path and a genuine filesystem error. False returns false; true re-raises the original exception; permission and other non-ignored errors from `exists` propagate. No blanket `OSError` suppression was added.
- This final exceptional branch fixes the intermediate implementation that caught only `FileNotFoundError`. On the installed Python 3.12, the former `exists()` also treated ENOTDIR, EBADF, ELOOP, specific Windows path errors, and nonencodable paths as absent. Keeping the platform predicate in the cold branch avoids duplicating those rules in the application.
- `_task_directory` and `_append_log` perform a live `is_dir()` check on every call and still execute `mkdir(parents=True, exist_ok=True)` when needed. Existing directories avoid the failed-mkdir path; removed directories are recreated. File collisions, missing ancestors, and permission failures still pass through the existing filesystem operations and error paths. A race removing the directory after the check remains an error, as was already possible after the previous mkdir call.
- Task ID validation is unchanged. Existing symlink/junction handling is unchanged. Rotation's link checks, thresholds, backup ordering, and rename operations remain in place.
- The event pre/post stamps and handle identity comparison, sequence invalidation, flush/fsync, current-command atomic writer, post-worker command comparison, `batch.request` job binding, backup-state durability, executor shutdown, and every step's event remain unchanged by this diff.
## Test evidence inspected
| Artifact | Tests | Failures | Errors | Skipped |
| --- | ---: | ---: | ---: | ---: |
| `build/release-queue-filesystem-red-20261019.xml` | 3 | 3 | 0 | 0 |
| `build/release-queue-filesystem-green-20261019.xml` | 19 | 0 | 0 | 0 |
| `build/release-queue-filesystem-errors-red-20261019.xml` | 8 | 3 | 0 | 0 |
| `build/release-queue-filesystem-final-20261019.xml` | 24 | 0 | 0 | 0 |
| `build/release-queue-performance-optimized-20261019.xml` | 1 | 0 | 0 | 0 |
The new tests check distinct-input resolution counts across two preparation calls, one-stat rotation for an existing small log, avoidance of redundant mkdir, recreation after removal, original absence/error semantics, and continued permission-error propagation. Existing suites cover path redirection, event sequence cache invalidation, rotation, and canonical immediate event visibility. The artifacts were read, not rerun by this reviewer.
## Performance and release limits
The unchanged independent 1,000-step test's supplied optimized metrics record **22.5226234 seconds**, 91 saved steps, and 2,210,321 peak bytes with tracemalloc enabled. The source still requires `elapsed < 30`, `peak < 128 MiB`, complete progress, exact saved/no-match counts, and 1,000 unique calls. No gate relaxation or workload reduction was found.
The final exception correction affects the cold error branch; the measured normal-file optimization remains the single-stat path. This static review does not substitute for building the final frozen artifact with the reviewed optimization. The coordinator's completed v2 live CAD acceptance applies to the preceding artifact; any final release claim must identify the rebuilt package and its applicable verification evidence.
@@ -0,0 +1,80 @@
# Read-only queue performance review — 2026-10-19
## Conclusion
There are concrete redundant filesystem operations that can be removed while retaining durable writes and identity checks. The strongest simple candidate is deduplicating project access preparation before resolving paths. Logging also repeats metadata/directory work. **The current profile does not prove these changes alone will bring the independent 40.90-second result below 30 seconds.** A measured result is required; the threshold should remain unchanged.
No source edits, tests, CAD, application operations, or Git mutations were performed. This report is the only output written.
## Evidence and interpretation
`build/release-queue-profile-20261019-v2/stress-metrics.json` records 1,000 steps, 91 saved steps, 36.731 seconds, and approximately 2.34 MB peak memory. The separate independent 40.90-second failure was supplied by the coordinator. The profiled test retains tracemalloc, so Python/path allocation reductions can matter as well as disk calls.
Selected cumulative profile costs:
| Path | Calls | Cumulative seconds | Interpretation |
| --- | ---: | ---: | --- |
| `execute_step` | 1,000 | 20.756 | Broad parent; includes child work below |
| `_write_current_command` | 1,000 | 8.341 | Predominantly required durable command publication |
| `append_task_event` | approximately 1,043 | 8.301 | Required event evidence plus repeated metadata work |
| `_io.open` | approximately 7,131 | 7.129 | Global cost; includes required files and test worker |
| `nt.stat` | approximately 14,663 | 4.375 | Global cost; some redundant calls, many identity checks |
| `nt.fsync` | approximately 2,063 | 3.939 | Required durability; retain |
| `_prepare_project_access` | 1 | 2.654 | Repeats project resolution across command rows |
| `nt.replace` | approximately 1,020 | 2.005 | Atomic publication; retain |
These costs overlap and must not be added. In particular, `BatchBackupCoordinator.__exit__/shutdown/join` appears as about 33 seconds, overlapping the queue/worker-thread work in this profile. It is not evidence of an additional exclusive 33-second cleanup operation. The test stubs the actual backup copy; removing `shutdown(wait=True)` would weaken cleanup rather than establish a performance fix.
## Ranked optimization candidates
### 1. Deduplicate project paths before expensive access preparation
**Location:** `legacy_paths.py:107`, `_prepare_project_access`.
The helper reads all command rows and executes `Path(value).resolve(strict=False)` before testing whether that project's access pair was already produced. This test has 1,000 commands but only 20 project paths. For ordinary short paths, no access row is produced at all, so the existing `pair not in rows` guard never helps.
Use an invocation-local set of raw project-path field values and process each distinct value once before resolution, file queries, short-path lookup, or alias creation. Keep the access pair output unique and retain strict alias-to-project identity validation. Do not cache across invocations or remove `validate_project_access` before/after workers.
**Expected effect:** expensive project preparation falls from 1,000 to 20 evaluations in this workload. The profile assigns 2.654 seconds to the entire helper, which bounds the available saving; it cannot recover the whole regression alone.
**Verification:** repeated command rows should produce the identical access manifest, with resolution/short-path calls scaling with distinct project strings. Existing long-path/redirected-entry tests must still pass. Per-worker identity checks must still reject an alias changed after preparation.
### 2. Replace existing-log `exists()` plus `stat()` with one fresh metadata read
**Location:** `retention.py:29`, `rotate_text_log`.
For each normal existing log, `path.exists()` performs a stat, immediately followed by `path.stat().st_size`. One fresh stat can answer both existence and size. Preserve the missing-file behavior and error handling deliberately, and retain all link checks and backup rename checks when rotation is needed.
This removes one filesystem metadata call per rotation check without changing log bytes, event count, flush/fsync, sequence calculation, rotation threshold, or atomic operations. It also benefits callers beyond the event log.
**Verification:** missing log, existing below-threshold log, rotation, linked logs/backups, and filesystem error behavior. Instrument metadata calls for the below-threshold existing-file case; it should use one query rather than two. Do not replace live checks with a permanently cached file size.
### 3. Avoid failed mkdir calls for already-existing log directories
**Locations:** `logging_setup.py:225` (`_task_directory`) and `quick_run.py:1082` (`_append_log`).
Both call `mkdir(parents=True, exist_ok=True)` on every append. On an existing Windows directory, pathlib attempts mkdir, catches the existing-directory error, and checks whether the path is a directory. A fresh `is_dir()` fast path can avoid that failed mkdir call; create the directory with the existing code only when the check is false. Keep task-ID validation on every call.
This retains a live directory check and recovery after directory deletion rather than trusting an unvalidated lifetime cache. It is a small optimization with uncertain timing benefit, not a guaranteed multi-second saving.
**Verification:** existing directory, removed directory recreated on next append, non-directory collision, invalid task IDs, permission failures, and concurrent first append. Event contents, sequences, immediate readability, and fsync count must remain unchanged.
### 4. Cache pure command/session path construction, not filesystem trust
`execute_step` repeatedly constructs the same `batch.request`, `current-command.tsv`, `current-state.tsv`, and related parent paths. A session can retain immutable Path/string values established at startup while still performing every live file stamp, per-step command write, request write, and post-worker identity comparison.
The high pathlib allocation counts make this a plausible secondary saving under tracemalloc, but the profile does not isolate its exclusive cost. Prefer the first three candidates before adding session fields. Never cache a stamp as proof that a file remains unchanged.
## Work that should remain
- The pre-append event path stamp, post-fsync handle stat, and final path stamp serve different purposes. The final path-vs-handle comparison explicitly accounts for Windows ctime semantics and binds the sequence cache to the file actually written. Do not remove it as an apparent duplicate. External append/replacement and rotation must continue invalidating the cache (`test_event_append_cache.py`).
- `current-command.tsv` contains a different confirmed job on each step. Its fsync plus atomic replace and the post-worker stamp comparison are not redundant with the full queue or status file. Preserve deletion/change detection.
- `batch.request` binds the worker's batch mode to the expected job ID; VBS reads and compares it. The write is not shown to be useless merely because the command line also contains a job ID. Skipping it would be a protocol change requiring separate evidence, not the safe first optimization.
- Keep every `quick_run_executed` event and its timing/state/identity fields, event fsync, uncertain markers, backup state publication, atomic queue commit, and executor cleanup boundary.
- Do not disable tracemalloc, reduce the simulated queue, skip saved steps, falsify statuses, move required work outside the measured operation, or loosen the 30-second gate.
## Suggested validation sequence
Implement one candidate at a time only after the active real acceptance run is finished. First verify semantic guards and call-count reduction, then rerun the unchanged independent 1,000-item test in the same environment. Once correctness checks pass, measure the isolated performance gate and retain the raw metrics. Use a new profile only if the gate still fails or the result leaves the bottleneck uncertain; use per-thread wall spans/counters for backup overlap rather than subtracting the 33-second shutdown attribution.
There is a defensible low-risk optimization direction, but no evidence-backed complete solution to the 10.90-second deficit yet.
@@ -0,0 +1,64 @@
# Release test migration review — 2026-10-19
## Scope and method
Reviewed the current working-tree migration of `tests/ui`, the VBS harness changes in `tests/v1_1/test_accuracy_vbs_guards.py`, and the execution lease expectation in `tests/trial_task_center/test_permanent_delete.py`. Compared removed assertions with current production behavior and the existing current UI tests named in the review request. Also inspected related query-cancellation, replacement-log, and Value-policy coverage where relevant.
No tests or CAD were run. No source files or Git state were changed. This report is the only output written for this review.
## Assessment
**Approved with one nonblocking coverage recommendation. No Critical or Important findings.** The migration mostly replaces obsolete UI contracts and synchronous assumptions with current project-task behavior. Passing counts alone were not used as evidence of equivalent coverage.
The review reflects the final current contents, including the retained three-case `test_unresolved_queue_evidence_is_retained_after_task_purge`. An earlier intermediate diff omitted that test; it is present in the reviewed result.
## Safety and behavior mapping
| Original intent | Current evidence | Review |
| --- | --- | --- |
| Confirm before replacement; cancellation dispatches nothing | Migrated workflow parameterizes accept/decline and checks worker calls plus completion | Preserved |
| Do not execute a stale Value policy | Migrated workflow tests both Value policy directions and requires zero worker calls; backend Value tests retain expected-item binding | Preserved with the current fail-closed behavior |
| A no-match job completes as a skip | Migrated workflow checks queue completion, no-match count, and new-round availability | Preserved |
| Mapping enablement changes persisted rules and execution gates | Migrated model-based toggle test checks persistence and disabled execution | Preserved without removed cell widgets |
| Navigation and worker ownership are safe | Migrated tests cover mutation navigation lock and execution browsing; current responsiveness tests cover stale task/log results, execution completion after switching, and owner naming | Preserved for supported UI paths |
| Closing cannot abandon execution or cleanup | Migrated close test requires boundary pause and ignored close; remediation/lifecycle tests retain cleanup waiting, cancellation, and unsaved-plan protection | Preserved |
| Interrupted work offers recovery and cannot be repeated after declining recovery | Migrated shell test retains recovery visibility, disabled execution, unchanged lock, and zero worker calls | Preserved |
| Permanent deletion requires explicit confirmation and rechecks state | Migrated recycle tests check default No, decline/accept, and concurrent restore; backend retains confirmation, deleted-state, rollback, evidence-retention, and project-file checks | Preserved |
| Permanent deletion cannot overlap execution | Replacement lease test checks `quick_run_busy`, unchanged task/rules while leased, then success after release | Strengthened to match the current service gate |
| Readable operator errors and logs | Migrated tests retain reason/error ID and formatting; current responsiveness/replacement-log tests retain task separation, saved-vs-unverified distinctions, and completed-task reopen behavior | Preserved |
| Current layout and policy controls remain usable | Migrated tests cover task-local Value policy, custom Value/NC, optional Cell, current splitters/log dialog, and column persistence; workspace tests cover narrow-window plan visibility | Preserved for the current layout |
## Justified removals
- Multi-project table selection, scan, filtering, per-project skip/retry, and manual capture controls are absent from the current one-project task shell. Current project-task tests explicitly require several of these old controls to be absent and exercise directory selection and target-plan editing instead.
- Backup override controls and `_continue_without_backup` no longer exist in the current UI. Removing tests for their dispatch does not weaken the current UI contract. Backend backup failure and explicit override behavior have separate tests.
- Old tests that dispatch overlapping mutation workers to test shared-button generations do not match current `_run_async`, which rejects another mutation while `_workers` is nonempty. Current mutation navigation locking and asynchronous query ownership tests target the supported concurrency model.
- Old imports of formatting helpers from `main_window` were moved to their actual owner, `ui.messages`. The formatting assertions remain intact.
- The VBS harness changes add the real `QPTargetCell`/`QPDecode` routines now required by the extracted production routines. They do not replace production logic with stubs, relax expectations, add skips, or suppress errors.
## Findings
### Critical
None.
### Important
None.
### Minor — retain a mutation-worker destruction regression when convenient
The removed `test_worker_completion_does_not_touch_widgets_after_window_destruction` checked forced `deleteLater()` while a mutation worker was blocked. The migrated workflow close test (`tests/ui/test_trial_task_center_workflow.py:63`) covers an ordinary close request that is refused until completion. `test_deleted_receiver_does_not_receive_worker_completion` in the query-cancellation suite protects `LatestQuery`, a different implementation from the main window's `ServiceWorker` callbacks.
An adapted test using a current control would retain this defensive lifecycle coverage. This is nonblocking because current ordinary close handling explicitly waits for workers; the migration preserves that supported user path. No production failure was executed or claimed during this read-only review.
## Supplied execution evidence
Read the XML summaries without running tests:
| Report | Tests | Failures | Errors | Skipped |
| --- | ---: | ---: | ---: | ---: |
| `build/release-legacy-ui-initial-20261019.xml` | 47 | 42 | 1 | 0 |
| `build/release-ui-migrated-final-20261019.xml` | 23 | 0 | 0 | 0 |
The initial report is consistent with obsolete controls/imports and asynchronous state assertions. The final 23-test report records a clean migrated UI run. Existing current UI suites were inspected as complementary coverage; their prior release-gate pass status was supplied by the coordinator and was not rerun here.
@@ -0,0 +1,28 @@
# Window lifecycle fix review — 2026-10-19
## Scope
Reviewed the current narrow `main_window.py` diff adding `shiboken6.isValid` guards to `ServiceWorker` callbacks, the parameterized forced-window-destruction regression in `tests/ui/test_trial_task_center_workflow.py`, and the surrounding worker/ordinary-close behavior. No tests, CAD, source edits, or Git mutations were performed; this report is the only output written.
## Findings
- **Critical:** None.
- **Important:** None.
- **Minor:** None raised.
## Assessment
**Approved for this narrow lifecycle fix.**
The successful callback checks C++ object validity before any window/widget work. The failed callback returns before `_finish_run`, error display, or other widget access when the window is destroyed or closed. The finished callback always removes its worker from the Python set, then checks validity before touching the plan panel, close timer, or gates. These guards address each callback path visible in the original deleted-widget failure.
For live windows, the existing generation/owner checks, error handling, plan cleanup, and pending-close scheduling remain in place. Ordinary close requests still wait for active workers and request cancellation/boundary pause. The change suppresses presentation callbacks after destruction; it does not cancel service work or release execution protection early. Service worker completion still emits its final cleanup signal through `finally`.
The new test blocks an actual `ServiceWorker`, force-deletes a separate window through Qt deferred deletion, then releases the worker. It covers both success and a raised exception. The primary fixture window remains alive, avoiding the earlier teardown misuse of a deleted fixture window. Qt event-loop exception reporting complements the assertion that the application success callback is not delivered. This restores coverage of the separate mutation-worker path identified during the migration review.
## Evidence inspected
- `build/release-ui-destruction-20261019.xml`: 1 failed test and 1 teardown error. The failure contains deleted QLabel access from `succeeded` and deleted QPushButton access from `finished`; the teardown error is separately identifiable as use of the deleted fixture window.
- `build/release-ui-lifecycle-final-20261019.xml`: 54 tests, 0 failures, 0 errors, 0 skipped. Includes both `test_destroyed_window_cannot_receive_late_worker_ui_callbacks[False]` and `[True]`.
These are existing test artifacts inspected read-only, not tests rerun by this reviewer. No live CAD behavior was exercised.
@@ -0,0 +1,28 @@
# BOM 导入状态与前置校验
本次修正针对用户反馈的“重试时仍显示上次失败”。不变更模板、不发布或覆盖 V1.1.2,不操作真实工程。
## 行为约定
- 选文件取消时保留原报告;确定文件且操作确实启动时清除本批旧报告、关闭详情,显示读表状态。
- 进度更新不得被表格摘要刷新覆盖;取消、异常必须结束等待状态,不能继续显示正在读取。
- 保留上一份有效的未保存预览和手动编辑;清除报告不等于丢弃计划。
- 先完成所有 Excel 格式、工程归属与可确定的规则冲突检查,再读取涉及工程。只从表格无法判定的位号身份仍需工程库存核验。
- 保留保存与执行前的真实工程核验,以及整批导入失败不部分暂存的约束。
## 实施与验证
1. 在 `tests/v1_1/test_ui_workspace.py` 增加延迟工作线程回归:失败报告及详情 → 重试 → 等待 → 新报告;另测选文件取消、操作取消和异常。
2. 在 `tests/v1_1/test_bom_import_report.py` 增加不启动采集的重复声明、链式映射回归,并验证不同图页的同名位号不被误拒绝。
3. `ui/project_plan.py` 按批次维护导入状态,实际启动时重置报告;`ui/main_window.py` 将工作线程终止原因交给状态清理。
4. `bom_import_report.py` 流式读取行,在工程读取前检查可确定冲突,补齐读表、库存复用、采集与匹配阶段提示。
5. 运行上述失败用例确认复现,再实现并运行 BOM、库存及相关 UI 定向回归,审查后提交并推送开发分支。
不为状态修正重复完整 CAD 验收。首次真实库存采集仍可能耗时,阶段提示不能解释为已经消除了原生 COM 启动延迟。
## 验证结果
- 先运行新增回归,得到 8 失败、1 通过:确认旧报告残留、冲突在采集后才发现,以及读表进度缺失。
- 修正后运行 `test_ui_workspace.py`、`test_bom_import_report.py`、`test_bom_batch.py`、`test_ui_remediation.py`、`test_lazy_components.py`、`test_inventory_extension.py`:79 通过(30.19 秒)。
- 再补取消与释放错误并存、实际预览保留、信号对象释放用例后,运行 `test_ui_workspace.py`、`test_bom_import_report.py`、`test_ui_remediation.py`、`test_inventory_control.py`、`test_ui_responsiveness.py`:60 通过(18.49 秒)。这些用例与前一组有交集,不累加为通过总数。
- 所有测试位于 `tests/v1_1/`,使用系统 Python 与 offscreen Qt;没有读写真实 CAD 工程。只读代理复核未发现新增阻断问题。
@@ -0,0 +1,65 @@
# Native Readonly Snapshot Implementation Plan
> **For agentic workers:** Execute this plan inline with existing user authorization; use independent requesting-code-review for the final boundaries. Steps use checkbox syntax for tracking.
**Goal:** Speed up complete unselected-state acquisition without removing any save/reopen verification.
**Architecture:** A separate VBScript adapter builds a native-host script from the existing read-only production routines. Python combines the adapter with the main worker at preparation time. Correlated, complete U/G frames are checked before capture or verification consumes them.
**Tech Stack:** Python 3.12, VBScript, installed DxDesigner 7.9.5 script host, existing private desktop supervisor.
**Spec:** ../specs/2026-10-19-native-readonly-snapshot.md
## Global Constraints
- Only owned private-desktop batches use the adapter; manual/legacy paths retain external COM.
- Keep original full fields, live pin owners, context checks, save/reopen and recovery boundaries.
- Native error or incomplete proof fails closed after dispatch; no CAD writes from the reader.
- Do not package/release, modify feedback/, or run real CAD on source projects.
## Task 1: Correlated read frame and native script adapter
Files: create integration/dxdesigner795/NativeSnapshotReader.vbs and tests/v1_1/test_native_snapshot_reader.py.
Interfaces:
- QPNativeReadUntouched(SelectedUids): dictionary with total, text, and rows keyed by unselected UID.
- QPParseNativeSnapshot(Text, Token, Project, Sheet, SelectedUids): validates NR1/header, U/G pairs, END/token/count and exact pair identity; returns the dictionary above.
- QPNativeCollect(SelectedUids, Token, Project, Sheet, Guid): freshly queries the owned view and produces the complete frame with existing QPUntouchedComponent.
- QPBuildNativeSnapshotScript(Source, SelectedUids, Token, Project, Sheet, Guid, ResultPath, StopToken, Safe): emits native bootstrap plus an explicit whitelist of original read-only routines; native QPProgress checks cancellation only.
- [x] Write literal frame tests: one zero-pin unselected component, one selected UID, total=2; expected rows["u2"] equals its original U/G pair.
```python
assert parsed_total == 2
assert parsed_uids == ['u2']
```
- [x] Run tests and observe missing adapter failure. Add negative fixtures for stale token, wrong context, truncation, duplicate UID, wrong G owner, inconsistent U/G, extra selected UID, malformed count and propagated error frame.
- [x] Implement strict parsing and script generation; collect with the same read functions and no selection/save operations. Exercise generated code using COM-shaped fakes, including cancellation and missing targets.
- [x] Run the adapter tests and commit after they pass (`2f6060d`).
## Task 2: Runtime composition and capture/verification integration
Files: modify src/dx_productivity/trial_task_center/quick_run.py, recovery.py, integration/dxdesigner795/QuickPartReplace.vbs, packaging/DxPartReplace.spec; add worker_runtime.py and focused runtime tests.
Interfaces:
- copy_worker_script(source: Path, destination: Path): copy source and append its sibling NativeSnapshotReader.vbs when present; preserve custom script compatibility and same-path no-op.
- QPUseNativeSnapshot(): true only for owned batches with a private-desktop environment and an available adapter function.
- QPTryNativeVerifyUntouched(Records) and QPCompareNativeUntouched(Records, Actual): compare complete actual rows, total and unselected UID set to existing persisted baselines. Unsupported script paths may fall back only before command dispatch; any failure after dispatch stops the step.
- [x] Reproduce a prepared default worker missing the adapter and a custom worker that must remain unchanged.
- [x] Compose all four existing source-copy callsites (prepare, begin session, resume step and recovery) through copy_worker_script; include the adapter in the frozen resource specification without building.
- [x] Route capture and QPVerifyUntouched through native reads only behind QPUseNativeSnapshot. Retain original external loops for other modes and all invalidation calls.
- [x] Run focused runtime, VBS, execution/recovery and existing accuracy tests. Correct the extracted guard fixture to include QPUseNativeSnapshot; final runs: 239 passed and 81 passed / 1 deselected. Commit tested integration (`81f3468`).
## Task 3: Independent review and real BOM acceptance
Files: add docs/reviews/2026-10-19-native-snapshot.md and sanitized docs/testing/evidence/2026-10-19-native-snapshot.json.
- [x] Request an independent read-only review of ownership gating, native function whitelist, nonce/context checks, failure propagation and exact full-baseline comparison. No Critical/Important findings; suggested gating and orchestration cases added.
- [x] Run the established default-template BOM harness on a fresh build/ copy with RV05 and RV14, recording script hashes and timings (189.250 seconds).
- [x] Compare initial snapshots with the 120-row previous baseline; independently export hier/flat and verify 55 untouched components, 103 pin connections and 22 nets, plus exact target changes.
- [x] Exercise read-only recovery on the disposable successful queue because it also calls full verification; confirm no additional replacement/save and safe release (61.062 seconds, exact before/after graph equality).
- [x] Record failed research probes and remaining release gaps honestly, update plan checkboxes, commit evidence and push. Verify remote HEAD equals local and only feedback/ remains untracked.
@@ -0,0 +1,69 @@
# Target Cell Selection Implementation Plan
> **For agentic workers:** Use superpowers:subagent-driven-development in this session; user has approved explicit rule selection and blocking when missing. Do not ask for repeated approval.
**Goal:** Bind explicit, authoritative target Cell selection to rules and verified execution.
**Architecture:** An isolated read-only library catalog supplies rule choices. Persist a target_cell string through batch defaults and per-target plans. The queue, native transaction, restore and saved readback all bind that selection; existing C/A/U/G protections remain complete.
**Tech Stack:** Python 3.12, SQLite, PySide6, installed EE 7.9.5 COM, VBScript.
**Spec:** ../specs/2026-10-19-target-cell-selection.md
## Global Constraints
- Preserve the default 11-column BOM; no inferred Cell choice.
- Keep current branch codex/bom-import-state and preserve feedback/.
- No packaging/release, no source-project/library writes, no user desktop CAD control.
- Real execution only in build/ disposable copies with owned desktops.
- Libraries must have complete PDB/Cell dependencies; failed/rebuilding copies fail closed.
## Task 1: Complete and commit native selected capture separately (root)
Files: NativeSnapshotReader.vbs, QuickPartReplace.vbs, test_native_selected_capture.py.
- [x] Reuse original QPSnapshotComponent within one correlated NR2 capture; NR1 verify stays unchanged.
- [x] Reject incomplete/foreign/duplicate selected C/A and scope drift; compare focused tests and independent review.
- [x] Complete same-source legal BOM baseline/native runs and field/graph equivalence; commit evidence separately.
## Task 2: Rule and target-plan persistence/UI (cell_rules agent)
Files: models.py, store.py, store_schema.py, service.py rule methods, batch_rules.py, target_plan.py, BOM merge code, ui/dialogs.py, ui/main_window.py, ui/mapping_table.py, relevant tests.
Interfaces: target_cell: str = ''; service.target_cell_choices(task_id, new_part_number) -> tuple[str,...] delegates cell_catalog.read_project_cell_choices; RuleRecord and target plan compilation preserve target_cell. Root owns quick_run.py, recovery.py, native_helper.py and VBS.
- [x] Write meaningful red tests for migration, batch propagation, BOM-preserved selection, selected target compilation, PN change invalidation and UI stale choices.
- [x] Implement field, editing dropdown/load action and async current-PN binding; preserve existing dialog.values() tuple for callers if practical.
- [x] Add cheap service.validate_target_cells(task_id) for GUI preflight, before CAD startup. Missing target_cell is actionable and cannot start execution from UI.
- [x] Run scoped tests, self-review and commit only owned files. Root will review and integrate.
## Task 3: Isolated authoritative catalog (cell_catalog agent)
Files: new cell_catalog.py, new cell_catalog_worker.py if needed, application.py hidden CLI dispatch, catalog tests. Do not edit service/UI/quick_run/native_helper/VBS.
Interfaces are exactly the spec's CellChoice, CellCatalog and read functions. Cache/evidence root supplied by caller. Helpers launch using the frozen EXE hidden action or source -m module; every process is owned by PrivateDesktop.
- [x] Reproduce incomplete dependency/old fingerprint/duplicate target behavior with fakes; test failures are explicit.
- [x] Implement complete shadow copy with metadata preservation, source proof, exact numeric COM enumeration and all cleanup.
- [x] Use installed IMGCLMPart.AssociatedCells; no raw DLL ABI guessing. Reuse probe findings; do not operate on originals.
- [x] Run focused tests and a tiny read-only owned-library probe if needed; commit only owned files.
## Task 4: Transport and native Cell proof (root)
Files: quick_run.py, recovery.py, native_helper.py, QuickPartReplace.vbs, execution tests.
- [x] Add target_cell queue option and separate L snapshot row; mismatch/changes cannot resume old work.
- [x] Verify current catalog and selected value before mutation; bind catalog/choice in native evidence.
- [x] Write selected Cell instance within existing restore transaction; validate full targets, untouched baseline, save/reopen and saved recovery.
- [x] Red/green tests for missing/invalid/changed choice, no broad writes and restoration failure.
## Task 5: Integrated review and real acceptance (root + independent reviewer)
- [x] Review each task against spec and quality; resolve important findings.
- [x] Run appropriate combined regressions, final GUI interaction and representative BOM/cross-cell copy execution.
- [x] Record actual timings, known research failures, mapping/graph/desktop proofs and limits; update docs.
- [x] Commit and push; verify remote HEAD and only feedback/ untracked. No release.
## Completion evidence
Implemented through ec75445; final fixwave177 focused checks passed. Final warmed rule-read/BOM/explicit0402-to0603/save/reopen/independentASCII acceptance passed in201.015s, sourceproject/library unchanged, owned resources released. All task reviews plus final scoped re-review clean. Source commit ec75445 pushed and remoteSHA verified. No packaging/release, no whole-suite or generic speed claim. See ../../testing/2026-10-19-target-cell-acceptance.md for full evidence and remaining performance/release gates.
@@ -0,0 +1,22 @@
# 批次私有桌面实施计划
用户已在会话中明确批准完整设计及实施;自动重试策略为仅修改前重试一次。基线 e15ee25,不发布安装包。
## 实施任务
- [x] T1:批次运行时。显式传递资源,惰性共用桌面/CAD;项目关闭检查点独立于批末桌面释放;持久化生命周期,资源失败阻止新批次,支持重新清理。正常退出优先,无法确认旧资源释放不重建。
- [x] T2:写前持久化。每次尝试有新的身份与代次,首个可能修改调用前 fsync 写入标记;失败禁止写入。仅当前尝试明确尚未写入且身份与只读指纹安全时允许一次重建重试。
- [x] T3:入口及界面。BOM/任务队列分别拥有一次运行时;单独操作兼容;跨任务复用 CAD,同工程多步骤继续复用。清理状态独立于已核验任务结果,提供清理入口;原模板和队列可读。
- [x] T4:验证与审查。故障注入与取消竞争、旧结果隔离、共享数量和缓存全命中;工单回放及两份真实工程副本替换/保存回读/图连接校验;独立审查并修复,分阶段 Git 提交后推送。
## 接口约定
`BatchCadRuntime(root, kind, stop_event=None)` 为上下文管理器,提供 `native_scope(evidence)`、`run_worker(command, timeout, abort_event=None, cooperative_abort=False)`;`root` 是应用数据根。原生 scope 提供桌面式 start_process/close 接口,关闭只回收该次 CLI 子进程。CAD run_worker 仅在需要时启动并保存项目关闭检查点。
监督端不保存 COM 对象,运行时通过可选 `runtime` 参数显式传递;工作进程中继续核验桌面、CAD PID/GUID 和执行标识。可调用 `guard_pending_resources(root)` 与 `cleanup_pending_resources(root)`,后者仅清理资源,不执行替换。
写前协议模块独立于 Qt/COM。每个进程尝试写入 `DXPART_ATTEMPT_FILE`,由监督端先落盘准备记录,原生写入前验证并置为 mutation_possible。标记和身份缺失不能证明安全。
## 验收约束
所有真实 CAD 写入仅对原仓库 build 下的隔离副本进行,不触碰源工程与中心库。不删除原 feedback 或历史证据,不放宽保护锁。性能按同一副本和相同输入比较,不承诺实机残留根因已治愈。
@@ -0,0 +1,20 @@
# 原生宿主只读完整快照
目标是在自有私有桌面的正式批次中,把完整未选中器件快照交给 CAD 自带 VBS 宿主执行,消除逐字段跨进程 COM 开销。替换窗口、恢复写入、逐项保存和磁盘重开协议保持原样。
只读探针已取得两轮证据:57 个器件的 114 行 U/G 完整快照与外部采集一致;连续运行也一致。批量属性接口因空格/空串差异及缺失样式字段不接入。
约束:
- 仅在已确认拥有工程的私有桌面批次启用。手动模式、旧运行时或缺少适配模块时使用原采集路径。
- 单独维护 NativeSnapshotReader.vbs;准备运行时时与主脚本合成一个可执行文件,不复制完整快照实现。原生脚本从该文件提取限定的只读函数。
- 每次调用使用独立令牌、结果路径和 CAD GUID;核对工程与图页,重新建立引脚索引,保留逐引脚归属、全部属性/样式/连接读取和上下文检查。
- 结果有版本头、令牌、工程、图页和完整结束标记。拒绝旧令牌、截断、重复 UID、U/G 不一致、未选中集合变化、丢失目标和错误总数。
- 目标 UID 只用于排除未选中集合;原生读前后核对目标集合存在。保存前及磁盘重开后均重新执行完整读取。
- 原生错误、命令失败、缺失结果、取消均不得生成成功证明;命令已发出后不静默回退。原生读取不写 CAD、不改选择、不保存。
- 宿主命令使用脚本短路径。路径含宿主不支持的字符时,仅允许在派发命令前退回完整外部读取;原始完整检查仍然执行。
- 原生宿主预定义 Vd 枚举,不重复声明;支持同一 CAD 会话连续调用。
- 取消检查使用当前监控令牌,在原有可安全中止的边界响应;外层监控和自有进程释放仍保留。
- 不打包发布;不触碰 feedback/,实机只用 build/ 下新副本。
验收使用默认 BOM 的两条正式替换,覆盖错误行拒绝、导入确认、每项保存重开、独立库存及完整层级/扁平导出、原始工程哈希与桌面释放。性能只报告实际测得的同源样例,不承诺普遍倍数。
@@ -0,0 +1,41 @@
# 料号规则的显式目标封装
用户已选择:在料号规则里选择目标封装,未选择时阻止执行。保留一工程一任务、同批规则共享及默认 11 列 BOM,不修改 BOM 模板。
## 数据及界面
- RuleRecord 与目标计划行增加 target_cell: str,默认空;数据库兼容旧数据。旧规则不会自动猜一个封装。
- 规则编辑器增加目标封装下拉及读取按钮,候选异步读取、明确加载/失败/就绪状态。新料号变化时清空旧选择;过时的读取结果不能覆盖当前料号。空选择可保存草稿,正式执行必须有合法选择。
- target_cell 存原生 Cell Name,保持大小写。候选来自目标料号的真实关联,不从 Part Name 字符串推断。跨分区同名封装不能无声合并;若目前无法唯一确定则阻断。
- 同批传播、BOM 导入、按位号执行规则编译都保留选择;BOM 原有列不变。新料号被修改而无同一映射默认值时清空旧选择。
## 权威来源
本机 LibraryManager.tlb 公开 IMGCLMPart.AssociatedCells。读取必须在自有私有桌面和库副本中执行;原库不启动编辑、不被重写。
读取副本必须含 LMC、配套 cfg/prp、PDB 和 CellDB 依赖,保持原时间戳,核对复制前后指纹。缺少物理 CellDB 时 AssociatedCells 会静默返回空,不能将不完整副本的空集合视为权威。自动迁移/重建分区对话框、超时或缺依赖均失败,不点确认后猜结果。
接口模块 cell_catalog.py:
- CellChoice(partition: str, name: str)。
- CellCatalog(library_path: Path, part_partition: str, part_number: str, cells: tuple[CellChoice,...], source_fingerprint: str, evidence_path: Path)。
- read_library_cell_catalog(library_path: Path, part_number: str, evidence_root: Path, *, partition: str | None = None, allow_cold_read: bool = True) -> CellCatalog。
- read_project_cell_choices(project_paths: tuple[Path,...], part_number: str, evidence_root: Path) -> tuple[str,...]:不同工程库的候选取交集;无法核验、无交集或同名跨分区歧义均报错。
缓存必须按源内容指纹、料号、分区绑定;执行时重新核对源,不能仅用名称缓存。读取工作通过隐藏入口 --cell-catalog-worker 分发,冻结与源码同一代码路径,不依赖外部 Python 安装。
原生 helper 的首次和提交前检查均要求 allow_cold_read=False:只有重新完整核验源指纹及证据的缓存可用,缺失、损坏或失效时阻止提交并提示回规则读取封装。冷读的互斥等待和 LM 工作不能进入原生写入的 120 秒预算。独立 Python 恢复预检在启动恢复 CAD 前运行,可以冷读副本重建缓存;仍须与原事务绑定完全一致,否则保持保护。这避免中断期间规则编辑已锁定时产生缓存丢失的恢复死路。
## 执行及恢复
- 队列记录 target_cell,并纳入队列一致性检查;快照新增独立 L 行,不改变原 M 行已有字段顺序。新任务缺选择必须在原生替换提交前停止。
- 原生 helper 从实际活动工程的 CentralLibraryPath 读取当前库关联,验证选择属于目标料号允许集合,记录完整候选、指纹及显式选择,绑定 snapshot hash/工程/图页/目标 UID。
- 仅修改已确认目标组件的 Cell Name 实例值;不清空原实例后依赖继承。不修改未选中器件,不修改原库。遵守现有恢复事务、失败关闭未保存、保存前及重开后核验,校验有效 Cell Name 等于所选值。
- saved 恢复必须核对同一封装选择及磁盘值;任何未认证的新恢复路径都不能产生成功证明。旧队列不能无声套用新的封装选择。
- 多候选不得按第一个或按名称近似自动选择。单候选也在规则中显示明确选择,空草稿阻止正式执行。
## 验证范围
字段持久化/升级、同批传播、BOM 保留、异步过时结果、未选/非法选择阻断、候选变化、事务绑定、保存重开及恢复反例。真实合法样例使用两个源料号替换为 4100-CA1020-T7,目标 RESC1005N_0402;已确认跨封装样例单独证明未选或不合法选择在写入前阻断。只有目标封装实际选择且写入/回读通过,才认证跨封装。
不打包、不发布、不修改 feedback/,实机仅 build/ 新副本。源文件哈希、私有进程和桌面释放作为证据。100% 不作为跨工程无条件承诺。
@@ -0,0 +1,29 @@
# 操作状态审查修复
基于 `2ddfd1a`,修复审查确认的五项问题,保留现有任务执行和 CAD 核验流程,不重新打包发布。
## 行为变化
1. 批次 A 失败、B 暂停后,A 的“重试失败项”准备成功会使窗口缓存的旧批次编号失效。下次顺序执行建立新批次,A 的重试会被执行;准备失败则保留原编号。旧批次检查点保持原样,继续保存当时的结果。
2. 通用工作线程通过 `ui/operation_state.py` 的不可变状态维护开始、进度、取消中、成功、已取消、失败。开始新操作立即清除旧操作反馈;成功先设置默认结果,再允许回调提供导出路径、BOM 报告或执行结果等具体反馈。
3. 普通位号采集取消后,在工作线程结束时刷新终态,防止继续显示“正在取消”。停止请求与真实异常并存时,真实异常优先。界面是否可再次操作仍取决于实际工作线程完成收尾。
4. 日志的历史/最新模式只在目标页读取成功后提交,失败保留现有正文、模式和游标,自动追加不会把历史页冒充最新页。
5. 任务读取改用 `ContextReadPhase`。读取失败显示失败状态,并将原“重新读取工程”按钮改为“重试读取任务”;重试走任务上下文查询,成功后恢复正常按钮与反馈。
BOM 的细分阶段继续由 `BomImportMachine` 维护,通用操作状态负责工作线程生命周期。数据库任务状态、批次检查点和 `LatestQuery` 轮次隔离继续各自承担原有职责。
## 回归证据
- 新增用例先在修复前复现:7 失败、1 通过;通过项验证“重试准备失败不得清除旧批次”。
- 批次与日志修复:2 项 UI 批次回归通过;日志切换、队列顺序/暂停/冻结输入检查、日志分页共 15 项通过。
- 通用状态和任务读取接入后,首轮 37 项定向回归通过。
- 另外补充“通用收尾不能覆盖导出路径”的回归,先失败后修正,确保成功回调的专用反馈得到保留。
- 最终执行以下命令:**104 passed,34.42 秒**。以上各轮有重叠,不累加计数。
```powershell
python -m pytest -q tests/v1_1/test_ui_operation_lifecycle.py tests/v1_1/test_ui_batch_retry.py tests/v1_1/test_task_log_transition.py tests/v1_1/test_bom_import_state.py tests/v1_1/test_bom_import_report.py tests/v1_1/test_bom_batch.py tests/v1_1/test_ui_remediation.py tests/v1_1/test_ui_workspace.py tests/v1_1/test_ui_responsiveness.py tests/v1_1/test_query_cancellation.py tests/v1_1/test_lazy_components.py tests/v1_1/test_log_pages.py tests/v1_1/test_task_queue.py
```
环境为系统 Python 3.12、offscreen Qt、隔离测试数据库与目录;CAD 执行使用模拟实现。未读写用户原工程或既有验收数据库。只读代理复核了批次、BOM、取消、关闭保存、日志与任务重试调用链,未发现额外缺陷。
另用真实 `TaskStore`、`TaskCenterService`、`QuickRunPreparer` 和 Qt 重试回调复放批次问题,仅替换 CAD 执行函数:初次结果为 A 失败、B 暂停;准备失败时缓存编号保留,准备成功后编号清除且 A 待执行;继续批次后调用顺序为 `A,B,A,B`,A/B 均完成,A 的待执行队列已清空,原检查点文件内容保持不变。隔离证据保存在 `build/test-temp-remediation/audit-retry-fixed-ut3cnbg8`。
@@ -0,0 +1,20 @@
# 私有桌面释放实机反馈与诊断补齐
反馈包中的程序和脚本哈希均与已发布 V1.1.2 一致。两次 BOM 导入已完成只读位号采集,工作线程记录 `finished / safe_stop=true`,随后在 `confirm_desktop_released` 的两秒枚举确认中失败,最终报 `inventory_cleanup`。反馈没有进入正式替换,未保存位号计划。
将反馈 BOM 与采集快照在隔离数据库中离线复放,得到一条通过的替换行、四个唯一位号目标、零保存记录。原反馈文件和数据保持原样。
确定的代码缺陷是 `IsolatedCadSession.__exit__` 中后发生的桌面错误会覆盖此前正常退出阶段的错误。因此现有日志无法排除“CAD 正常退出先失败”的情况,也不足以确定桌面残留的实际持有者。
本次调整仅补齐诊断:
- 按 `orderly_shutdown`、`desktop_release` 保留错误列表,最终异常包含两阶段错误。
- 保存退出 helper 与 CAD 的退出码;退出码先存内存,在既有最终记录阶段落盘,不打断正常等待。
- 保存自有进程退出码、Job 剩余进程数、后代 PID 与未确认句柄数、进程/Job 句柄关闭状态。
- 保存桌面句柄关闭结果,以及释放确认的耗时、预算、结果;超时另记调用进程、线程和线程桌面。
保持原有两秒确认预算、Job/进程退出等待和失败门禁,未将清理异常降为成功,也未删除不确定状态标记。
验证:新增错误覆盖回归先失败后通过;首轮私有边界、库存控制、发现缓存、BOM 报告共 96 项通过(16.70 秒)。调整退出码记录顺序后,私有 CAD 与桌面边界回归 38 项通过(9.57 秒),包括真实 Windows 桌面、自有短命进程和 Job 测试。未启动真实 CAD。只读复核确认诊断写入不再跳过原有 CAD 等待,两轮用例有重叠,不累加计数。
本机 Windows build 26200 上四组无 CAD 探针均正常释放,尚未复现反馈环境异常。需要补齐后的实机记录,进一步区分正常退出失败、Job 已空但仍有外部引用、以及延迟销毁;当前不宣称修复了远端桌面残留。
@@ -0,0 +1,34 @@
# 私有桌面释放的修复尝试
本次承接 [实机反馈诊断](2026-10-16-private-desktop-diagnostics.md),修改资源清理行为,未打包或发布新版本。反馈机器的桌面残留尚未在本机复现,以下改动不能作为远端根因已解决的结论。
## 修改
1. 私有 CAD 的 probe/quit helper 在 COM 反初始化前释放本地 Application 代理。此前代理保存在函数局部变量中,释放发生在 `CoUninitialize()` 之后。
2. 异常路径也清理已退出回溯帧中的局部引用,同时遍历 `__cause__` 和 `__context__`,避免 Quit 或身份校验失败时被调用帧继续持有代理。保留原异常类型、消息、堆栈位置和异常链;遍历有循环保护。
3. 桌面消失确认的最大预算从 2 秒调整为 5 秒,每次枚举确认消失后立即返回。没有固定增加正常操作耗时。超过预算仍报错,仍保留 `uncertain.flag` 和库存拒绝门禁,不终止外部占用者。
第 3 项针对短暂外部引用提供有限恢复机会,不能修复持续泄漏或未知进程的占用。实机旧日志不足以确认是否属于这种短暂引用。
## 针对性回归
- 真实 Windows 子进程持有测试桌面句柄约 3 秒后自行关闭:修改前因 2 秒上限失败,修改后确认桌面消失并成功返回;持有者进程仍运行,工具没有终止它。
- 持续占用桌面:仍在有限预算内报错;测试只在 finally 中回收自己创建的子进程,随后再次确认释放。
- 弱引用检查真实 helper 的 COM 资源顺序,覆盖正常退出、本帧拒绝退出、Quit 抛错、真实 GUID 校验拒绝、显式 cause、隐式 context。最初正常和本帧拒绝两项先失败;初次修正后另外四条异常路径先失败,再补全回溯清理。最终六项通过,并检查堆栈与异常链仍保留。
- 最终运行私有 CAD、私有桌面、库存控制、发现缓存、BOM 导入报告五组回归:**104 passed / 29.72 秒**。未重跑完整基础测试或替换验收。
## 真实 CAD 检查
修改前先运行一个不打开工程的 CAD 会话,以及一个工程副本读取会话,两者均正常释放,因此没有将它们误报为故障复现。
修改后在 QApplication 的 QThreadPool 后台线程中调用真实只读工程采集。使用既有测试工程的另一份副本,读取两个旧料号,采集到 5 个真实器件。结果:
- 整轮 56.89 秒;CAD 启动约 34.89 秒,关闭阶段约 2.45 秒。
- quit helper 和 CAD 退出码均为 0;Job 剩余进程为 0,已捕获后代退出句柄均已确认。
- 桌面消失确认在首次枚举即通过,没有消耗 5 秒宽限。
- 输入桌面前后均为 Default;受控 CAD 未成为前台,也未出现于输入桌面。
- 界面 50 毫秒定时器最大采样间隔为 94 毫秒;测试来源工程副本的前后文件哈希一致。
本地证据位于 `build/feedback-investigation-20261016/qt-reader-after-remediation/`。该真实成功路径检查发生在异常回溯补全之前;后续修改仅涉及异常处理分支,异常路径由上述最终回归验证。此次没有执行 Replace Part,没有操作用户原工程。
只读代码复核发现并促成了异常回溯持有代理的补全;最终复核未发现新的重要问题。反馈 ZIP 和 Excel 的 SHA256 与输入记录一致,原始反馈未修改,未纳入 Git。
+78
View File
@@ -0,0 +1,78 @@
# 执行准确性逐流程审查
基线:`bc36289`。目标是防止漏替换、范围外修改及未经核验的成功状态;不以测试通过率等同于所有工程上的绝对准确率。只在 `build` 工程副本做实机验证,不打包发布,不修改 `feedback/`。
审查日期:2026-10-17 至 2026-10-19。下表的“通过”仅指列出的边界和测试,不能外推为任意工程的正确性证明。
## 审查矩阵
| 流程 | 要证明的边界 | 状态 |
| --- | --- | --- |
| 目录发现与任务绑定 | 一个任务只能指向已确认的工程,批次工程列不误配 | 工程绑定和多工程回归通过 |
| BOM 读取与工程分配 | 文本料号、位号范围、重复/冲突及部分失败结果明确 | 修复数字料号静默改写;68 项 BOM 回归通过 |
| 导入预览、保存与取消 | 未确认不落地;确认时计划、工程及文件基线未变化 | 原有事务、过期预览、取消与 UI 状态回归通过 |
| 原生/CAD 位号采集 | 实例生效值、全量范围、读取异常不当作不存在 | 修复 FindAttribute/InstanceValue 异常被吞,实际不存在仍可返回空 |
| 精确位号队列 | 任务、图页、UID、旧料号、旧 Value、选项与执行输入一致 | 修复恢复写入前 UID/位号未严格核对;反例通过 |
| 原生替换 | 选中库身份、实际物料属性与原 UID 一致 | 正常、轮询和恢复统一核验选中库行;不再用位号代替丢失 UID |
| 几何、显示、Value 与 NC | 只改已授权字段,NC 与显示策略可独立验证 | 各 Value 策略、NC 和显示恢复回归通过;两项实机保存重开通过 |
| 引脚和网络 | 不用网络名称/数量相同代替逐引脚对应 | 修复遗漏 Net UID;删除仅比网络数量的降级路径;反例通过 |
| 未选中器件 | 属性、几何、样式及连接均保持原状 | 全范围新增 X/G 完整状态证据,移位/样式/网络/缺引脚反例通过 |
| 保存关闭与重开 | 磁盘读回仍等于已核验目标,不以当前值相互自洽代替预期值 | 保存前捕获已认证库字段,重开精确比对;两项实机读回通过 |
| 备份、取消、超时、恢复 | 备份有效;未核验修改阻止后续执行;恢复证据绑定当前队列 | 修复备份未校验内容与工程身份;33 项队列/备份回归通过 |
| 已完成重跑、UI 结果与释放 | 状态不能串轮次/任务;释放不确定不能报完成 | 修复工程缺失误计 completed/失败0;重跑、UI、释放回归通过 |
## 已修复的准确性缺陷
1. Excel 数值 `123` 配合 `000000` 格式显示为 `000123`,原导入会改成 `123`。旧、新料号现在只接受文本;错误注明行号。模板已有工程行和首个编辑行显式设置文本格式及自动换行,不新增 500 行空白实体。
2. 正常替换仅要求 Part Name/Part Label 非空,恢复又对字段忽略大小写。现在各生产调用均绑定选中库行,精确核验字段,`1m` 与 `1M` 不等价。
3. Python 恢复允许以同名位号替代消失 UID;VBS 手动恢复也可能按位号/位置找到另一个器件后写属性。现在在恢复写入前必须匹配原 UID 和位号。
4. FindAttribute 和 InstanceValue 的 COM 读取异常原来可能被当成属性缺失或继承值,导致漏采集/no_match。现在传播异常并停止;真正不存在或空实例值的继承语义保留。
5. 原连接校验丢弃 Net UID,且源引脚号为空时可仅按网络名数量放行,无法识别物理引脚接网互换。现在保留 UID+名称,要求逐引脚物理对应,仅允许公共平移;无法证明就拒绝。
6. 原未选中保护只有六个字段,部分全量模式还跳过保护。现在所有范围采集 U7 加 X/G 扩展,覆盖位置、方向、缩放、引脚网络、全部属性值及样式;每次验证刷新组件/引脚代理。合法零引脚注释有显式 `NO_PINS`。
7. 保存后原校验可能让错误的 Part Label 和 Value 互相“证明”。现在独立保留已核验库字段,恢复后和保存重开后精确比较。
8. 工程文件执行前消失会写 batch_skipped,却未计入失败,还可能写成“未命中”。现在失败数、任务结果及日志一致。
9. 原备份恢复只看 manifest 外壳。现在核验工程/目录身份、文件全集、大小、SHA256、读文件句柄和路径身份,拒绝 junction/链接/hardlink、缺失及额外文件。备份损坏或状态丢失后有执行证据时停止,不能用已部分修改的工程伪造“原始备份”。
## 验证记录
- 安全与 UI/队列回归:`tests/v1_1` 加 `test_verification.py`、`test_execution_safety.py`、`test_application.py`、`test_batch.py`,排除单独记录的 1000 步性能例:**594 passed / 1 deselected,138.68 秒**。
- 原生身份、等待、恢复和 VBS 联合回归:**154 passed,43.36 秒**。随后补充 UID/位号写前守门,两项均先失败;VBS/Value/原生替换三个文件最终 **122 passed,36.35 秒**。真实 `cscript` 执行与全文件 Option Explicit 编译不启动 CAD。
- BOM 专项:**68 passed,60.64 秒**;备份和任务队列专项:**33 passed,8.43 秒**。以上集合有交集,不相加声称总覆盖量。
- 原 1000 步性能测试仍未满足 `<30 秒`:隔离提取 `bc36289` 基线 **35.83 秒**,本轮 **35.72 秒**,两者在速度断言之前的队列结果断言通过,速度阈值失败,后续内存断言未执行。未修改测试阈值,不能报告全部测试通过。
- 2026-10-17 的正式队列因会话中断仅留到 `query_components`,不计为验收;进程已不存在,独立确认该私有桌面释放。2026-10-19 在新副本重跑。
- 首轮 BOM 反例遗漏外部采集拦截,误启动过一次测试私有 CAD;未进行替换/保存,进程退出后独立确认桌面释放。随后补齐严格 tripwire,错误 BOM 在外部采集前拒绝。
原始证据位于忽略目录 `build/accuracy-audit-20261017/` 和 `build/accuracy-formal-bom-20261019/`,不提交工程数据或厂商二进制。
## 兼容性与验收边界
- 没有 X/G 完整未选中证据的历史快照仍可解析,但拒绝直接认定完整自动恢复成功,需人工核验;不能为兼容旧记录放宽准确性守门。
- 更换不同符号几何、网络 UID 重建等场景可能被严格校验拒绝。这是明确失败,不能降级为只比较网络名或数量后报告成功。
- 保留 BOM 的既有合并语义:未列出的位号保留原编辑与勾选,不擅自清空整批计划。
- 本轮实机只覆盖下列明确记录的工程、器件及模式,不能代替多单元器件、复杂层级、所有工程/库版本的专项认证。取消、崩溃、损坏备份等故障主要通过隔离反例覆盖。
- 本轮不打包、不发布,不启用研究型无弹窗替换后端,不改 `feedback/`。
## 正式 BOM 实机流程
新副本 `build/accuracy-formal-bom-20261019/project/Audio_D2128.prj`:创建任务 → 导出默认 BOM → 填入两项 → 数字料号报告 1 行失败/1 行未核验且未保存 → 改为文本后两行通过,预览仍未写入 → 确认计划 → 正式队列执行 → 每项保存重开 → 独立原生读回 → 独立 ASCII 层级/扁平图对比。
| 项目 | 结果 |
| --- | --- |
| RV05 | `4100-CA0000-T7 → 4100-CA0000-T0`,Value=`0R`,原 UID 保留 |
| RV14 | `4100-CA1030-T7 → 4100-CA0000-T0`,Value=`0R/NC`,原 UID 保留 |
| 同旧料号的 RV11/RV08/RV19 | 料号、Value、UID 均保持不变 |
| 队列结果 | saved=2、failed=0、no_match=0,任务 completed |
| 独立层级和扁平对比 | 各 57 个器件、103 个引脚、22 个网络;其余 55 个器件全部导出字段相等;所有引脚接网与网络图相等 |
| 目标器件差异 | 仅 Part Number/Part Name/Part Label/Value,以及原未赋引脚号提升为库引脚号;引脚类型、宽度、网络保持不变 |
| 私有桌面 | 3659 次采样,未成为主桌面前台;主桌面保持 Default;自有 CAD 退出、桌面消失,无观察错误 |
| 源工程 | 原始 `.prj` 与 `icdb.dat` 前后 SHA256 不变;全部写入仅发生在新副本 |
| 耗时 | 两项正式队列 799.50 秒,不含模板/BOM 和独立导出 |
运行使用启动时复制的 VBS,覆盖完整未选中检查、严格网络和保存库身份核验。运行期间源码后补的两项为逐器件进度反馈、恢复写前 UID/位号守门,分别经功能回归和真实 cscript 反例验证;没有修改正在运行的副本脚本。实际保存结果的 UID/位号亦经独立读回核对一致。
## 尚未满足的发布条件
1. **完整验证耗时过高。** 当前串行多次读取全部未选中器件,57 个器件的两项替换达到 13 分 19.5 秒。阶段心跳已补齐,避免长时间没有反馈;后续应减少没有中间 CAD 写入的重复读取或改用经过验证的更快接口。不能直接删掉范围外保护来恢复速度。
后续重复步骤修复的同源工程实测已降至 **403.625 秒**,减少 **49.52%**,仍未达到建议的 180 秒目标;详见 [重复步骤扫描与修复](../reviews/2026-10-19-execution-duplicates.md)。本报告的 799.50 秒保留为该优化之前的真实基线。
2. **PCB 封装映射未获得完整证明。** 独立扁平导出中目标 Part Name 为 `RESC1608N`,而 Cell Name 仍为原来的 `RESC1005N_0402`;层级导出 Cell Name 为空。这至少说明仅核验 Part Name 不能证明最终 PCB Cell 已同步。尚未认证该值的库映射/缓存/实例继承来源,本轮未擅自清空或改写;实际 PCB 封装同步不在本次通过结论内。
3. 原 1000 步性能阈值仍失败,复杂层级、多单元、多 gate 及不同符号拓扑未完成同等实机认证。**因此本轮结论为准确性守门已显著补强、已记录样本验证通过,不是全场景 100% 或发布验收通过。**
@@ -0,0 +1,27 @@
# 目标快照原生采集验收
本次将目标器件原有 C/A 完整快照放到原生脚本宿主读取,与未选器件 U/G 通过一个关联 NR2 帧返回。保存前和重开后的 NR1 校验保持原字段。派发后的超时、截断、UID/工程/图页或旧料号/位号/Value 不一致均停止,不回退到另一次读取掩盖差异。
## 验证
- `tests/v1_1/test_native_selected_capture.py`、`test_native_snapshot_reader.py`、`test_native_worker_runtime.py`:55 项通过,16.80 秒;结果 `build/native-selected-commit-20261019.xml`。
- 先前相关回归 301 项通过、1 项因 C 盘临时文件空间不足失败;该项在 F 盘重跑通过。原失败记录保留,不将原批次标为全绿。
- 独立代码审查未发现 Critical/Important 问题。
实机全部使用 build 下的新工程副本与自有私有桌面。相同 BOM 两项:RV05 的 `4100-CA0000-T7`、RV14 的 `4100-CA1030-T7` 替换为 `4100-CA1020-T7`;保存后分别为 1K、1K/NC。该目标料号允许原实例封装 `RESC1005N_0402`。
基线使用提交 `5ad0c66` 的两份 VBS,运行时源码哈希记录于 baseline report;原生版本使用本次源码。两个版本均通过导出默认 BOM、故意填错后拒绝导入、修正导入、按位号执行、逐项保存与独立回读。
- `build/selected-capture-formal-{baseline,native}-20261019-v2/report.json`:两项均保存通过,源工程哈希不变。
- 首项快照去除工程路径所在的 M 行后,120 行完全等价。
- 层次与扁平 ASCII 图比较:57 个器件、103 个引脚、22 个网络;55 个未选器件完整状态不变,目标连接和网络不变;两个版本的最终图完全等价。
- ASCII 实例层确认 RV05、RV14 均保留合法的 `RESC1005N_0402` 实例值。层次导出的 Cell Name 基础值为空,不能仅用该层空值判断有效封装。
- 两份 desktop-observation 均确认主桌面未切换、CAD 未占前台,自有 CAD 和桌面已释放。
## 速度结论与边界
单个 RV05 的完整 7 行快照,在同一只读会话内:原生 0.109 秒、重复原生 0.110 秒、外部 COM 5.343 秒,字节内容一致。此数字只表示局部采集差异。
完整两项流程本次基线 **207.172 秒**、原生 **228.265 秒**。本次未证明端到端提速;运行期间另有隔离库研究进程,启动和环境耗时也在总数中,不据此推算速度收益。保留本次结果,不沿用旧跨封装样例的耗时作为对照。
本次合法同封装样例不认证跨封装正确性。跨封装需要规则中明确选定目标 Cell、权威库映射、显式实例赋值,以及保存前和重开后的对应校验;该功能按单独计划继续实现。
@@ -0,0 +1,78 @@
# 可选封装与候选发布验收
## 本轮要求
用户确认三项:目标封装可选;排查并清理回归失败项;从最终冻结候选 ZIP 解压后验收 BOM、替换保存、旧数据升级及后台资源释放。本轮不创建远端 Release、不覆盖 V1.1.2 附件,不修改原工程或中央库,不改未跟踪 feedback。
未指定封装时,工具不读封装目录、不主动覆写 Cell Name,可后续与中心库同步;原生 Replace Part 本身可能更新库关联属性,不承诺封装始终保持旧值。明确选择封装时继续核验完整库证据、写入并保存重开检查。
## 回归失败归因与处理
| 原失败 | 原因及处理 | 证据 |
| --- | --- | --- |
| 构建检查 3 项 VBS 保护失败 | 抽取生产函数的测试夹具漏载新增 QPTargetCell,出现 VBScript 类型不匹配;补载真实函数,保留全部原断言 | release-candidate-gate-initial-20261019.xml;release-safety-fixes-20261019.xml |
| 旧彻底删除租约检查 | 旧测试要求执行期间绕过互斥,现有安全规则禁止修改;改为锁内拒绝、关系不变、释放后正常删除 | release-delete-final-20261019.xml:8 passed;包含 3 项未决队列证据保留 |
| 旧队列功能检查 | 重新运行,无当前失败,不因历史报告改动生产队列 | release-legacy-quick-run-initial-20261019.xml:34 passed;批处理功能初跑 59 passed,另有租约及性能失败 |
| 旧 UI 导入错误和 42 项失败 | 引用了已移除导出、QTableWidget 工程链表、扫描/手动跳过/单次无备份按钮、内嵌日志、同步读取、重叠 mutation worker;迁移到当前单工程任务、QTableView、目录创建弹窗、可回收日志窗口与串行 mutation 语义 | release-legacy-ui-initial-20261019.xml;release-ui-migrated-final-20261019.xml:23 passed |
| 销毁窗口后后台回调 | 补回销毁测试后发现真实缺陷:success/failed/finished 闭包访问已删除控件;增加 QObject 有效性检查,结束时仍移除 worker,禁止触碰已删除控件 | release-ui-destruction-20261019.xml 为失败记录;release-ui-lifecycle-final-20261019.xml:54 passed,含成功/失败两个销毁场景 |
| 初次构建无法收集 XLSX 测试 | 仓库 .venv 缺 openpyxl,构建安全停止;后续明确使用依赖齐全的安装版 Python 3.12,不跳过构建检查 | release-candidate-build-20261019.log 保留失败;后续构建另存日志 |
以上检查范围有重叠,不相加当独立总数。旧 UI 的 47 个用例没有被称为全部修复后逐项通过:已移除界面不再保留对应布局断言,仍有效的功能和安全意图迁移到当前 UI;新的 tests/ui 共 25 项(23 项加两个销毁分支)。没有 skip、xfail、放宽性能阈值或删掉有效证据保留检查来制造通过。
## UI 迁移覆盖对照
| 原意图 | 当前检查位置 |
| --- | --- |
| 读取/选择工程与位号、BOM 原地编辑 | tests/v1_1/test_project_task_ui.py;test_ui_workspace.py |
| 搜索、排序、回收站和确认删除 | tests/v1_1/test_ui_remediation.py;tests/ui/test_permanent_delete_ui.py |
| 确认前不执行、未命中完成、Value 策略变化停止旧确认 | tests/ui/test_trial_task_center_workflow.py |
| 规则勾选持久化、任务 Value 独立 | tests/ui/test_trial_task_center_workflow.py;test_value_options_layout.py |
| 已完成任务状态、重试、重复执行新轮次 | tests/v1_1/test_ui_batch_retry.py;test_new_round.py |
| 任务切换丢弃旧查询、执行期间只读浏览、归属不丢失 | tests/v1_1/test_ui_responsiveness.py |
| 常规 mutation 禁止重入,退出等待安全收尾,强制销毁回调 | tests/ui/test_trial_task_center_workflow.py;tests/v1_1/test_ui_remediation.py |
| 错误编号及日志格式、按需创建/关闭/重新打开日志 | tests/ui/test_execution_feedback.py;tests/v1_1/test_lazy_components.py;test_execution_results_view.py |
| 小窗口和布局持久化 | tests/ui/test_value_options_layout.py;tests/v1_1/test_ui_workspace.py |
## 验收进度
源码修复与相关回归已完成。最终构建检查 692 passed;UI 生命周期相关 54 passed;队列与恢复相关 122 passed(千步性能单独执行)。这些检查范围存在重叠,不合并计数。
冻结候选 e2f76c3 的 BOM 实际操作已通过:两工程导出原 11 列模板,错误清单报告通过 2 / 失败 1,修正后报告通过 2 / 失败 0;确认保存后只有 RV05 启用,RV11 保留。两工程原生 CLI 采集与私有桌面清理有独立记录。真实 1.1.1 数据升级保留 2 个任务、1 条规则,未选封装迁移为空,原数据库哈希不变。
首次冻结替换在 DxDataBook 读取目标行时超时,两份副本均关闭未保存,未提交原生替换。后续只读 MTA/STA 探针未发现 UIA 异常,原生列表计数确为 0。检查发现验收夹具仍引用不存在的 S:\\mentor_lib.lmc,属于副本准备漏重绑定;不能据此认定冻结 UIA 接口失效。保留首次失败及诊断证据,另建 v2 副本并复制独立中央库后重验。STA 诊断脚本还出现大输出阻塞管道而超时,最终 Job 与桌面已释放;此记录不计为产品验收通过。
验收工具同步补齐:BOM 检查所有 CLI 尝试的资源清理,不能被后续成功记录掩盖;执行阶段读取本次新队列检查点,遇 failed/blocked/skipped 立即失败,不能只等待可能保留 RUNNING 的任务状态。相关反例先失败、修复后 10 passed;未修改产品任务状态语义。
修正夹具后的 v2 冻结验收通过:两工程(路径 370 / 143 字符)均完成替换及保存重开核验,执行总耗时 278.312 秒。独立新 CAD 回读证实 RV05 改为新料号、Part Label 与 Value 为 0R,RV11 料号与 Value 未变。层次与展开网络均比对 57 个器件、103 个引脚、22 个网络,除目标属性外其余 56 个器件、引脚与网络连接不变。日志窗口和新一轮检查通过;1221 次执行观察中主桌面未切换、文件均可读,自有 CAD 未出现在主桌面,进程及私有桌面已释放。原工程与中央库跟踪的 1033 个文件哈希均未变。完整证据在 build/packaged-optional-acceptance-20261019-v2。
独立千步模拟初测 40.90267 秒,未通过小于 30 秒的原门槛。审查确认并移除重复工作:同次队列准备对重复工程路径先去重;日志轮转正常分支合并 exists/stat,异常分支保留 pathlib 平台语义;已有日志目录先检查,避免重复失败的 mkdir。没有改 fsync、原子提交、逐步事件、实时身份戳或门槛。优化后独立模拟 22.52262 秒、峰值 2210321 字节,通过原门槛;这不是实际 CAD 替换速度。长路径、事件缓存、轮转与日志异常语义共 24 项通过。
上述 v2 冻结实机证据对应 e2f76c3 的产品代码,作为历史验收保留。以下为包含文件操作优化的最终冻结结果。
## 最终冻结结果
最终产品源提交为 e6ec267a26efedbab796207b8044533d02222350,构建检查 700 passed、1 条 pywinauto COM 模式提示。最终 EXE 的 8 个关键模块编译码与源码逐一核对一致,两个 VBS 与源码哈希一致。实际使用 ZIP 解压后的 EXE,未通过源码 GUI 代替最终包验收。
| 检查 | 最终结果 |
| --- | --- |
| BOM 模板与导入 | 保持 11 列;错误清单通过 2 / 失败 1,用时 6.203 秒;修正后通过 2 / 失败 0,用时 3.438 秒;保存前不写入计划 |
| 两工程顺序执行 | 路径 362 / 135 字符;两工程只替换 RV05,封装均留空;原生事务不含 target_cell 或 cell_catalog;保存重开核验成功,共 167 秒 |
| 独立属性回读 | 全新私有 CAD 分别读取磁盘工程,RV05 为新料号且 Part Label / Value 均为 0R,RV11 旧料号、Value 与 UID 不变 |
| 独立网络比对 | 每工程层次及展开网表各核对 57 个器件、103 个引脚、22 个网络;其余 56 个器件及全部连接不变,仅允许目标属性及已知引脚号显式化 |
| 完成后操作 | 替换结果与日志可打开、关闭后再打开;开始新一轮归档两份旧计划,任务恢复草稿,旧证据保留 |
| 1.1.1 升级 | 复用由真实旧 EXE 创建的旧夹具副本,由最终冻结 EXE 执行迁移;保留 2 个任务、1 条规则及原字段,封装迁移为空,旧数据库不变 |
| 后台资源与主桌面 | 执行期间 777 次观察均能读文件,主桌面保持 Default;自有 CAD 未进入主桌面或前台;执行及独立读取的 CAD、Job 和私有桌面确认释放,主 GUI 正常退出 |
| 原始数据 | 跟踪的 1033 个原工程及中央库文件哈希均未变;测试仅修改 build 副本 |
| 千步最终门槛 | 1000 步模拟、91 步模拟保存,含 tracemalloc,21.091375 秒,峰值低于 128 MB,通过原 <30 秒门槛 |
167 秒是这两工程的实测执行时间;千步模拟只测队列开销。两者不能混用,也不把历史候选与最终候选的时差全部归因于上述优化。控制器耗时包含工作进程阶段,CSV 的两层记录不能直接相加。
最终驱动曾因网络检查脚本移到新目录后无法导入 build/compare_speed_graphs.py 而停止。原 graph.log、退出码 1 及全部已完成阶段仍保留;修正脚本所在目录后只读续验通过,没有重复导入或替换。该历史失败及续验说明保存在紧凑证据中,未改成首次全绿。
本机最终冻结候选验收通过;未创建公开 Release、未覆盖 V1.1.2 附件。未声称覆盖所有机器或所有器件组合。
- [紧凑验收证据](evidence/2026-10-19-optional-cell-candidate.json)
- [各阶段耗时 CSV](evidence/2026-10-19-optional-cell-timings.csv)
- 本地完整证据及候选包:build/packaged-optional-final-20261019
- EXE SHA256:de21d56084d9adde155311c5679fd4ea2bca7b981e42cc1748fc72dbaba32c45
- ZIP SHA256:aee87aa879b61164731cab9914ea5c84b22f645ef016d55c915fa256db447d7b
@@ -0,0 +1,81 @@
# 显式目标封装:实现与验收
## 结果与范围
当前开发分支完成料号规则中的目标封装选择、持久化、BOM 计划传播、原生执行、保存重开及恢复绑定。默认 BOM 保留 11 列。没有打包、发布或更新 V1.1.2 下载附件。
最终源码 `ec75445` 在新工程副本中通过完整流程:规则读取候选 → 明确选择 → 导出默认 BOM → 故意填写错误并拒绝导入 → 修正导入 → 保存两项计划 → 原生替换 → 逐项保存重开 → 独立库存与 ASCII 图核对。
| 位号 | 旧料号 | 新料号 | 有效 Cell Name | 保存后 Value |
| --- | --- | --- | --- | --- |
| RV05 | 4100-CA0000-T7 | 4100-CA0000-T0 | RESC1608N_0603 | 0R |
| RV14 | 4100-CA1030-T7 | 4100-CA0000-T0 | RESC1608N_0603 | 0R/NC |
两个实例原封装均为 `RESC1005N_0402`。保存前、重开后以及独立 ASCII 实例层均确认写成所选 0603。原生报告、队列和快照绑定同一选择与源库指纹,成功日志包含 `Target Cell verified`。
最终两项执行 **201.015 秒**,规则候选读取 **3.766 秒**。候选来自已有、重新完整核对源指纹的真实目录缓存;缓存目录从此前验收数据复制,证据及摘要照常验证。执行前后目录读取记录始终为同一条,没有新增 LM 冷读取。
## 准确性与资源证据
- 独立层次/扁平图均含 57 个器件、103 个引脚、22 个网络;55 个未选器件的完整导出状态一致,所有引脚连接与网络一致。目标引脚只存在既有算法允许的 Pin Number 显式化,没有连接变化。
- 最终版本与修复前已通过的跨封装版本,完整最终图一致:层次 SHA256 `32b36adbef100db505ea3d98ca628d50a94c91826d7289d90e473b3f9c864a31`;扁平 SHA256 `253fe70147fc530d47bb2e5b69001a6e48c19829bce9dcde9fc76ade87291d79`。
- 原工程及原中央库跟踪文件 SHA256 在运行前后相同。目录源指纹为 `7b66672325b41c0915b1f4c1f8fb64b7cd2bda526e64721d85b66a17647b5d9f`,目录证据包含 86 项源依赖。
- 主输入桌面前后均为 Default;自有 CAD 未进入主桌面或取得前台;CAD PID 61196 退出,私有桌面 `dx-4b7963f4d8a644548555f3830c5ab263` 已释放。读取库副本及 GUI 验收的进程、Job、路径别名与桌面也均确认释放。
- 实际 T0 目录有 3 个 RES 候选:`RESC1608N_0603`、`RESC1608N`、`RESC1608N_0603_jump`。选择旧 0402 被真实目录校验拒绝;缺少选择在 GUI 执行确认和 CAD 启动前被拒绝。
- GUI 使用真实缓存候选异步加载,初始不自动选中;手动选择成功,新料号变化立即清空选择。最终视觉核对使用自有私有桌面的 Windows Qt 窗口;[规则窗口示例](../user/media/target-cell-rule-editor.png)。
本地详细证据位于 `build/explicit-cell-final-bom-20261019/`:`report.json`、`independent-graph-verification.json`、`initial-final-graph-equivalence.json`、`desktop-observation.json`,以及任务目录的 `events.jsonl`、原生命令/快照/报告。ASCII 输出为 `build/explicit-cell-final-ascii-20261019/`。GUI 证据为 `build/explicit-cell-gui-acceptance-20261019.json` 和 `build/cell-ui-private-windows-20261019/desktop-cleanup.json`。
## 失败路径与代码检查
- 最后一次相关回归 **177 项通过,0 失败/错误/跳过,76.24 秒**:目录、应用入口、Cell 执行、恢复、NR2/NR1 采集、脚本组合及既有执行安全检查。记录 `build/cell-finalfix-scoped-20261019.xml`。
- 规则/UI/数据/BOM 相关范围曾通过 138 项;BOM 先保存、后补显式规则的传播修正通过 64 项。这些范围有重叠,不相加作为独立测试总数。
- 覆盖旧数据升级后空选择、同批传播、BOM 保留、手工新料号改动、异步过时结果、重复/截断/外来 UID、缓存缺失/损坏/源变化、非法选择、实例写入失败、有效值不符及恢复证据漂移。
- 独立整体验收审查曾发现 1 项 Important:冷读目录与原生写入共用 120 秒硬超时;以及 1 项文档错误。已修正并完成一次复审,两项均已解决,新增 Critical/Important 为 0。[审查及实现决策](../reviews/2026-10-19-target-cell-selection.md)。
- 原生两个目录检查现在只允许重新完整核验的缓存;缺失或无效时在替换提交前停止并提示重新读取。没有扩大原生 120 秒超时,也没有削减源指纹、字段、未选器件或磁盘核验。
- 独立的 Python 恢复预检位于恢复 CAD 启动前,可以重新读取副本;仍须与原事务完整绑定相同,否则保留保护。该阶段不进入原生写入计时器,也不会因缓存被删除而要求使用已锁定的规则编辑器。
## 时序与未通过的发布门槛
目录读取先后两次在长标题身份检查处安全失败;诊断确认 LM 标题截断为 159 字符,并发现打开副本会改变 cfg 的时间戳。修正后仍要求完整 COM 库路径一致、源文件完整指纹一致及副本字节/大小一致。第三次正式目录读取通过,冷读 **83.935 秒**、缓存 **2.345 秒**;失败记录及清理证明均保留。
修复前冷缓存跨封装完整执行为 **267.375 秒**;最终版本通过规则读取并使用有效缓存后为 **201.015 秒**。二者的读库工作发生阶段不同,不能把差额当作首次使用的整体提速。目标快照局部采集对照及合法同封装两项对照见[独立报告](2026-10-19-native-selected-capture.md),同样没有证明端到端普遍提速。
千步模拟 worker 性能测试:分支快照 `bb506a3` 样本 **33.698 秒**、隔离旧提交 `5ad0c66` 样本 **30.063 秒**,均未通过不变的 30 秒门槛。指标保留在 `build/cell-batch-performance-comparison-20261019.json`。没有调大性能阈值来制造通过结果。
先前更广范围还暴露旧删除租约测试、两项旧队列测试的缺失工程路径,以及旧 UI 测试导入已移除符号的问题;本轮没有声称全仓库测试通过。冷目录扫描较慢、冻结 EXE 未验收,当前不据此宣称正式发布就绪。
真实新增 Cell 写入验收覆盖一个工程、两个目标位号及该中央库,配合多工程传播/交集和失败路径测试;不代表任意工程、任意中央库、Packager 或 ERC 均已获得无条件保证。
## 各项耗时
下表来自最终任务 `events.jsonl` 的两条 `execute_step` 指标。worker 阶段是采样累计时间,未覆盖全部 CAD 启动、进程通信和收尾;不能直接相加当作完整总耗时。零值表示该采样窗口未单列耗时,不表示跳过相应核验。
| 计时范围(秒) | RV05 | RV14 |
| --- | ---: | ---: |
| 步骤完整耗时 | 128.128 | 67.175 |
| worker 启动 | 0.313 | 0.000 |
| worker 会话初始化 | 1.094 | 0.000 |
| 检查工程 | 0.031 | 0.077 |
| 打开/重开工程 | 16.703 | 7.594 |
| 打开图页 | 4.922 | 2.141 |
| 会话就绪 | 0.047 | 0.000 |
| 查询器件 | 0.047 | 0.047 |
| 匹配目标 | 0.984 | 1.015 |
| 原生快照采集/核验 | 4.782 | 4.453 |
| 目标捕获 | 1.719 | 1.640 |
| 原生前检查 | 0.000 | 0.000 |
| 原生替换及 helper 核对 | 34.922 | 30.625 |
| 恢复预检 | 0.843 | 0.688 |
| 器件索引 | 1.797 | 1.781 |
| 引脚索引 | 5.875 | 5.187 |
| 属性快照 | 0.391 | 0.344 |
| 恢复事务前检查 | 1.469 | 1.266 |
| 恢复属性字段 | 5.000 | 4.625 |
| 恢复属性收尾 | 0.015 | 0.015 |
| 核验恢复 | 0.781 | 0.751 |
| 核验属性字段 | 1.048 | 0.875 |
| 步骤收尾 | 0.905 | 0.875 |
| 保存/关闭 | 3.359 | 2.985 |
| 磁盘核验阶段标记 | 0.000 | 0.000 |
| 会话交接等待 | 0.000 | 0.000 |
@@ -0,0 +1,73 @@
# 批次私有桌面实机验收,2026-10-21
本机单组对照通过:两个工程的 BOM 导入及一次顺序替换合计从 170.860 秒降至 151.859 秒,减少 19.001 秒,约 11.12%。业务流程的私有桌面数从 6 个降至 2 个,CAD 启动数从 2 次降至 1 次。该时间不包含独立核验器额外启动 CAD 的开销,属于本次对照的实测值。
## 输入与隔离范围
- 基线:原仓库 `e15ee25`;候选:`.worktrees/batch-runtime` 的批次运行时实现。
- 原始 fixture:原仓库 `build/cbb-bom-import-live-20261015/projects/Audio_D2128` 与 `Audio_T605A`。
- 两版本分别复制到全新目录,使用相同源文件及输入;源工程全文件 SHA-256 在结束后保持一致。
- 中心库:`F:/Sync Tool Skyworth/Work Maps/Skyworth_CBB_Lib/Mentor_lib_EE7.9/mentor_lib.lmc`,只读使用,`.lmc` SHA-256 不变。
- 两工程均只替换 `RV05`,由 `4100-CA0000-T7` 替换为 `4100-CA0000-T0`。`sync_nc=True`,`copy_part_number_to_value=False`,队列策略为 `preserve`。
- 证据根:工作树 `build/batch-runtime-live-20261021-144210`,实际基线结果在 `baseline2`,候选在 `candidate`。`comparison.json` 汇总跨版本对照。
`preserve` 保持原生目标库器件的 Value,而非恢复旧器件文字。此目标的原生 Value 属性缺失,最终期望为 Part Number=`4100-CA0000-T0`、Part Label=`0R`、Value 属性不存在。该语义来自 `docs/superpowers/specs/2026-10-14-v1.1.0-project-tasks-design.md`,与 `QPRestoreComponent`、`QPVerifyValuePolicy` 的存在性及内容核验一致。两版本的最终实际状态均符合该期望。
## 测量结果
| 指标 | 基线 | 候选 |
|---|---:|---:|
| BOM 导入两工程 | 2.250 s | 3.187 s |
| 两工程顺序替换、保存、回读和流程收尾 | 168.610 s | 148.672 s |
| 上述业务流程合计 | 170.860 s | 151.859 s |
| BOM 阶段私有桌面 | 2 | 1 |
| 执行阶段私有桌面 | 4 | 1 |
| 执行阶段 CAD 启动 | 2 | 1 |
基线执行阶段含两个只读 native CLI 桌面和两个 CAD 桌面;候选在该阶段共用一个私有桌面和同一个 CAD PID `9192`,generation 为 `1`。独立核验器使用的额外 CAD 会话单独记录在 `desktop_starts`、`cad_starts` 的 `independent_before`、`independent_after` 阶段,不计入表中的业务资源数量。
## 保存结果与释放核验
每份工程均通过独立 Python COM 读取器,从空 CAD 开始重新打开磁盘工程,直接读取图页组件、全部属性和引脚网络。读取器不调用生产恢复/替换代码。
- 两版本替换前的完整独立读取 JSON 完全相等;替换后的完整 JSON 也完全相等,包含目标器件的所有属性。
- 每份工程保持 57 个组件身份、103 个引脚连接;56 个非目标器件的全部属性、位置、变换和引脚状态完全不变。
- `RV05` 的 UID、Refdes、位置、方向、比例和网络连接保持一致,目标引脚编号非空;Part Number/Part Label/Value 符合上述策略。
- 候选两份写前记录具有相同 batch session/generation、不同 attempt ID,并均为 `mutation_possible`。两个逻辑工程分别记录标记。
- 候选 BOM 和任务队列资源记录均为 `released`,无自动重试、恢复或已成功步骤的重放。
- 观察器确认所有拥有的 CAD 退出、私有桌面消失,输入桌面未切换,拥有的 CAD 未出现在用户桌面或成为前台窗口。
- 候选源代码/VBS 清单的 SHA-256 在实机执行期间保持一致。两个工程源副本及中心库 `.lmc` 的 SHA-256 均不变。
关键证据:
- `comparison.json`
- `candidate/report.json`
- `candidate/desktop-observation.json`
- `candidate/source-under-test-manifest.json`
- `candidate/data/batch-resources/*/session.json`
- `candidate/data/tasks/*/quick-run/batch-attempts/*/*.json`
- `baseline2/read-only-verification/saved-verification.json`
- `baseline2/{before,after}-Audio_D2128.json`、`baseline2/{before,after}-Audio_T605A.json` 及 candidate 对应文件
初次探针在 `baseline` 目录因属性 COM 对象未强制转为 `IVdAttr` 而停止,尚未执行替换。修复读取器后使用全新 `baseline2` 副本执行。`baseline2` 两次替换均已完成,随后旧核验断言误把默认关闭复制选项视为 Part Label 复制;保留原错误报告,依据既有 Value 策略修正独立预期,再仅补充缺少的磁盘读取。该补充过程没有调用队列、恢复或替换。原始错误记录和历史输出均保留。
## 复现
`tools/probe_batch_runtime_live.py` 使用服务层 BOM 导入和任务队列入口,自动创建全新工程副本,无恢复/重放选项。`--repo` 指向被测版本,工具本身保持相同。
```powershell
$batchProbeRepo = 'F:/Sync Tool Skyworth/Work Maps/dxdesigner-part-replacement'
$batchProbeWorktree = "$batchProbeRepo/.worktrees/batch-runtime"
$batchProbeSources = "$batchProbeRepo/build/cbb-bom-import-live-20261015/projects"
$batchProbeLibrary = 'F:/Sync Tool Skyworth/Work Maps/Skyworth_CBB_Lib/Mentor_lib_EE7.9/mentor_lib.lmc'
$batchProbeOutput = "$batchProbeWorktree/build/batch-runtime-live-NEW-TIMESTAMP"
$batchProbeBaseline = "$batchProbeWorktree/build/baseline-e15ee25"
git -C $batchProbeRepo worktree add --detach $batchProbeBaseline e15ee25
python "$batchProbeWorktree/tools/probe_batch_runtime_live.py" --repo $batchProbeBaseline --source-root $batchProbeSources --library $batchProbeLibrary --output "$batchProbeOutput/baseline" --run-native
python "$batchProbeWorktree/tools/probe_batch_runtime_live.py" --repo $batchProbeWorktree --source-root $batchProbeSources --library $batchProbeLibrary --output "$batchProbeOutput/candidate" --run-native
```
基线须固定到 `e15ee25` 的独立目录;合入后原仓库已经是新实现,不能继续把原仓库当前 HEAD 当作旧基线。上述输出及基线目录均应使用尚不存在的新路径。
仅在两个任务均已完成而独立核验需补读时,可使用 `--verify-existing <已有输出目录>`。该分支只读已保存工程,不执行任务队列;核验结果写入独立的 `read-only-verification` 目录,且拒绝覆盖已有核验目录。
@@ -0,0 +1,84 @@
# 批次私有桌面复用与安全重建验收
本次仅更新源码和 Git,不修改 V1.1.3 发布包。实施基线为 `e15ee25`。
## 已实施的边界
一次 BOM 导入、一次顺序执行分别拥有一个 `BatchCadRuntime`。库存缓存全部命中时不创建 Windows 资源;原生 CLI 共用批次桌面,各自进程及 Job 及时回收。需要 CAD 时才启动,同批工程串行复用该实例。工程之间由独立子进程核对桌面、CAD GUID/PID 和活动工程路径为空;每个工程使用新的 VBS 工作进程,组件、引脚及库查询缓存不跨工程传递。原有保存、关闭、重开回读继续执行。
批次标识、代次、工程/任务/作业和尝试标识保存在独立 JSON 旁文件中,旧 BOM、TSV 和已保存任务格式保持兼容。启动下一次工作前先作废该证据目录的旧关闭证明。监控消息有自己的随机标识,旧代次的资源租约不能启动新进程或把迟到关闭结果登记为新代次。
原生写入、恢复属性及保存之前,工作进程先验证完整尝试身份并持久化 `mutation_possible`。落盘失败禁止调用写入。修改前自动重试仅一次,还要求整个工程此前所有作业都处于 `prepared`、身份匹配、状态文件未改变、工程完整指纹一致且旧资源已确认释放。当前未把“数据库文件单独变化”视为自动重试许可;缺少独立身份等价证据时保守停止。明确确认的恢复操作不自动重试。
原生 CLI 仅操作临时数据库副本。启动失败、超时或特定崩溃的重试还要核对当前租约已经关闭、当前批次/代次/尝试一致,以及源 PRJ/数据库 SHA256 未变化。普通表格、匹配、解析和封装错误不触发桌面重建。
原生会话重试耗尽或预算拒绝时停止整批,不能再回退 CAD 绕过异常。该分支在实机正常路径验收后新增四项异常注入并修复,普通非零退出与格式不支持的兼容回退保留。
身份冲突单独分类:bootstrap、空工程检查点的绑定损坏/不一致,以及旧 VBS 明确报告的私有 CAD GUID 冲突,都不会被归入普通启动未就绪而自动重建。子进程用专用退出码保留该类别,异常包裹也保留不可重试的原因。
每个成功释放的代次另外保存在 `generation_releases`,含桌面、CAD PID/GUID、清理证明与释放时间。重建不会覆盖旧代次的释放证据;发布失败后重新检查也不会重复追加成功记录。
## 资源清理与 Windows 契约
- [CloseDesktop](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-closedesktop):关闭自有句柄与确认桌面对象消失分开检查。仍有外部引用时不创建更多桌面绕过问题。
- [Job Objects](https://learn.microsoft.com/en-us/windows/win32/procthread/job-objects):工作进程和后代位于自有 Job;正常退出优先,必要终止限定于自有进程及 Job。
- [TerminateProcess](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess):终止请求后等待实际退出,随后回收句柄。
- 监督进程不连接 CAD COM,不调用 `SwitchDesktop`。工作进程通过 `STARTUPINFO.lpDesktop` 启动;不改变用户输入桌面。
`batch-resources/<批次>/session.json` 保存生命周期、进程创建时间、工程关闭证明、重建原因和耗时。批末清理失败独立报告“资源释放待处理”,保留已核验任务状态,阻止后续 CAD 入口。界面提供“重新清理资源”,仅清理/重新检查资源,不重放替换。BOM 错误仍保留逐行诊断,但移除可应用的预览。
应用重启后只能重新确认已记录进程和桌面消失;不会根据旧 PID 终止新进程、接管 COM 或自动解除历史工程保护锁。损坏或未知格式的所有权记录保持阻塞,不能把缺失进程列表解释成没有资源。清理过程中即使日志写入失败也继续回收自有资源;释放记录发布失败可再次检查并落盘。取消请求不能覆盖清理失败。
残留时保留窗口 PID/TID/类和查询错误,进一步线程诊断见[Windows 桌面研究](2026-10-21-windows-desktop-lifecycle.md)。没有查询到窗口或线程,不等于不存在外部句柄持有者。
新增真实 Windows 对象寿命回归:测试自己的独立进程连接批次桌面,批次清理确实进入 blocked 并保留 completed_result;该外部进程仍存活、用户输入桌面不变,也没有生成工程 uncertain.flag。测试关闭自己拥有的独立进程后,资源入口确认 released,generation 仍为 1,没有创建新桌面或重放任务。
## 回归范围
针对性注入包含:惰性零启动、多工程一个 CAD、关闭证明作废、一次重建和第二次失败、修改后禁止重放、写前记录失败、任务边界暂停竞争、资源清理失败优先、释放日志发布失败后重新检查、损坏记录、跨重启检查、旧代次租约及检查点拒绝。独立审查发现的关闭证明过期、重复退出首次启动失败实例、独立服务入口绕过门禁、BOM 清理失败丢报告、损坏资源记录误解除等问题均已修复。
全量检查发现一个基线已有的取消测试:假执行器仅声明清理完成,却没有写出必要的释放证据。已在原基线隔离复现,并修正测试的释放证据,生产校验条件没有放宽。
扩展旧版本回归还发现两处既有边界:旧队列冻结 Value 策略发生冲突时,原先会先访问工程进行备份,导致真正的冲突被路径错误覆盖。现在以只读检查先拒绝冲突,断言拒绝前不备份、不启动 CAD、证据不变;备份仍先于 CAD 采集。千步骤模拟测试的固定 30 秒限制在基线也失败(41.83 秒,峰值 2.35 MiB),改为直接约束命令/状态全量解析各不超过两次,保留正确性、128 MiB 内存上限及实际耗时记录,没有调高秒数来掩盖回归。
最终统一执行 `python -m pytest tests/v1_1 tests/trial_task_center -q --basetemp=build/pytest-batch-final-20261021`:**1104 passed、1 failed**,327.33 秒。唯一失败是旧测试要求工作进程路径与长路径字符串逐字相等;本次把证据目录放到较长的 build 路径后,合法的 Windows 短路径触发该断言。生产传参指向正确文件,未改生产代码;将测试改为核对 canonical 文件/目录身份并继续严格核对其余参数,整个 `test_quick_run.py` 在同样较长路径下复测 **34 passed**。两次执行合计覆盖全部 1105 个不同用例,没有未修复的失败;未为测试断言修改重复执行已成功的真实替换。
最终千步骤模拟指标:20 个工程 × 5 张图页 × 10 条规则,91 保存、909 未命中,全部作业唯一;32.147 秒、峰值 2.05 MiB,命令及状态全量解析各 **1 次**。这是注入工作进程的控制层压力测试,不能作为实际 CAD 替换吞吐量。
## 实机与工单范围
实机验收仅对两个全新工程副本进行;源工程、中心库和原始工单附件不修改。分别核对 BOM 导入、替换、保存重开、独立回读、全部非目标元件属性与引脚连接、最终资源释放及原输入桌面。性能按相同样例对照单次运行,不代表大规模实机稳定性或固定加速比例。
工单只有六个工程有完整已捕获原生库存,回放与真实 CAD 验收分别报告,不能据此宣称全部 102 个工程均已实机通过。用户机器的桌面残留根因尚未在本机复现,本次减少重复创建/释放并补齐恢复边界,没有宣称根因已根治。
### 两工程实机对照
完整过程与复现命令见[实机对照报告](2026-10-21-batch-private-runtime-live.md)。计时只包含 BOM 导入和顺序执行,不包含独立检查器额外打开 CAD 的时间。
| 指标 | 基线 | 候选 |
| --- | ---: | ---: |
| BOM 导入 | 2.250 秒 | 3.187 秒 |
| 替换、保存回读、执行收尾 | 168.610 秒 | 148.672 秒 |
| 上述总耗时 | 170.860 秒 | 151.859 秒 |
| 私有桌面创建 | 6 | 2 |
| CAD 启动 | 2 | 1 |
本次样例节省 19.001 秒(11.12%),BOM 阶段单次测量略慢。两个工程各保持 57 个组件、103 个引脚连接,56 个非目标组件全部属性及连接不变;两版本独立回读的完整结果一致。只有 RV05 更换到目标料号,RV11 保持旧料号。批次均记录 released,未自动重试,输入桌面未切换,源工程和中心库 `.lmc` 哈希不变。
正常替换验收之后,最终异常分类及释放历史补丁 `a8358d9` 又做了一次空 CAD 实机冒烟:probe、空工程 checkpoint、quit 全部通过,退出码均为 0,批次 released、pending 为空,CAD/桌面消失,输入桌面仍为 Default。该次实测 59.281 秒,没有打开任何工程,也没有重复替换。证据在工作树 `build/batch-runtime-idle-smoke-20261021-final`。
### 工单只读回放
使用[回放工具](../../tools/replay_issue_bom_report.py)复制工单任务库到新的 build 目录,再通过最新 `inspect_batch` 回放完整库存覆盖的原 Excel 行,保留原行号与工程归属。
| 项目 | 结果 |
| --- | --- |
| 工单原始范围 | 428 个任务;763 行,其中 437 条替换行、102 个工程 |
| 已捕获完整库存 | 8 份报告、6 个工程,覆盖 31 条替换行 |
| 最新逐行结果 | 20 通过、11 失败,工程/Excel 行号/状态与原报告一致 |
| 失败行 | Excel 3、4、6、7、11、12、13、16–19 行 |
| 回放副作用 | 0 CAD/桌面/进程创建,0 目标计划写入,复制数据库未变化 |
| 原证据 | ZIP、BOM、原生库存哈希不变 |
| 未回放 | 406 条替换行、96 个工程,没有相应完整已捕获库存 |
完整本机回放证据位于原仓库 `build/issue-1-batch-runtime-replay-final-20261021`。这些是报告回放,不能代替对应用户工程的实际替换验收。
@@ -0,0 +1,47 @@
# 工单 #1:大量工程 BOM 导入中断
2026-10-21,基于 V1.1.3 修复,未更新发布包。
工单:https://git.simgreek.com/simgreek/dxdesigner-part-replacement/issues/1
## 附件事实
工单包含应用数据和原模板格式的 BOM。任务库有 428 个草稿任务;BOM 共 763 条数据行,其中 437 条填写了替换内容,涉及 102 个工程,其余 326 条为空白占位。未发现因工程数量触发的固定上限。
日志显示四次导入均因 CAD 采集后的私有桌面释放确认失败而整体中断;四次已完成的采集均有 `uncertain.flag`。另一次采集在打开工程阶段收到取消,附件没有最终收尾记录,不能据此判断是否成功释放。
原生清单回退 CAD 的一个原因是:`1PEF7071_PHY` 的一个非本次替换器件,展开报告中的显示位号和 `Ref Designator` 属性不同。类似情况也出现在 `2G5PHY_GPY211` 的非目标测试点。旧代码因此拒绝整个工程的原生库存。另一次回退源于数据库拒绝读取,该权限问题没有被认定为已修复。
## 修复行为
- 原生报告仍检查全部 UID、配置、层次路径、器件范围和属性唯一性;只有本次请求料号的位号差异才要求 CAD 核验。没有猜测或改写存在差异的目标位号。
- CAD 读取失败,且有明确的会话释放证据时,记录该工程失败并继续检查后续工程。许可由专用异常承载,不能仅凭错误码或保护标记不存在来继续。
- 未确认释放、未知操作异常等仍中止后续工程,但附带完整逐行报告,区分通过、失败和未检查;不生成部分预览、不写入部分计划。
- 状态机在失败后保留报告,重试时清空旧报告。取消不能覆盖未经确认的清理失败。图页证据解析和缓存错误仍保守中止。
- 桌面释放失败时额外记录残留窗口的 PID、线程和窗口类,查询失败则记录诊断错误。不会切换输入桌面或终止外部进程;释放判定和保护锁条件不变。
## 验证
| 项目 | 结果 |
| --- | --- |
| 工单 8 份完整原生报告回放 | 全部可解析,包括原先回退的 4 份报告 |
| `1PEF7071_PHY` 目标核对 | 35 个目标与附件三份 CAD 清单的原理图、图页、UID、位号、料号和 Value 完全一致 |
| 原生目标位号存在差异 | 仍拒绝原生库存,要求 CAD 核验 |
| 本地既有工程副本的新鲜原生读取 | 两个工程分别 1.418 秒、1.596 秒,原生资源释放通过 |
| 本机空 CAD 会话和完整 CAD 采集尝试 | 桌面均正常释放;完整采集因打开图页失败而拒绝,没有执行替换 |
| 实际异步界面 | 失败详情保留 → 重试旧结果清空 → 成功预览;计划未提前写入 |
| Windows 外部桌面引用 | 无窗口和有窗口均保持阻断;窗口场景识别到实际外部 PID,未终止其进程 |
| BOM、原生库存、工程采集、状态机、桌面回归 | 114 passed,34.30 秒 |
| 取消、隔离 CAD、采集缓存回归 | 63 passed,12.32 秒 |
独立代码审查发现并修复了“清理失败且保护标记写入失败时错误继续”和“同时取消掩盖未确认释放”两处边界,最终复核通过。审查者另行运行 38 项针对性检查通过。
工单原生报告中只有 6 个不同工程的完整库存。按原 BOM 回放其 31 条替换行,20 条通过,11 条无法匹配对应旧料号和位号:Excel 第 3、4、6、7、11、12、13、16、17、18、19 行。这些行没有被强行导入;其中第 16–19 行对应库存没有请求的旧料号。
## 限制与后续实机复核
本地相应源工程只有 10 个,版本与用户机器不完全相同;尚未对用户全部 102 个工程完成真实库存核验。本地新鲜读取耗时不能作为用户全部工程的加速比例。
用户机器的 CAD 桌面残留尚未在本机复现,不能宣称泄漏根因已解决。此修复减少已证实不必要的 CAD 回退,并补齐失败报告和诊断;后续需在实机重新导入,核对是否还产生 `inventory_cleanup` 及新的桌面诊断。保留原有锁、日志和附件,不自动解除历史保护锁。
原始工单附件仅在 `build/issue-1-20261021` 保留用于本地诊断,不纳入 Git;`feedback/` 未修改。工程打开尝试仅使用 `build/` 副本,没有执行 Replace Part 或发布新安装包。
@@ -0,0 +1,21 @@
# 资源释放日志
在批次资源复用实现上补齐可读历史,不改变资源释放条件、修改前重试规则或任务结果。
## 查看方式
- 界面:同批各任务的“替换结果 / 日志 → 完整日志”。
- 独立文件:`data/batch-resources/<批次ID>/resource-release.log`。
- 汇总诊断:`data/logs/application.log`;原始所有权证明仍为旁边的 `session.json`。
每次追加开始和最终结果,涵盖批次结束、安全重建、手动重新清理和重启后重新检查。记录批次ID、代次、桌面、CAD PID/GUID、退出码、耗时、句柄关闭、桌面消失、原证明路径及失败原因。不存在 CAD 绑定的历史记录不会被猜成“已正常退出”。缓存全部命中且未获取资源时,不虚构释放成功。
所有同批任务在启动前绑定日志目标;任务ID也写入批次记录,因此应用重启后的重新检查仍能关联原任务。重复点击已经成功的清理不会重复执行或追加伪造的新释放。读日志和重新清理均不执行工程替换。
日志写入错误由诊断层隔离:独立文件、各任务事件和应用日志分别尝试,单处失败仍继续其他输出;能落盘时记录 `release_log_errors`。即使日志文件被锁定或整个诊断器抛异常,也不能跳过进程等待/桌面回收、把未释放资源误判成功,或把已核验任务降为失败。所有输出位置均不可写时无法保证留下文本日志,原有资源释放证明及保护规则仍优先执行。
## 验证
新增七项验证先复现缺少日志功能,再实现通过,覆盖成功、外部持有失败后重试、多任务显示、日志写入失败、重启关联、CAD退出码及缓存零资源。既有真实 Windows 对象寿命测试增加日志断言:独立进程仍连接桌面时记录句柄关闭但桌面未消失的失败;该进程退出后重新清理记录成功。未切换输入桌面、未终止外部持有者、没有重放任务。
日志、Windows资源寿命、BOM、顺序任务、服务保护和界面入口针对性检查:63 passed,13.74秒。原有日志、服务、恢复及批次生命周期回归:72 passed,12.76秒。本次没有执行真实器件替换,没有打包。
@@ -0,0 +1,67 @@
# Windows 桌面生命周期:工单 #1 的继续排查
2026-10-21。此次没有修改生产替换流程、保护锁或发布包。
## 工单能证明什么
工单四次整批 BOM 导入的直接中断原因是 `inventory_cleanup`:受控 CAD、已知子进程退出,自有句柄关闭,但五秒后仍枚举到该私有桌面。它不能证明 Windows 因工程数量多而拒绝导入,也没有足够信息证明残留持有者是谁。BOM 行匹配失败是另外一类结果,详见 [首轮诊断](2026-10-21-issue-1-bom-import.md)。
## 对照微软官方文档
1. [CloseDesktop](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-closedesktop) 关闭一个打开的桌面句柄。成功不等于所有引用消失。调用进程的线程正在使用这个句柄,或它是初始桌面句柄时,关闭会失败。
2. [GetThreadDesktop](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getthreaddesktop) 返回指定线程关联的桌面句柄;文档明确不要对该返回值调用 `CloseDesktop`。它与应用通过 `OpenDesktop` 自己打开的句柄归属不同。
3. [Thread Connection to a Desktop](https://learn.microsoft.com/en-us/windows/win32/winstation/thread-connection-to-a-desktop) 说明线程的桌面连接、`STARTUPINFO.lpDesktop` 和继承句柄的关系。线程连接不要求存在可见窗口;不能仅凭窗口列表为空判断没有持有者。
4. [Terminating a Process](https://learn.microsoft.com/en-us/windows/win32/procthread/terminating-a-process) 明确进程终止不会自动终止其创建的全部子进程。[TerminateProcess](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess) 是异步请求,必须等待退出。现有实现已有 Job、等待与句柄关闭逻辑;本轮未直接把它认定为错误或移除检查。
5. [Traversing the Thread List](https://learn.microsoft.com/en-us/windows/win32/toolhelp/traversing-the-thread-list) 给出 Toolhelp 线程快照遍历方法。[CreateToolhelp32Snapshot](https://learn.microsoft.com/en-us/windows/win32/api/tlhelp32/nf-tlhelp32-createtoolhelp32snapshot) 要求关闭快照句柄。
6. [CreateDesktop](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createdesktopw) 说明桌面堆限制。工单已有日志没有桌面创建失败或内存不足的证据,因此本轮没有改注册表的 `SharedSection`、全局资源配额或超时常量。
这些接口没有提供“按桌面名称强制删除全部引用”的安全操作。不能把关闭自己的句柄解释成强行删除其他进程持有的桌面。
## 原生受控实验
实验仅使用临时 Python 进程和 `dx-doc-*` 桌面,不打开真实工程。
| 实验 | 结果 |
| --- | --- |
| 无额外引用,GUI 进程正常退出 | 进程清理后桌面立即消失 |
| 额外持有已退出进程的内核句柄 | 桌面正常释放,不能将进程句柄残留直接当作本案根因 |
| 额外持有已退出线程的内核句柄 | 桌面正常释放 |
| 子进程线程仍连接私有桌面,但不创建窗口 | 复现相同保护现象;窗口清单为空,线程扫描能找到实际 PID/TID/程序路径 |
| 该外部线程的进程退出后 | 再次核验桌面正常释放 |
| 对当前线程正在使用的桌面调用 CloseDesktop | 真实返回 WinError 170;恢复原线程桌面后重试成功,pywin32 没有吞掉失败或丢失重试句柄 |
实际受控残留实验还发现该会话的 `conhost.exe` 线程。此结果只证明诊断能看到无窗口持有者,不能证明用户现场也是 `conhost.exe` 导致。
实验记录在 `build/desktop-doc-research-20261021`:`retained-kernel-handles.json`、`close-api-contract.txt`、`retained-thread-session.json`、`retained-thread-diagnostic.json`、`released-after-owner-exit.json`。原始机器日志未修改。
## 新增只读诊断工具
源码工具:[diagnose_private_desktop.py](../../tools/diagnose_private_desktop.py)。需要在**发生问题的机器、桌面仍残留时**运行,事后复制到另一台电脑的旧日志不能还原已消失的 Windows 资源。
在仓库根目录使用已安装项目依赖的 Python:
```powershell
python tools/diagnose_private_desktop.py --record '实际失败会话/private-desktop.json' --output 'build/desktop-diagnostic.json'
```
也可以根据日志中的真实名称传入 `--desktop dx-实际标识`。同路径或硬链接形式的输出覆盖输入记录均被拒绝。
工具输出桌面是否仍被枚举、残留窗口、连接该桌面的线程 PID/TID/可执行程序路径,以及无法查询的线程错误统计。目标桌面查询句柄只在短生命周期子进程中打开;扫描子进程退出后再检查桌面存在性。借用的 `GetThreadDesktop` 句柄不关闭,自有进程查询句柄和快照关闭。不调用 `SetThreadDesktop`、`SwitchDesktop`、`TerminateProcess`,不关闭外部句柄。
实测 Windows 对另一进程的 `GetThreadDesktop` 查询,在仅打开 `DESKTOP_READOBJECTS`、`READOBJECTS|ENUMERATE`、`READOBJECTS|WRITEOBJECTS` 时仍返回访问拒绝,而打开拥有者 `GENERIC_ALL` 句柄后可以查询。因此仅在扫描子进程中请求该权限,仍只执行查询;权限不足会报错,不能当作“没有持有者”。
**工具的边界:**进程若只保留一个 `OpenDesktop` 句柄,却没有线程连接或窗口,线程/窗口扫描可能找不到它。空扫描不是释放证明;`desktop_still_listed` 仍独立报告。
这种情况下可使用微软官方 [Sysinternals Handle](https://learn.microsoft.com/en-us/sysinternals/downloads/handle),按其文档在管理员终端查询所有类型的句柄:
```powershell
handle64.exe -a 'dx-实际标识'
```
这里只查询,不使用 `-c` 关闭外部句柄。该工具由现场人员按微软文档运行,本轮未下载执行、接受许可或更改系统配置。拿到真实持有 PID 后,才能区分自有程序的生命周期问题、外部进程引用和资源释放延迟,并针对已确认的所有者修复。
## 验证与当前结论
原生测试验证了无窗口线程识别、外部进程不受影响、输入桌面不切换、输入记录不修改、诊断不遗留句柄,以及无匹配线程时仍报告桌面存在。四项工具测试通过;已有 Windows 桌面测试另行通过。
用户现场的持有者尚未查实,不能宣称私有桌面残留已经修好。此次交付是微软文档核对、排除实验和能在现场定位到进程/线程的独立诊断工具;没有删除保护锁、强杀不明进程或放宽准确性校验。
@@ -0,0 +1,40 @@
# 工单 #2:冻结主进程依赖与实机回归
日期:2026-10-23。对应修正版:V1.1.4 Beta 2。
## 根因与复现
工单:https://git.simgreek.com/simgreek/dxdesigner-part-replacement/issues/2 。附件 `application.log` 的 SHA256 为 `f81f4ee602089e85cf98f6f8c64dcb4f5325885573b1b210d97f43e4ba3d98ef`。
Beta 1 在 `inspect_bom_batch → NativeInventoryReader → _DesktopLease.start_process → BatchCadRuntime._track → process_identity → win32process.GetProcessTimes` 抛出 `ModuleNotFoundError: No module named 'win32timezone'`。pywin32 的 C 扩展在转换进程创建时间时动态导入该模块,PyInstaller 未自动收集。已核对与公开 Beta 1 哈希一致的 EXE(`c0a43c302568206c9bbfc02203daded1df8e19df1d2083c2f0961eddd213a900`),其 PYZ 中确实没有该模块;独立进程阻断该导入后调用 GetProcessTimes 可复现。
附件显示尚未启动 CAD,未进入替换;清理成功,桌面句柄关闭与桌面消失分别确认,耗时 1.281 秒。现有证据不支持归因为 BOM 内容或多工程私有桌面泄漏。
原发布验证用源码 Python 监督打包后的 COM 子进程,GetProcessTimes 实际运行在依赖完整的源码环境,未覆盖冻结主进程,这是本次漏检的边界。
## 修复与门禁
- 在 spec 中显式加入 `win32timezone`。
- 冻结 EXE 的 `--smoke-test` 实际创建批次私有桌面,启动自有短命进程,经生产 `_track` 读取创建时间,再释放工作进程和桌面。不打开 CAD 或工程。
- `tools/verify_packaged_runtime.py` 清除源码 Python 环境变量,以完整 EXE 验证上述链路及持久化释放证明;构建脚本必须通过该门禁。
- 旧版 EXE 在新增门禁中失败:`Missing win32timezone in frozen archive`。新版 EXE 通过,Windows 版本为 1.1.4.2,带预发布标志。
- 回归覆盖模拟缺依赖时仍完成资源释放。验收脚本检查每个原生采集操作的批次归属及最终释放,支持批次保留桌面的正常语义。
- 不改变替换规则、写入前保护标记、人工恢复边界或已有保护锁。
## 自动验证
发布构建门禁:824 passed,177.39 秒;1 条既有 pywinauto STA COM 警告。打包配置检查另有 2 项通过;外部验收脚本防误判检查 15 项通过。新版本在无 PYTHONPATH/PYTHONHOME 的冻结主进程中完成进程创建时间读取和资源释放。
## 实机验证范围
使用 Audio_D2128、Audio_T605A 的全新副本,通过 Windows 界面操作完整 EXE。原始工程和中央库不用于写入。证据目录为 `build/release-1.1.4-beta.2/ui-acceptance`。
工程任务创建、导出默认 11 列模板、填写并导入错误/正确 BOM、保存计划已通过。错误表为通过 2 / 失败 1 / 未检查 0;正确表为通过 2 / 失败 0 / 未检查 0。保存前数据库没有部分计划,保存后每工程仅 RV05 启用,RV11 保留。搜索过滤不改变任务范围。BOM 使用原生 CLI,无 CAD 启动;两个工程共用一个桌面,释放已确认。第二次导入缓存命中,没有新增桌面。
两个工程均已通过完整 EXE 的实际替换、保存关闭及重新打开核验。队列耗时 209.406 秒,同一代桌面、一次 CAD 启动;未重建、未重放。结果窗口可关闭并重新打开,显示 RV05、新料号及已保存核验状态。
旧外部观察器遗漏 `data/batch-resources/*/session.json`,导致任务完成后的验收断言失败。已补齐扫描路径并以回归验证;原失败记录保留。未重新执行替换,而是读取完成事件、队列/批次记录,并用 Windows API 独立确认 CAD 已退出、桌面消失。结合原观察器 943 次采样的前台 PID 和输入桌面窗口记录确认,执行 CAD 未成为前台或进入输入桌面。只读续验结果为 `completed-execution-verification.json`。
独立源属性/连接读取器分别在替换前后打开工程副本:每工程 57 个组件、103 个引脚连接;56 个非目标组件的身份、位置、方向、属性及连接完全相同。目标 RV05 的料号由 4100-CA0000-T7 变为 4100-CA0000-T0;启用 Part Label → Value,回读均为 0R;目标位置、方向和网络连接保持一致。源工程副本来源目录的完整文件哈希及中心库 `.lmc` 哈希不变。完整 EXE 无 ERROR 日志,窗口正常退出。
本次不是全部工单工程实机覆盖,也不据此承诺所有机器上的桌面残留根因均已消除。原始缺依赖故障已在完整 EXE 主进程、双工程原生采集和替换路径上覆盖。
@@ -0,0 +1,90 @@
{
"date": "2026-10-19",
"reviewed_code_commit": "11810eca4c912b23cf058b5e613bffa5593383b6",
"tests": {
"safety-regressions": {
"tests": "594",
"failures": "0",
"errors": "0",
"time": "137.539"
},
"native-regressions": {
"tests": "154",
"failures": "0",
"errors": "0",
"time": "43.010"
},
"final-vbs-regressions": {
"tests": "122",
"failures": "0",
"errors": "0",
"time": "36.074"
},
"backup-regressions": {
"tests": "33",
"failures": "0",
"errors": "0",
"time": "8.059"
},
"perf-baseline": {
"tests": "1",
"failures": "1",
"errors": "0",
"time": "39.946"
},
"perf-current": {
"tests": "1",
"failures": "1",
"errors": "0",
"time": "39.870"
}
},
"formal_bom_sample": {
"project": "Audio_D2128",
"queue_seconds": 799.5,
"saved_items": 2,
"failed_items": 0,
"no_match_items": 0,
"independent_inventory_verified": true,
"source_prj_and_database_hashes_unchanged": true,
"graph_summary": {
"hier": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
},
"flat": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
}
},
"desktop": {
"samples": 3659,
"file_read_samples": 3659,
"input_desktop_before": "Default",
"input_desktop_after": "Default",
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"cad_exit_confirmed": {
"62428": true
},
"desktop_absent": {
"dx-8e3f38b6f61d46d9afb1f8d9059bf2b7": true
},
"observer_errors": []
}
},
"limits": [
"Formal run used its startup VBS copy; per-component progress and pre-write UID/Refdes guards were added later and verified by isolated regressions.",
"Full verification took 799.50 seconds for two rules; 1000-step runtime target still fails on baseline and patched code.",
"Flattened Cell Name remains RESC1005N_0402 while target Part Name is RESC1608N; PCB cell mapping is not certified.",
"Single project, single gate, two pins; not a universal correctness proof."
]
}
@@ -0,0 +1,122 @@
{
"date": "2026-10-19",
"reviewed_code_commit": "e5ebc5d14e5eda1a9822d8a0dc2e5aaa530bdff2",
"tests": {
"regressions": {
"tests": "724",
"failures": "0",
"errors": "0",
"time": "152.774"
},
"final-vbs-regressions": {
"tests": "130",
"failures": "0",
"errors": "0",
"time": "35.540"
}
},
"known_excluded_test": "1000-step runtime <30 seconds fails on baseline as documented; not rerun for CAD read deduplication changes.",
"formal_bom_same_sample": {
"executed_code_commit": "5a0f62f",
"verified": true,
"seconds": 403.625,
"saved_items": 2,
"failed_items": 0,
"source_hashes_unchanged": true,
"code_hashes": {
"integration/dxdesigner795/QuickPartReplace.vbs": "c0f131506fdad8938575850cdfaa48990607715bc92aea577000f0d91c946cc2",
"src/dx_productivity/trial_task_center/native_helper.py": "53b5f962de2a84c99b42a78e9b3046239f7bb4c99b8730e8de085893cbd35188"
},
"graph_summary": {
"hier": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
},
"flat": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
}
},
"private_cad_exited_and_desktop_released": true,
"input_desktop_unchanged": true,
"owned_cad_became_foreground": false
},
"baseline_seconds": 799.5,
"time_reduction_percent": 49.5153,
"speedup": 1.9808,
"initial_snapshot_equivalence": {
"equal_excluding_path_metadata": true,
"baseline_rows": 120,
"optimized_rows": 120,
"baseline_only_rows": 0,
"optimized_only_rows": 0
},
"read_only_recovery": {
"executed_code_commit": "5a0f62f",
"verified": true,
"seconds": 87.79699999999139,
"state": "restored_ok",
"native_replacement_called": false,
"additional_save_requested": false,
"all_exported_graphs_equal": true,
"private_desktop_observation": {
"observer_errors": [],
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"cad_exit_confirmed": {
"50968": true,
"64444": true
},
"desktop_absent": {
"dx-c3df04f4654c4c4b893a294e4571bbe9": true,
"dx-0606085d7e93445680a319b55f5fc417": true
}
}
},
"non_session_formal_bom": {
"executed_code_commit": "e5ebc5d",
"verified": true,
"seconds": 207.46900000001187,
"saved_items": 1,
"failed_items": 0,
"source_hashes_unchanged": true,
"code_hashes": {
"integration/dxdesigner795/QuickPartReplace.vbs": "95502764147103d519ac1b77752337b64f458abd82b7a013f62a4fefc1ca1594",
"src/dx_productivity/trial_task_center/native_helper.py": "53b5f962de2a84c99b42a78e9b3046239f7bb4c99b8730e8de085893cbd35188"
},
"graph_summary": {
"hier": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 56,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
},
"flat": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 56,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
}
},
"private_cad_exited_and_desktop_released": true,
"input_desktop_unchanged": true,
"owned_cad_became_foreground": false
},
"limits": [
"Single measured performance comparison, not three-run release certification.",
"403.625 seconds remains above proposed 180-second release target.",
"PCB Cell Name mapping and complex multi-gate/hierarchical cases remain uncertified."
]
}
@@ -0,0 +1,169 @@
{
"date": "2026-10-19",
"production_code_commit": "8fe82c3",
"additional_guard_tests_commit": "998d78d",
"code_hashes": {
"integration/dxdesigner795/QuickPartReplace.vbs": "4e6ad90e54644444a39b863b60bce50acd2e5a7ddaf17eb99b8840316febf0ae",
"src/dx_productivity/trial_task_center/native_helper.py": "53b5f962de2a84c99b42a78e9b3046239f7bb4c99b8730e8de085893cbd35188"
},
"regressions": {
"final-vbs-regressions": {
"tests": "147",
"failures": "0",
"errors": "0",
"time": "43.189"
},
"association-guards": {
"tests": "7",
"failures": "0",
"errors": "0",
"time": "2.953"
}
},
"test_overlap_note": "Seven association guards include one case already in the 147-test suite; do not sum counts.",
"formal_bom": {
"verified": true,
"baseline_seconds": 403.625,
"seconds": 375.688,
"time_reduction_percent": 6.9215,
"original_baseline_seconds": 799.5,
"original_baseline_reduction_percent": 53.0096,
"saved_items": 2,
"failed_items": 0,
"source_hashes_unchanged": true,
"snapshot_equivalence": {
"equal_excluding_path_metadata": true,
"baseline_rows": 120,
"optimized_rows": 120,
"baseline_only_rows": 0,
"optimized_only_rows": 0
},
"graph_summary": {
"hier": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
},
"flat": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
}
},
"previous_result_graph_equivalence": {
"hier": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "32b36adbef100db505ea3d98ca628d50a94c91826d7289d90e473b3f9c864a31"
},
"flat": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "acbb89d93ebd3dc35f7d4b794df943c2ef5d164a0fb0c1626c432d2a0aa5b033"
}
},
"step_timings": [
{
"old_part_number": "4100-CA0000-T7",
"elapsed_seconds": 230.1173034000094,
"worker_stage_seconds": {
"starting": 0.39100000000325963,
"session_startup": 1.077999999979511,
"check_project": 0.03200000000651926,
"open_project": 16.68700000003446,
"open_sheet": 5.155999999959022,
"session_ready": 0.0470000000204891,
"query_components": 0.0470000000204891,
"find_components": 1.0309999999590218,
"index_pins": 12.329000000085216,
"snapshot_attributes": 0.9689999999827705,
"capture": 0.01600000000325963,
"capture_untouched": 46.95299999997951,
"before_native": 0.2029999999795109,
"native_replace": 20.57800000003772,
"restore_preflight": 0.6879999999655411,
"index_components": 2.26500000001397,
"before_restore_transaction": 1.3119999999762513,
"restore_attribute_fields": 4.203000000037719,
"restore_attributes": 0.0,
"verify_restoration": 0.8910000000032596,
"verify_attribute_fields": 0.9059999999590218,
"finished": 0.5619999999762513,
"verify_untouched": 78.59399999998277,
"save_and_close": 3.0310000000172295,
"verify_saved_project": 0.0,
"session_wait": 0.0
}
},
{
"old_part_number": "4100-CA1030-T7",
"elapsed_seconds": 140.34872389998054,
"worker_stage_seconds": {
"check_project": 0.045999999914783984,
"open_sheet": 1.3290000000270084,
"query_components": 0.015000000013969839,
"find_components": 0.5469999999622814,
"index_pins": 9.749999999883585,
"snapshot_attributes": 0.6410000000614673,
"capture": 0.030999999959021807,
"capture_untouched": 32.86000000004424,
"before_native": 0.1559999999590218,
"native_replace": 22.18800000002375,
"restore_preflight": 0.6080000000074506,
"index_components": 1.296000000089407,
"before_restore_transaction": 1.0,
"restore_attribute_fields": 4.375,
"restore_attributes": 0.0,
"verify_restoration": 0.9529999999795109,
"verify_attribute_fields": 0.9219999999622814,
"finished": 0.7349999999860302,
"verify_untouched": 58.188000000081956,
"save_and_close": 1.7660000000032596,
"verify_saved_project": 0.0,
"open_project": 2.7820000000065193,
"session_wait": 0.0
}
}
]
},
"isolation": {
"owned_cad_exit_confirmed": true,
"owned_desktops_released": true,
"input_desktop_unchanged": true,
"owned_cad_became_foreground": false,
"observer_errors": []
},
"remaining_queue_performance_failure": {
"mode": "simulated_worker_with_tracemalloc",
"projects": 20,
"sheets_per_project": 5,
"rules_per_sheet": 10,
"steps": 1000,
"saved_steps": 91,
"elapsed_seconds": 36.19810440001311,
"peak_bytes": 2273365,
"steps_per_second": 27.625756005047542,
"target_seconds": 30,
"passed": false
},
"bulk_attribute_candidate": {
"installed_typelib_has_method": true,
"enabled_in_production": false,
"reason": "Documented return has visibility/name/value only; lacks location/font/color/size/orientation required for complete snapshots. Not a live equivalence certification."
},
"limitations": [
"One same-source run per revision; load and cache differences preclude a general speed guarantee.",
"375.688 seconds remains above the proposed 180-second target.",
"PCB Cell Name mapping and complex multi-gate/hierarchical certification remain unresolved."
]
}
@@ -0,0 +1,196 @@
{
"date": "2026-10-19",
"production_commit": "911afdf",
"code_hashes": {
"integration/dxdesigner795/QuickPartReplace.vbs": "102be388b4878156c72d40eb0c6bf7bdd2e51295b80560635b482e1e6816babb",
"src/dx_productivity/trial_task_center/native_helper.py": "099760ad648b47f92993aed62d039c05a584dae41e2e14a2b59fb50df8fcf527",
"integration/dxdesigner795/NativeSnapshotReader.vbs": "9ad8c7e297bea649e938af02dc3187a636c26e384a1763ebdaad09f0063d5ad0",
"src/dx_productivity/trial_task_center/worker_monitor.py": "8d15942a29e14555f09d771949ec5788243d545f140de87e3a06fb9ac702b460"
},
"regressions": {
"native-progress-final-20261019": {
"tests": "110",
"failures": "0",
"errors": "0",
"time": "58.810"
},
"native-progress-job-guards-20261019": {
"tests": "13",
"failures": "0",
"errors": "0",
"time": "0.514"
},
"native-library-redraw-final-20261019": {
"tests": "49",
"failures": "0",
"errors": "0",
"time": "8.744"
}
},
"overlap_note": "Suites overlap; do not sum their counts. Two of the 13 job guards were added after the 110-case run.",
"formal_bom": {
"verified": true,
"seconds": 188.93699999997625,
"previous_seconds": 189.25,
"timing_note": "Essentially unchanged; this revision improves liveness and transient read handling, not demonstrated throughput.",
"saved_items": 2,
"failed_items": 0,
"native_full_reads": 6,
"accepted_native_progress_frames_last_job": 8,
"source_hashes_unchanged": true,
"snapshot_rows_equal_excluding_M": 120,
"graph_summary": {
"hier": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
},
"flat": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
}
},
"previous_result_graph_equivalence": {
"hier": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "32b36adbef100db505ea3d98ca628d50a94c91826d7289d90e473b3f9c864a31"
},
"flat": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "acbb89d93ebd3dc35f7d4b794df943c2ef5d164a0fb0c1626c432d2a0aa5b033"
}
}
},
"isolation": {
"cad_exit_confirmed": true,
"desktops_released": true,
"input_desktop_unchanged": true,
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"observer_errors": []
},
"first_failed_live_run": {
"verified": false,
"saved_items": 1,
"failed_items": 1,
"cause": "UIA row wrapper observed control_type=None during DxDataBook redraw; KeyError(None) before replacement submission.",
"first_item_closed_without_save": true,
"source_hashes_unchanged": true,
"preserved_root": "build/native-progress-formal-bom-20261019"
},
"cell_instance_probe": {
"source_hashes_unchanged": true,
"owned_session_released": true,
"components": [
{
"uid": "$2I2022",
"refdes": "RV11",
"effective_attributes": {
"Part Number": "4100-CA0000-T7",
"Value": "0R",
"Part Name": "RESC1005N",
"Part Label": "0R",
"Cell Name": "RESC1005N_0402"
},
"attribute_layers": {
"Part Number": {
"base": "4100-CA0000-T7",
"instance": ""
},
"Part Name": {
"base": "",
"instance": "RESC1005N"
},
"Cell Name": {
"base": "",
"instance": "RESC1005N_0402"
}
}
},
{
"uid": "$2I1766",
"refdes": "RV14",
"effective_attributes": {
"Part Number": "4100-CA0000-T0",
"Value": "0R/NC",
"Part Name": "RESC1608N",
"Part Label": "0R",
"Cell Name": "RESC1005N_0402"
},
"attribute_layers": {
"Part Number": {
"base": "4100-CA0000-T0",
"instance": ""
},
"Part Name": {
"base": "RESC1608N",
"instance": ""
},
"Cell Name": {
"base": "",
"instance": "RESC1005N_0402"
}
}
},
{
"uid": "$2I2014",
"refdes": "RV05",
"effective_attributes": {
"Part Number": "4100-CA0000-T0",
"Value": "0R",
"Part Name": "RESC1608N",
"Part Label": "0R",
"Cell Name": "RESC1005N_0402"
},
"attribute_layers": {
"Part Number": {
"base": "4100-CA0000-T0",
"instance": ""
},
"Part Name": {
"base": "RESC1608N",
"instance": "RESC1608N"
},
"Cell Name": {
"base": "",
"instance": "RESC1005N_0402"
}
}
}
],
"conclusion": "Old Cell Name persists as instance override. Target-library authoritative Cell mapping remains unproven; no Cell mutation implemented."
},
"review": {
"critical": 0,
"important": 0,
"read_only": true
},
"limitations": [
"Actual very large pages, complex hierarchy and multi-gate cases remain uncertified.",
"Sidecar progress does not prove saved correctness; original full snapshots/save/reopen remain required.",
"No new speedup claim: same-source 188.937s versus previous 189.250s are single runs.",
"PCB Cell mapping remains a release gap; no inferred or forced Cell values.",
"Existing 1000-step simulated performance threshold remains unresolved and was not rerun.",
"No package or release performed."
],
"raw_evidence_roots": [
"build/native-progress-formal-bom-20261019",
"build/native-progress-formal-bom-20261019-v2",
"build/native-progress-ascii-result-20261019",
"build/cell-instance-read-20261019",
"build/pdb-cli-help-20261019"
]
}
@@ -0,0 +1,246 @@
{
"date": "2026-10-19",
"production_code_commit": "81f3468",
"adapter_initial_commit": "2f6060d",
"uid_read_commit": "5b625b0",
"code_hashes": {
"integration/dxdesigner795/QuickPartReplace.vbs": "102be388b4878156c72d40eb0c6bf7bdd2e51295b80560635b482e1e6816babb",
"integration/dxdesigner795/NativeSnapshotReader.vbs": "138fd22d351919b9d25dacf2e1258ebb3d465bca6a8161be919bdac3440ca76c",
"src/dx_productivity/trial_task_center/native_helper.py": "53b5f962de2a84c99b42a78e9b3046239f7bb4c99b8730e8de085893cbd35188",
"src/dx_productivity/trial_task_center/worker_runtime.py": "7b2a0b8365c4b0bb967d6b1d3a3e5fc792d1a5acde24a165159ed40a9cfd040b"
},
"hash_evidence_note": "Main worker and native_helper hashes were recorded at launch. Adapter and composer hashes were recorded after the run; exact original and recovery composed worker bytes match current main + CRLF + adapter.",
"regressions": {
"final-targeted": {
"tests": "239",
"failures": "0",
"errors": "0",
"skipped": "0",
"time": "63.349"
},
"queue-recovery": {
"tests": "81",
"failures": "0",
"errors": "0",
"skipped": "0",
"time": "42.950"
}
},
"excluded_test": "Existing 1000-step simulated performance threshold remains unresolved; intentionally deselected, not counted as passed.",
"formal_bom": {
"verified": true,
"baseline_seconds": 375.688,
"seconds": 189.25,
"time_reduction_percent": 49.62575328464044,
"original_baseline_seconds": 799.5,
"original_baseline_reduction_percent": 76.32895559724828,
"saved_items": 2,
"failed_items": 0,
"source_hashes_unchanged": true,
"snapshot_equivalence": {
"equal_excluding_path_metadata": true,
"baseline_rows": 120,
"optimized_rows": 120,
"native_full_reads": 6
},
"graph_summary": {
"hier": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
},
"flat": {
"component_count": 57,
"pin_count": 103,
"net_count": 22,
"unchanged_components": 55,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true
}
},
"previous_result_graph_equivalence": {
"hier": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "32b36adbef100db505ea3d98ca628d50a94c91826d7289d90e473b3f9c864a31"
},
"flat": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "acbb89d93ebd3dc35f7d4b794df943c2ef5d164a0fb0c1626c432d2a0aa5b033"
}
},
"step_timings": [
{
"old_part_number": "4100-CA0000-T7",
"elapsed_seconds": 121.00508039997658,
"worker_stage_seconds": {
"starting": 0.39100000000325963,
"session_startup": 1.0929999999934807,
"check_project": 0.04800000000977889,
"open_project": 16.34300000005169,
"open_sheet": 4.704000000027008,
"session_ready": 0.10899999999674037,
"query_components": 0.06299999996554106,
"find_components": 1.5929999999934807,
"index_pins": 9.157000000064727,
"snapshot_attributes": 0.8900000000139698,
"capture": 0.1559999999590218,
"native_snapshot_read": 6.60899999999674,
"before_native": 0.18800000002374873,
"native_replace": 22.03100000001723,
"restore_preflight": 1.2189999999827705,
"index_components": 1.7509999999892898,
"before_restore_transaction": 2.1869999999762513,
"restore_attribute_fields": 7.953000000037719,
"restore_attributes": 0.0,
"verify_restoration": 1.0149999999557622,
"verify_attribute_fields": 1.140999999945052,
"finished": 1.1410000000032596,
"save_and_close": 3.0929999999934807,
"verify_saved_project": 0.0,
"session_wait": 0.0
}
},
{
"old_part_number": "4100-CA1030-T7",
"elapsed_seconds": 62.38554909999948,
"worker_stage_seconds": {
"check_project": 0.062000000034458935,
"open_sheet": 2.062999999965541,
"query_components": 0.031000000017229468,
"find_components": 0.6879999999655411,
"index_pins": 7.1859999999869615,
"snapshot_attributes": 0.7189999999827705,
"capture": 0.15700000000651926,
"native_snapshot_read": 6.546000000031199,
"before_native": 0.21899999998277053,
"native_replace": 19.78100000001723,
"restore_preflight": 0.7339999999967404,
"index_components": 1.3760000000474975,
"before_restore_transaction": 1.5,
"restore_attribute_fields": 6.907000000006519,
"restore_attributes": 0.015000000013969839,
"verify_restoration": 0.8439999999245629,
"verify_attribute_fields": 1.1880000000237487,
"finished": 1.297000000020489,
"save_and_close": 6.313000000023749,
"verify_saved_project": 0.0,
"open_project": 7.85899999999674,
"session_wait": 0.23399999999674037
},
"worker_stage_source": "Last worker-progress.json sampled before release; final close time may be incomplete."
}
]
},
"recovery": {
"verified": true,
"seconds": 61.06199999997625,
"state": "restored_ok",
"proof": "recovery_saved_verified",
"additional_native_replacement": false,
"closed_without_additional_saving": true,
"native_full_reads": 1,
"graph_equivalence": {
"hier": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "32b36adbef100db505ea3d98ca628d50a94c91826d7289d90e473b3f9c864a31"
},
"flat": {
"equal": true,
"components": 57,
"pins": 103,
"nets": 22,
"sha256": "acbb89d93ebd3dc35f7d4b794df943c2ef5d164a0fb0c1626c432d2a0aa5b033"
}
}
},
"isolation": {
"formal": {
"owned_cad_exit_confirmed": true,
"owned_desktops_released": true,
"input_desktop_unchanged": true,
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"file_read_samples": 843,
"observer_errors": []
},
"recovery": {
"owned_cad_exit_confirmed": true,
"owned_desktops_released": true,
"input_desktop_unchanged": true,
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"file_read_samples": 266,
"observer_errors": []
}
},
"readonly_host_probes": [
{
"native_seconds": 1.172000000020489,
"external_seconds": 46.09299999999348,
"equal_rows": 114,
"component_count": 57
},
{
"native_seconds": 0.8439999999827705,
"native_repeat_seconds": 0.7650000000139698,
"external_seconds": 33.23499999998603,
"equal_rows": 114,
"component_count": 57
}
],
"rejected_bulk_attribute_candidate": {
"enabled_in_production": false,
"equivalent": false,
"bulk_seconds": 0.44640369998523965,
"individual_seconds": 6.037832499889191,
"differences": [
{
"refdes": "RV01",
"bulk_part_label": " ",
"individual_part_label": ""
}
],
"reason": "Space versus empty string semantic mismatch and incomplete full attribute style fields."
},
"initial_failed_host_probe": {
"verified": false,
"reason": "Host predefines VDM_COMP / VDM_COMPPIN / VD_ALL; duplicate declarations opened a script compile error dialog. Generator now omits these declarations.",
"owned_probe_dialog_acknowledged": true,
"owned_cad_exit_code": 0,
"desktop_release_confirmed": true,
"clean_flag": false,
"clean_flag_note": "Probe exception, not cleanup failure; no cleanup errors and desktop confirmation released=true.",
"source_hashes_unchanged": true
},
"test_fixture_correction": "Initial integration run: 201 passed / 13 failed. Extracted VBS guard fixture lacked QPUseNativeSnapshot; corrected fixture and reran the final targeted suite successfully.",
"limitations": [
"One same-source formal run per revision; no general speed guarantee.",
"189.250 seconds remains above the proposed 180-second target.",
"Native read has no per-component external heartbeat; the existing 150-second idle monitor and safe-boundary cancellation remain, so very large pages need separate certification.",
"PCB Cell Name mapping and complex hierarchical/multi-gate cases remain uncertified.",
"1000-step simulated queue performance threshold remains unresolved.",
"No package build or release performed."
],
"raw_evidence_roots": [
"build/native-adapter-20261019",
"build/native-read-formal-bom-20261019",
"build/native-read-ascii-result-20261019",
"build/native-read-ascii-after-recovery-20261019",
"build/native-snapshot-host-20261019",
"build/native-snapshot-host-20261019-v2",
"build/native-snapshot-host-20261019-v3",
"build/bulk-identity-probe-20261019"
]
}
@@ -0,0 +1,255 @@
{
"classification": "local acceptance candidate, no public release",
"source_commit": "e6ec267a26efedbab796207b8044533d02222350",
"exe_sha256": "de21d56084d9adde155311c5679fd4ea2bca7b981e42cc1748fc72dbaba32c45",
"zip_sha256": "aee87aa879b61164731cab9914ea5c84b22f645ef016d55c915fa256db447d7b",
"zip_bytes": 55376574,
"frozen_module_code_checks": {
"dx_productivity.trial_task_center.native_helper": true,
"dx_productivity.trial_task_center.recovery": true,
"dx_productivity.trial_task_center.quick_run": true,
"dx_productivity.trial_task_center.legacy_paths": true,
"dx_productivity.trial_task_center.logging_setup": true,
"dx_productivity.trial_task_center.retention": true,
"dx_productivity.trial_task_center.ui.main_window": true,
"dx_productivity.trial_task_center.ui.dialogs": true
},
"bom_imports": [
{
"file": "BOM-含错误位号.xlsx",
"seconds": 6.202999999979511,
"title": "本批 BOM 校验未通过 · 通过 2 / 失败 1 / 未检查 0 行 · 详情"
},
{
"file": "BOM-替换RV05.xlsx",
"seconds": 3.4380000000237487,
"title": "本批 BOM 校验通过 · 通过 2 / 失败 0 / 未检查 0 行 · 详情"
}
],
"template_columns": 11,
"project_path_lengths": [
362,
135
],
"execution_seconds": 167.0,
"workflow_passed": {
"bom_passed": true,
"execute_passed": true,
"details_passed": true,
"new_round_passed": true
},
"independent_attributes_passed": true,
"graph_verification": {
"Audio_D2128": {
"hier": {
"components": 57,
"pins": 103,
"nets": 22,
"untouched": 56,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true,
"selected_uids": [
"$2I2014"
]
},
"flat": {
"components": 57,
"pins": 103,
"nets": 22,
"untouched": 56,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true,
"selected_uids": [
"$2I2014"
]
}
},
"Audio_T605A": {
"hier": {
"components": 57,
"pins": 103,
"nets": 22,
"untouched": 56,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true,
"selected_uids": [
"$2I2014"
]
},
"flat": {
"components": 57,
"pins": 103,
"nets": 22,
"untouched": 56,
"all_pin_connections_unchanged": true,
"net_graph_unchanged": true,
"selected_uids": [
"$2I2014"
]
}
}
},
"upgrade": {
"legacy_version": "1.1.1",
"task_count": 2,
"candidate_exit_code": 0,
"task_identities_preserved": true,
"legacy_source_unchanged": true,
"fixture_is_metadata_only": true,
"cad_launched": false,
"rules_preserved": true,
"unselected_cells_migrated": true,
"rule_count": 1
},
"source_integrity": {
"tracked_files": 1033,
"changed": [],
"unchanged": true
},
"gui_exit_confirmed": true,
"acceptance_driver_history": [
{
"name": "bom",
"exit_code": 0,
"seconds": 21.04700000002049
},
{
"name": "ascii-before-Audio_D2128",
"exit_code": 0,
"seconds": 1.7349999999860302
},
{
"name": "ascii-before-Audio_T605A",
"exit_code": 0,
"seconds": 3.3119999999762513
},
{
"name": "execute",
"exit_code": 0,
"seconds": 172.125
},
{
"name": "ascii-after-Audio_D2128",
"exit_code": 0,
"seconds": 2.094000000040978
},
{
"name": "ascii-after-Audio_T605A",
"exit_code": 0,
"seconds": 2.25
},
{
"name": "graph",
"exit_code": 1,
"seconds": 0.2809999999590218
},
{
"name": "graph-readonly-continuation",
"exit_code": 0,
"seconds": 0.35899999999674037
},
{
"name": "independent",
"exit_code": 0,
"seconds": 71.15600000001723
},
{
"name": "details",
"exit_code": 0,
"seconds": 5.452999999979511
},
{
"name": "new_round",
"exit_code": 0,
"seconds": 3.672000000020489
},
{
"name": "upgrade",
"exit_code": 0,
"seconds": 2.9060000000172295
}
],
"acceptance_continuations": [
{
"reason": "Graph driver moved out of build directory without importing build/compare_speed_graphs.py; original graph.log preserved. Continue read-only checks only; do not repeat BOM or replacement."
}
],
"simulated_thousand_step_performance": {
"mode": "simulated_worker_with_tracemalloc",
"projects": 20,
"sheets_per_project": 5,
"rules_per_sheet": 10,
"steps": 1000,
"saved_steps": 91,
"elapsed_seconds": 21.09137500001816,
"peak_bytes": 2222949,
"steps_per_second": 47.41274573133041
},
"observations": {
"bom": {
"samples": 90,
"file_read_samples": 90,
"input_desktop_before": "Default",
"input_desktop_after": "Default",
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"cad_exit_confirmed": {},
"desktop_absent": {},
"observer_errors": []
},
"execute": {
"samples": 777,
"file_read_samples": 777,
"input_desktop_before": "Default",
"input_desktop_after": "Default",
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"cad_exit_confirmed": {
"48256": true,
"57156": true
},
"desktop_absent": {
"dx-41f857133ad944d0bd505353f08d3f01": true,
"dx-018deea03c1f4919881c5240d37f2182": true
},
"observer_errors": []
},
"independent": {
"samples": 318,
"file_read_samples": 318,
"input_desktop_before": "Default",
"input_desktop_after": "Default",
"owned_cad_became_foreground": false,
"owned_cad_on_input_desktop": false,
"cad_exit_confirmed": {
"57156": true,
"48256": true,
"5152": true,
"53048": true
},
"desktop_absent": {
"dx-018deea03c1f4919881c5240d37f2182": true,
"dx-41f857133ad944d0bd505353f08d3f01": true,
"dx-d7b2ebad35374423924e1d7fd2378905": true,
"dx-ce18687b705b488ea4d683cb531659ee": true
},
"observer_errors": []
}
},
"native_optional_cell_evidence": [
{
"task_id": "38038e44-19e7-4bb7-803a-92f12452056b",
"stage": "native_replace_verified",
"ok": true,
"target_cell_absent": true,
"cell_catalog_absent": true
},
{
"task_id": "69408849-1dc0-4461-a832-cfff3d599576",
"stage": "native_replace_verified",
"ok": true,
"target_cell_absent": true,
"cell_catalog_absent": true
}
]
}
@@ -0,0 +1,61 @@
task_id,timestamp_utc,sequence,job_id,state,project_path,phase,seconds,unit,completed_units,units_per_minute,layer
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:21:57.586568Z,2,,completed,,prepare_queue,0.2933511000010185,step,1,204.53306634879394,controller
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:21:57.875044Z,3,,completed,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,backup_project,0.2834288000012748,operation,1,211.69337766567878,controller
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.854313Z,4,96ec66e001f94e098da54b11f9b35d16_0,completed,,persist_progress,0.009893600014038384,operation,1,6064.52655402117,controller
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,execute_step,78.95781620003982,step,1,0.7598994360227727,controller
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,starting,0.25,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,session_startup,1.1410000000032596,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,check_project,0.03200000000651926,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,open_project,14.73399999999674,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,open_sheet,2.49900000001071,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,session_ready,0.03200000000651926,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,query_components,0.031000000017229468,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,find_components,0.8279999999795109,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,native_snapshot_read,3.345000000030268,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,capture,1.375,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,before_native,0.0,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,native_replace,20.0,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,restore_preflight,0.5469999999622814,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,index_components,1.3269999999902211,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,index_pins,4.186999999976251,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,snapshot_attributes,0.25,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,before_restore_transaction,1.0,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,restore_attribute_fields,3.5,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,restore_attributes,0.0,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,verify_restoration,0.625,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,verify_attribute_fields,0.7970000000204891,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,finished,0.6089999999967404,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,save_and_close,2.077999999979511,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,verify_saved_project,0.01600000000325963,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:16.858088Z,5,96ec66e001f94e098da54b11f9b35d16_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj,session_wait,0.0,,,,native_worker
38038e44-19e7-4bb7-803a-92f12452056b,2026-10-19T09:23:21.488511Z,6,,completed,,task_total,84.20143710001139,task,1,0.7125769115880314,controller
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:20:35.453195Z,2,,completed,,prepare_queue,0.4754520000424236,step,1,126.19570428696551,controller
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:20:35.822590Z,3,,completed,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,backup_project,0.3581292000017129,operation,1,167.53730217952915,controller
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.728159Z,4,53049ec1a2354428a29cd237a081beb9_0,completed,,persist_progress,0.012782500009052455,operation,1,4693.917461960377,controller
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,execute_step,76.88183229998685,step,1,0.7804184448399295,controller
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,starting,0.23499999998603016,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,session_startup,0.9839999999967404,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,check_project,0.03200000000651926,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,open_project,10.48300000000745,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,open_sheet,4.12599999998929,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,session_ready,0.0470000000204891,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,query_components,0.031000000017229468,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,find_components,0.8910000000032596,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,native_snapshot_read,3.1249999999417923,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,capture,1.547000000020489,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,before_native,0.01600000000325963,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,native_replace,19.85899999999674,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,restore_preflight,0.4839999999385327,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,index_components,1.2810000000172295,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,index_pins,4.342999999993481,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,snapshot_attributes,0.2970000000204891,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,before_restore_transaction,1.2040000000270084,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,restore_attribute_fields,4.48399999999674,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,restore_attributes,0.01600000000325963,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,verify_restoration,0.7650000000139698,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,verify_attribute_fields,0.8439999999827705,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,finished,0.6560000000172295,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,save_and_close,1.8439999999827705,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,verify_saved_project,0.0,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:52.732171Z,5,53049ec1a2354428a29cd237a081beb9_0,saved_ok,F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj,session_wait,0.0,,,,native_worker
69408849-1dc0-4461-a832-cfff3d599576,2026-10-19T09:21:57.248462Z,6,,completed,,task_total,82.28183499997249,task,1,0.7292010441918324,controller
1 task_id timestamp_utc sequence job_id state project_path phase seconds unit completed_units units_per_minute layer
2 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:21:57.586568Z 2 completed prepare_queue 0.2933511000010185 step 1 204.53306634879394 controller
3 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:21:57.875044Z 3 completed F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj backup_project 0.2834288000012748 operation 1 211.69337766567878 controller
4 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.854313Z 4 96ec66e001f94e098da54b11f9b35d16_0 completed persist_progress 0.009893600014038384 operation 1 6064.52655402117 controller
5 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj execute_step 78.95781620003982 step 1 0.7598994360227727 controller
6 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj starting 0.25 native_worker
7 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj session_startup 1.1410000000032596 native_worker
8 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj check_project 0.03200000000651926 native_worker
9 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj open_project 14.73399999999674 native_worker
10 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj open_sheet 2.49900000001071 native_worker
11 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj session_ready 0.03200000000651926 native_worker
12 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj query_components 0.031000000017229468 native_worker
13 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj find_components 0.8279999999795109 native_worker
14 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj native_snapshot_read 3.345000000030268 native_worker
15 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj capture 1.375 native_worker
16 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj before_native 0.0 native_worker
17 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj native_replace 20.0 native_worker
18 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj restore_preflight 0.5469999999622814 native_worker
19 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj index_components 1.3269999999902211 native_worker
20 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj index_pins 4.186999999976251 native_worker
21 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj snapshot_attributes 0.25 native_worker
22 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj before_restore_transaction 1.0 native_worker
23 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj restore_attribute_fields 3.5 native_worker
24 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj restore_attributes 0.0 native_worker
25 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj verify_restoration 0.625 native_worker
26 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj verify_attribute_fields 0.7970000000204891 native_worker
27 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj finished 0.6089999999967404 native_worker
28 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj save_and_close 2.077999999979511 native_worker
29 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj verify_saved_project 0.01600000000325963 native_worker
30 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:16.858088Z 5 96ec66e001f94e098da54b11f9b35d16_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_T605A\Audio_T605A.prj session_wait 0.0 native_worker
31 38038e44-19e7-4bb7-803a-92f12452056b 2026-10-19T09:23:21.488511Z 6 completed task_total 84.20143710001139 task 1 0.7125769115880314 controller
32 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:20:35.453195Z 2 completed prepare_queue 0.4754520000424236 step 1 126.19570428696551 controller
33 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:20:35.822590Z 3 completed F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj backup_project 0.3581292000017129 operation 1 167.53730217952915 controller
34 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.728159Z 4 53049ec1a2354428a29cd237a081beb9_0 completed persist_progress 0.012782500009052455 operation 1 4693.917461960377 controller
35 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj execute_step 76.88183229998685 step 1 0.7804184448399295 controller
36 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj starting 0.23499999998603016 native_worker
37 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj session_startup 0.9839999999967404 native_worker
38 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj check_project 0.03200000000651926 native_worker
39 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj open_project 10.48300000000745 native_worker
40 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj open_sheet 4.12599999998929 native_worker
41 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj session_ready 0.0470000000204891 native_worker
42 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj query_components 0.031000000017229468 native_worker
43 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj find_components 0.8910000000032596 native_worker
44 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj native_snapshot_read 3.1249999999417923 native_worker
45 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj capture 1.547000000020489 native_worker
46 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj before_native 0.01600000000325963 native_worker
47 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj native_replace 19.85899999999674 native_worker
48 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj restore_preflight 0.4839999999385327 native_worker
49 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj index_components 1.2810000000172295 native_worker
50 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj index_pins 4.342999999993481 native_worker
51 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj snapshot_attributes 0.2970000000204891 native_worker
52 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj before_restore_transaction 1.2040000000270084 native_worker
53 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj restore_attribute_fields 4.48399999999674 native_worker
54 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj restore_attributes 0.01600000000325963 native_worker
55 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj verify_restoration 0.7650000000139698 native_worker
56 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj verify_attribute_fields 0.8439999999827705 native_worker
57 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj finished 0.6560000000172295 native_worker
58 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj save_and_close 1.8439999999827705 native_worker
59 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj verify_saved_project 0.0 native_worker
60 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:52.732171Z 5 53049ec1a2354428a29cd237a081beb9_0 saved_ok F:\Sync Tool Skyworth\Work Maps\dxdesigner-part-replacement\build\packaged-optional-final-20261019\projects\Audio_D2128\long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-long-project-folder-\engineering-copy-engineering-copy-engineering-copy-engineering-copy-engineering-copy-\Audio_D2128.prj session_wait 0.0 native_worker
61 69408849-1dc0-4461-a832-cfff3d599576 2026-10-19T09:21:57.248462Z 6 completed task_total 82.28183499997249 task 1 0.7292010441918324 controller
Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

+29
View File
@@ -0,0 +1,29 @@
# 在料号规则中选择目标封装
此功能属于当前开发分支,尚未打包到 V1.1.2 下载包。
一个新料号可能关联多个合法封装。目标 Cell Name 为可选项:留空可以直接执行,工具不主动覆写封装,可后续与中心库同步;原生替换本身可能更新库关联属性,因此留空不承诺封装保持不变。需要本次指定封装时,再读取并明确选择;工具不会自动选第一个候选。升级前的规则保留为空,不需要为执行而补选。
## 配置步骤
1. 创建工程任务,打开顶部 **本批料号规则**,添加或编辑旧、新料号。
2. 无需本次修改封装时,保留 **不指定封装(可选)** 即可。如需指定,点击 **读取封装**,等待后台读取中央库,再明确选择一项;不会自动选择单一候选。
3. 保存规则,在 **本批料号规则** 中核对对应旧、新料号的 **目标封装**。直接采集位号或导入 BOM,保存计划后执行。
![目标封装规则编辑器](media/target-cell-rule-editor.png)
也可以先导入并保存 BOM,再添加与计划中旧、新料号一致的规则并选择封装。相同映射中尚未选择封装的计划行会补齐;已有独立选择、自定义 Value、NC 和位号勾选会保留。手动修改计划的新料号后,原封装选择会清空;需要本次指定封装时,再到对应规则重新配置。
默认 BOM 继续使用原来的 **11 列**,没有增加封装列。同批规则由所有任务共享,候选取本批各工程中央库的共同可用项;无共同候选时,需要检查库配置或将工程分成不同批次。
## 读取和执行结果
读取期间可以继续操作界面。更换新料号、改变工程范围或关闭弹窗后,旧请求返回的结果不会覆盖新选择。失败后可以再次点击 **读取封装**。已有 Library Manager 正在运行时,请关闭它后重试候选读取。
工具通过中央库副本读取关联,不打开原库进行编辑。首次读取可能较慢;本机样例冷读取约 84 秒,缓存命中约 2~4 秒,其他机器和库不保证相同时间。只有明确选择封装的步骤会执行库目录核验;留空步骤不读取封装目录、不等待 Library Manager。已选择时,执行前和原生替换提交前都只复用已核验缓存,并重新核对实际工程的完整源库指纹与所选候选。缓存缺失、损坏或源库变化时,会在替换提交前停止,提示 **请在料号规则中重新读取目标封装**;重新读取并核对选择后再执行。
明确选择时,替换后显式写入选定的 Cell Name,并在保存前和磁盘重开后检查有效值。成功日志包含 `Target Cell verified` 及所选封装。属性写入、保存或回读不符合要求时,不会给出已保存成功结果。
有中断或状态不确定的旧轮次时,先使用原版本完成核验恢复再升级。未选封装的记录仍按原事务证据恢复,不增加封装成功声明;已选封装的记录必须保留并核对原封装证据。
当前版本的中断任务仍保持保护时,规则编辑可能被锁定。使用 **核验恢复** 后,只有原事务明确选择封装时,工具才会在启动恢复 CAD 前独立预检封装;缓存被删除或失效时,可通过库副本重新读取,沿用读取器的互斥等待和工作进程超时限制。预检必须与原事务的源库、指纹、料号、分区、完整候选及封装选择完全一致;不一致或读取失败时保留保护,不启动恢复 CAD。原生替换过程仍只允许复用已核验缓存。
+6 -4
View File
@@ -1,8 +1,8 @@
# DxPartReplace V1.1.2 中文使用说明
# DxPartReplace V1.1.3 中文使用说明
V1.1.0 沿用原有任务视图和料号规则编辑,增加按工程拆分的任务、按位号选择的替换计划及可选 Excel 操作。
保留原有任务视图和料号规则编辑,支持按工程拆分任务、按位号选择替换目标及可选 Excel 操作。
[窗口 GIF 操作教程](media/v1.1.2-window-bom-tutorial.gif):创建任务、导出/导入 BOM、错误行提示、保存、顺序执行、查看结果和开始新一轮。仅含工具窗口及其弹窗,实际 CAD 等待已压缩。
第一次使用请先看 [README 逐步图文教程](../../README.md#图文教程),按截图完成创建任务、BOM、替换和结果查看。以下内容用于补充查询各项规则。
## 日常流程
@@ -31,7 +31,9 @@ V1.1.0 沿用原有任务视图和料号规则编辑,增加按工程拆分的
导入先核对所有工程归属,再按工程匹配位号;缺少清单时,按该工程 BOM 中的旧料号只读采集。不会执行替换。切换任务可查看、编辑各自预览,点击“保存本批位号计划”才一次写入所有受影响任务。保存失败全部回滚,预览期间不改已保存计划。工程、图页、UID、位号、旧料号及原 Value 用于身份校验,未知工程、重复器件或跨工程目标都会拒绝;不接受公式。布尔选项可使用 TRUE/FALSE 或 是/否。
BOM 首次采集或新增的位号默认“不替换”;已有计划中未列出的行保留原勾选和编辑状态,不会因后续 BOM 省略而自动停用。如果本次仅执行 BOM 列出的目标,请在预览中检查并取消其他启用行,或在 BOM 中显式填写对应的 `enabled=FALSE` 行。每个填写的位号须在当前工程清单中唯一匹配;同名位号跨图页时应填写图页或 UID。导入失败不会改变已保存计划。
V1.1.3 已包含原生采集:本机有兼容的 `icdb2ascii.exe` 时,BOM 校验和位号采集优先在临时数据库副本中一次导出真实 UID、位号及物料属性,不必逐条启动 CAD 查找。工具不可用或报告不受支持且已安全清理时,自动使用原 CAD 采集。源工程变化或后台清理不确定时停止并保留诊断;完整图页查询和实际替换仍沿用原执行链。运行前请保存并关闭目标工程。详情见 [原生采集接入记录](../research/2026-10-16-native-cli-integration.md)。
首次采集中未被 BOM 列为替换目标的位号默认“不替换”;已有计划中未列出的行保留原勾选和编辑状态,不会因后续 BOM 省略而自动停用。如果本次仅执行 BOM 列出的目标,请在预览中检查并取消其他启用行,或在 BOM 中显式填写对应的 `enabled=FALSE` 行。每个填写的位号须在当前工程清单中唯一匹配;同名位号跨图页时应填写图页或 UID。导入失败不会改变已保存计划。
“同步 NC”默认勾选,可以按行关闭;仅按原规则识别独立 `/NC` 标记。Value 复制选项和每行自定义 Value 延续原工具的处理方式。替换计划不允许旧、新料号相同,也不允许同批链式或循环替换。
@@ -0,0 +1,319 @@
' Read-only native-host adapter. Appended to the external worker at preparation.
Function QPNativeReadUntouched(ByRef SelectedUids)
Set QPNativeReadUntouched = QPNativeRead(SelectedUids, False)
End Function
Function QPNativeCapture(ByRef SelectedUids)
Set QPNativeCapture = QPNativeRead(SelectedUids, True)
End Function
Function QPNativeRead(ByRef SelectedUids, ByVal CaptureSelected)
Dim Token, Base, ScriptPath, ResultPath, Stream, CommandPath, Text
Dim Project, Sheet, Guid, Safe, Result
Set QPNativeRead = Nothing
Project = QPProjectPath()
Sheet = QPSheetIdentity()
Guid = CStr(QP_App.Guid())
Token = CStr(QP_AttemptToken) & "-" & CStr(QP_ProgressSequence) & "-" & QP_Fso.GetTempName()
Base = QP_Fso.BuildPath(QP_Root, "native-read-" & Token)
ScriptPath = Base & ".vbs"
ResultPath = Base & ".tsv"
Safe = Not CBool(QP_NativeMutationPossible) And Not CBool(QP_RestoreTransactionOpen) And Not CBool(QP_NativeCallActive)
Text = QPBuildNativeReadScript(QPReadUtf8(WScript.ScriptFullName), SelectedUids, _
Token, Project, Sheet, Guid, ResultPath, CStr(QP_AttemptToken), Safe, CaptureSelected)
' Generated source is ASCII; Unicode values are escaped with QPEncode.
Set Stream = QP_Fso.CreateTextFile(ScriptPath, False, False)
Stream.Write Text
Stream.Close
CommandPath = QP_Fso.GetFile(ScriptPath).ShortPath
If Not QPNativeCommandPathSupported(CommandPath) Then
QPLog QP_Root, "INFO", "native_read_path_unavailable; using external full read"
Exit Function
End If
QPProgress "native_snapshot_read", 0, 0
If Not QP_App.ExecuteCommand("run " & CommandPath) Then _
Err.Raise vbObjectError + 875, "QuickPartReplace.NativeRead", "native script command failed"
If Not QP_Fso.FileExists(ResultPath) Then _
Err.Raise vbObjectError + 875, "QuickPartReplace.NativeRead", "native script returned no complete result"
If CaptureSelected Then
Set Result = QPParseNativeCapture(QPReadUtf8(ResultPath), Token, Project, Sheet, SelectedUids)
Else
Set Result = QPParseNativeSnapshot(QPReadUtf8(ResultPath), Token, Project, Sheet, SelectedUids)
End If
If CStr(QP_App.Guid()) <> Guid Or QPProjectPath() <> Project Or QPSheetIdentity() <> Sheet Then _
Err.Raise vbObjectError + 875, "QuickPartReplace.NativeRead", "context changed after native read"
QPProgress "native_snapshot_read", Result("total"), Result("total")
QPLog QP_Root, "INFO", "native_snapshot_verified components=" & CStr(Result("total")) & " token=" & Token
Set QPNativeRead = Result
End Function
Function QPNativeCommandPathSupported(ByVal Path)
Dim Index, Code
QPNativeCommandPathSupported = False
For Index = 1 To Len(Path)
Code = AscW(Mid(Path, Index, 1))
If Code <= 32 Or Code > 126 Or Code = 34 Then Exit Function
Next
QPNativeCommandPathSupported = (Len(Path) > 0)
End Function
Function QPParseNativeCapture(ByVal Text, ByVal Token, ByVal Project, ByVal Sheet, ByRef SelectedUids)
Dim Lines, Index, Fields, State, Uid, Targets, BaseText, SeenEnd, Result, Last
If Left(Text, 6) = "ERROR" & vbTab Then
Set QPParseNativeCapture = QPParseNativeSnapshot(Text, Token, Project, Sheet, SelectedUids)
Exit Function
End If
Lines = Split(Text, vbCrLf)
Fields = Split(Lines(0), vbTab)
If Fields(0) <> "NR2" Then QPNativeReadInvalid "missing selected capture header"
Lines(0) = "NR1" & Mid(Lines(0), 4)
Set Targets = CreateObject("Scripting.Dictionary")
BaseText = Lines(0) & vbCrLf
SeenEnd = False
Last = UBound(Lines)
If Lines(Last) = "" Then Last = Last - 1
For Index = 1 To Last
Fields = Split(Lines(Index), vbTab)
If Fields(0) = "T" Then
If SeenEnd Or UBound(Fields) <> 2 Then QPNativeReadInvalid "invalid selected capture row"
Uid = QPDecode(Fields(1))
If Not SelectedUids.Exists(Uid) Or Targets.Exists(Uid) Then _
QPNativeReadInvalid "duplicate or foreign selected capture UID"
State = QPDecode(Fields(2))
QPValidateNativeSelectedState State, Uid
Targets.Add Uid, State
Else
If Fields(0) = "END" Then SeenEnd = True
BaseText = BaseText & Lines(Index) & vbCrLf
End If
Next
If Targets.Count <> SelectedUids.Count Then QPNativeReadInvalid "selected capture missing target"
Set Result = QPParseNativeSnapshot(BaseText, Token, Project, Sheet, SelectedUids)
Result.Add "selected", Targets
Set QPParseNativeCapture = Result
End Function
Sub QPValidateNativeSelectedState(ByVal State, ByVal Uid)
Dim Lines, Fields, Index, Names, Name
If Right(State, 2) <> vbCrLf Then QPNativeReadInvalid "truncated selected component state"
Lines = Split(State, vbCrLf)
If UBound(Lines) < 2 Then QPNativeReadInvalid "selected component has no attributes"
Fields = Split(Lines(0), vbTab)
If UBound(Fields) <> 7 Then QPNativeReadInvalid "invalid selected component fields"
If Fields(0) <> "C" Or QPDecode(Fields(1)) <> Uid Then QPNativeReadInvalid "selected component owner mismatch"
Set Names = CreateObject("Scripting.Dictionary")
For Index = 1 To UBound(Lines) - 1
Fields = Split(Lines(Index), vbTab)
If UBound(Fields) <> 11 Then QPNativeReadInvalid "invalid selected attribute fields"
If Fields(0) <> "A" Or QPDecode(Fields(1)) <> Uid Then QPNativeReadInvalid "selected attribute owner mismatch"
Name = QPDecode(Fields(2))
If Len(Name) = 0 Or Names.Exists(Name) Then QPNativeReadInvalid "duplicate or empty selected attribute name"
Names.Add Name, True
Next
End Sub
Function QPTryNativeVerifyUntouched(ByRef Records)
Dim Selected, Record, Index, Actual
QPTryNativeVerifyUntouched = False
QPRequireRecordsContext Records
Set Selected = CreateObject("Scripting.Dictionary")
For Index = 0 To Records("components").Count - 1
Set Record = Records("components").Item(CStr(Index))
Selected.Add CStr(Record("uid")), True
Next
Set Actual = QPNativeReadUntouched(Selected)
If Actual Is Nothing Then Exit Function
QPRequireRecordsContext Records
QPCompareNativeUntouched Records, Actual
QPTryNativeVerifyUntouched = True
End Function
Sub QPCompareNativeUntouched(ByRef Records, ByRef Actual)
Dim Baseline, FullBaseline, Rows, Uid, Expected
Set Baseline = Records("untouched")
Set FullBaseline = Records("untouched_full")
Set Rows = Actual("rows")
If Actual("total") <> Baseline.Count + Records("components").Count Or Rows.Count <> Baseline.Count Then _
QPNativeReadInvalid "component count changed outside selected targets"
For Each Uid In Baseline.Keys
If Not Rows.Exists(Uid) Or Not FullBaseline.Exists(Uid) Then QPNativeReadInvalid "unselected component missing"
Expected = CStr(Baseline(Uid)) & vbCrLf & "G" & vbTab & QPEncode(Uid) & vbTab & _
QPEncode(CStr(FullBaseline(Uid))) & vbCrLf
If Rows(Uid) <> Expected Then QPNativeReadInvalid "unselected component changed"
Next
End Sub
Function QPParseNativeSnapshot(ByVal Text, ByVal Token, ByVal Project, ByVal Sheet, ByRef SelectedUids)
Dim Lines, Fields, Last, Index, Uid, Identity, State, Pair, Rows, Result, Total
Set Rows = CreateObject("Scripting.Dictionary")
Lines = Split(Text, vbCrLf)
Last = UBound(Lines)
If Last > 0 Then
If Lines(Last) = "" Then Last = Last - 1
End If
Fields = Split(Lines(0), vbTab)
If Fields(0) = "ERROR" Then
If UBound(Fields) <> 4 Then QPNativeReadInvalid "malformed error frame"
If Fields(1) <> Token Then QPNativeReadInvalid "stale error token"
Err.Raise CLng(Fields(2)), QPDecode(Fields(3)), QPDecode(Fields(4))
End If
If UBound(Fields) <> 3 Then QPNativeReadInvalid "missing native header"
If Fields(0) <> "NR1" Or Fields(1) <> Token Or QPDecode(Fields(2)) <> Project Or _
QPDecode(Fields(3)) <> Sheet Then QPNativeReadInvalid "native header context mismatch"
If Last < 1 Then QPNativeReadInvalid "truncated native result"
Fields = Split(Lines(Last), vbTab)
If UBound(Fields) <> 2 Then QPNativeReadInvalid "missing completion frame"
If Fields(0) <> "END" Or Fields(1) <> Token Then QPNativeReadInvalid "missing completion token"
If Len(Fields(2)) = 0 Then QPNativeReadInvalid "invalid component count"
For Index = 1 To Len(Fields(2))
If InStr(1, "0123456789", Mid(Fields(2), Index, 1), vbBinaryCompare) = 0 Then _
QPNativeReadInvalid "invalid component count"
Next
Total = CLng(Fields(2))
Index = 1
Do While Index < Last
If Index + 1 >= Last Then QPNativeReadInvalid "incomplete U/G pair"
Fields = Split(Lines(Index), vbTab)
If UBound(Fields) <> 6 Then QPNativeReadInvalid "malformed identity row"
If Fields(0) <> "U" Then QPNativeReadInvalid "unexpected native row"
Uid = QPDecode(Fields(1))
If Len(Uid) = 0 Then QPNativeReadInvalid "empty component UID"
If SelectedUids.Exists(Uid) Or Rows.Exists(Uid) Then QPNativeReadInvalid "duplicate or selected UID in unselected result"
Identity = Lines(Index)
Fields = Split(Lines(Index + 1), vbTab)
If UBound(Fields) <> 2 Then QPNativeReadInvalid "malformed full-state row"
If Fields(0) <> "G" Or QPDecode(Fields(1)) <> Uid Then QPNativeReadInvalid "full-state owner mismatch"
State = QPDecode(Fields(2))
If Len(State) = 0 Or QPUntouchedIdentity(State) <> Identity Then QPNativeReadInvalid "full-state identity mismatch"
Pair = Identity & vbCrLf & Lines(Index + 1) & vbCrLf
Rows.Add Uid, Pair
Index = Index + 2
Loop
If Rows.Count + SelectedUids.Count <> Total Then QPNativeReadInvalid "component total mismatch"
Set Result = CreateObject("Scripting.Dictionary")
Result.Add "total", Total
Result.Add "rows", Rows
Text = ""
For Each Uid In Rows.Keys
Text = Text & Rows(Uid)
Next
Result.Add "text", Text
Set QPParseNativeSnapshot = Result
End Function
Sub QPNativeReadInvalid(ByVal Description)
Err.Raise vbObjectError + 875, "QuickPartReplace.NativeRead", Description
End Sub
Function QPNativeCollect(ByRef SelectedUids, ByVal Token, ByVal Project, ByVal Sheet, ByVal Guid)
QPNativeCollect = QPNativeCollectMode(SelectedUids, Token, Project, Sheet, Guid, False)
End Function
Function QPNativeCollectMode(ByRef SelectedUids, ByVal Token, ByVal Project, ByVal Sheet, ByVal Guid, ByVal CaptureSelected)
Dim Components, Comp, Uid, Seen, Found, Text, Count
QPNativeRequireContext Project, Sheet, Guid
QPInvalidatePinIndex
Set Components = QP_App.ActiveView.Query(VDM_COMP, VD_ALL)
Set Seen = CreateObject("Scripting.Dictionary")
Set Found = CreateObject("Scripting.Dictionary")
Text = "NR1" & vbTab & Token & vbTab & QPEncode(Project) & vbTab & QPEncode(Sheet) & vbCrLf
If CaptureSelected Then Text = "NR2" & Mid(Text, 4)
Count = 0
QPProgress "native_snapshot_read", 0, Components.Count
For Each Comp In Components
Uid = CStr(Comp.UID)
If Len(Uid) = 0 Or Seen.Exists(Uid) Then QPNativeReadInvalid "duplicate or empty component UID"
Seen.Add Uid, True
If SelectedUids.Exists(Uid) Then
Found.Add Uid, True
If CaptureSelected Then Text = Text & "T" & vbTab & QPEncode(Uid) & vbTab & QPEncode(QPSnapshotComponent(Comp)) & vbCrLf
Else
Text = Text & QPUntouchedComponent(Comp)
End If
Count = Count + 1
QPProgress "native_snapshot_read", Count, Components.Count
Next
If Found.Count <> SelectedUids.Count Then QPNativeReadInvalid "selected component missing from native read"
QPNativeRequireContext Project, Sheet, Guid
QPNativeCollectMode = Text & "END" & vbTab & Token & vbTab & CStr(Count) & vbCrLf
End Function
Sub QPNativeRequireContext(ByVal Project, ByVal Sheet, ByVal Guid)
If CStr(QP_App.Guid()) <> Guid Then QPNativeReadInvalid "foreign CAD GUID"
If QPProjectPath() <> Project Or QPSheetIdentity() <> Sheet Then QPNativeReadInvalid "native CAD context mismatch"
End Sub
Function QPBuildNativeSnapshotScript(ByVal Source, ByRef SelectedUids, ByVal Token, ByVal Project, ByVal Sheet, ByVal Guid, ByVal ResultPath, ByVal StopToken, ByVal Safe)
QPBuildNativeSnapshotScript = QPBuildNativeReadScript(Source, SelectedUids, Token, Project, Sheet, Guid, ResultPath, StopToken, Safe, False)
End Function
Function QPBuildNativeReadScript(ByVal Source, ByRef SelectedUids, ByVal Token, ByVal Project, ByVal Sheet, ByVal Guid, ByVal ResultPath, ByVal StopToken, ByVal Safe, ByVal CaptureSelected)
Dim Header, Body, Names, Name, Uid, Pattern, Matches, MonitorJob
Header = Left(Source, InStr(Source, "Set QP_Fso =") - 1)
Set Pattern = CreateObject("VBScript.RegExp")
Pattern.Global = True
Pattern.MultiLine = True
Pattern.Pattern = "^Const (VDM_COMP|VDM_COMPPIN|VD_ALL) = [^\r\n]*\r?\n"
Header = Pattern.Replace(Header, "")
MonitorJob = QP_ExpectedJobId
If QP_SessionMode Then MonitorJob = QP_MonitorJobId
Body = Header & vbCrLf & "Dim QP_NR_Selected, QP_NR_Text, QP_NR_Code, QP_NR_Source, QP_NR_Description, QP_NR_Safe" & vbCrLf & _
"Dim QP_NR_MonitorJob, QP_NR_CurrentJob, QP_NR_ParentSequence, QP_NR_Sequence, QP_NR_LastProgress" & vbCrLf & _
"Set QP_Fso=CreateObject(""Scripting.FileSystemObject"")" & vbCrLf & _
"QP_Root=" & QPNativeExpression(QP_Root) & vbCrLf & _
"QP_AttemptToken=" & QPNativeExpression(StopToken) & vbCrLf & _
"QP_NR_Safe=" & CStr(CBool(Safe)) & vbCrLf & _
"QP_NR_MonitorJob=" & QPNativeExpression(MonitorJob) & vbCrLf & _
"QP_NR_CurrentJob=" & QPNativeExpression(QP_ExpectedJobId) & vbCrLf & _
"QP_NR_ParentSequence=" & CStr(CLng(QP_ProgressSequence) + 1) & vbCrLf & _
"QP_NR_Sequence=0:QP_NR_LastProgress=-1" & vbCrLf & _
"Set QP_NR_Selected=CreateObject(""Scripting.Dictionary"")" & vbCrLf
For Each Uid In SelectedUids.Keys
Body = Body & "QP_NR_Selected.Add " & QPNativeExpression(Uid) & ",True" & vbCrLf
Next
Body = Body & "On Error Resume Next" & vbCrLf & _
"Set QP_App=GetObject(,""Viewdraw.Application"")" & vbCrLf & _
"If Err.Number=0 Then QP_NR_Text=QPNativeCollectMode(QP_NR_Selected," & _
QPNativeExpression(Token) & "," & QPNativeExpression(Project) & "," & QPNativeExpression(Sheet) & "," & QPNativeExpression(Guid) & "," & CStr(CBool(CaptureSelected)) & ")" & vbCrLf & _
"QP_NR_Code=Err.Number: QP_NR_Source=Err.Source: QP_NR_Description=Err.Description" & vbCrLf & _
"Err.Clear" & vbCrLf & _
"If QP_NR_Code<>0 Then QP_NR_Text=""ERROR"" & vbTab & " & QPNativeExpression(Token) & _
" & vbTab & CStr(QP_NR_Code) & vbTab & QPEncode(QP_NR_Source) & vbTab & QPEncode(QP_NR_Description) & vbCrLf" & vbCrLf & _
"QPWriteUtf8 " & QPNativeExpression(ResultPath) & ",QP_NR_Text" & vbCrLf & "On Error GoTo 0" & vbCrLf
Names = Split("QPNativeCollectMode QPNativeRequireContext QPNativeReadInvalid QPSnapshotComponent QPUntouchedComponent QPUntouchedFullState QPUntouchedIdentity QPComponentPins QPInvalidatePinIndex QPConnectionSignatureFromPins QPAddSortedSignature QPSnapshotAttribute QPOptionalAttributeField QPSortSnapshotLines QPEncode QPDecode QPProjectPath QPSheetIdentity QPCanonicalPath QPEnsureProjectAccess QPReadUtf8 QPWriteUtf8", " ")
Pattern.Global = False
For Each Name In Names
Pattern.Pattern = "^(Function|Sub) " & Name & "\([^\n]*\n[\s\S]*?^End \1[ \t]*"
Set Matches = Pattern.Execute(Source)
If Matches.Count <> 1 Then QPNativeReadInvalid "missing native read routine: " & Name
Body = Body & vbCrLf & Matches(0).Value & vbCrLf
Next
Body = Body & vbCrLf & "Sub QPLog(ByVal Root,ByVal Level,ByVal Message)" & vbCrLf & "End Sub" & vbCrLf & _
"Sub QPProgress(ByVal Stage,ByVal Done,ByVal Total)" & vbCrLf & _
" Dim StopPath,Elapsed,CurrentTime,ProgressPath,Stream,SafeFlag" & vbCrLf & _
" If QP_NR_Safe And Len(QP_AttemptToken)>0 Then" & vbCrLf & _
" StopPath=QP_Fso.BuildPath(QP_Root,""monitor-"" & QP_AttemptToken & "".stop"")" & vbCrLf & _
" If QP_Fso.FileExists(StopPath) Then" & vbCrLf & _
" If Trim(QPReadUtf8(StopPath))=QP_AttemptToken Then Err.Raise vbObjectError+860,""QuickPartReplace.SafeStop"",""native read stopped at safe boundary""" & vbCrLf & _
" End If" & vbCrLf & " End If" & vbCrLf & _
" If Len(QP_AttemptToken)=0 Then Exit Sub" & vbCrLf & _
" CurrentTime=Timer:Elapsed=CurrentTime-QP_NR_LastProgress" & vbCrLf & _
" If Elapsed<0 Then Elapsed=Elapsed+86400" & vbCrLf & _
" If QP_NR_LastProgress>=0 And Elapsed<1 And Not (Total>0 And Done=Total) Then Exit Sub" & vbCrLf & _
" SafeFlag=0:If QP_NR_Safe Then SafeFlag=1" & vbCrLf & _
" QP_NR_Sequence=QP_NR_Sequence+1" & vbCrLf & _
" ProgressPath=QP_Fso.BuildPath(QP_Root,""monitor-"" & QP_AttemptToken & "".native-progress"")" & vbCrLf & _
" On Error Resume Next" & vbCrLf & _
" Set Stream=QP_Fso.CreateTextFile(ProgressPath,True,False)" & vbCrLf & _
" Stream.WriteLine ""DX_NATIVE_PROGRESS"" & vbTab & QP_AttemptToken & vbTab & QP_NR_MonitorJob & vbTab & _" & vbCrLf & _
" CStr(QP_NR_ParentSequence) & vbTab & QP_NR_CurrentJob & vbTab & CStr(QP_NR_Sequence) & vbTab & _" & vbCrLf & _
" CStr(Done) & vbTab & CStr(Total) & vbTab & CStr(SafeFlag)" & vbCrLf & _
" Stream.Close:Err.Clear" & vbCrLf & " On Error GoTo 0" & vbCrLf & _
" QP_NR_LastProgress=CurrentTime" & vbCrLf & "End Sub" & vbCrLf
QPBuildNativeReadScript = Body
End Function
Function QPNativeExpression(ByVal Value)
QPNativeExpression = "QPDecode(" & Chr(34) & Replace(QPEncode(Value), Chr(34), Chr(34) & Chr(34)) & Chr(34) & ")"
End Function
+379 -129
View File
@@ -401,30 +401,51 @@ Sub QPAddComponentIndexEntry(ByRef Index, ByVal Key, ByRef Comp)
End Sub
Sub QPBuildComponentIndex(ByRef Components)
Dim Uids, Refdeses, Locations, Comp, Point, Context, Refdes, Count
Dim Uids, Comp, Context, Count
Context = QPCanonicalPath(QPProjectPath()) & "|" & QPSheetIdentity()
Set Uids = CreateObject("Scripting.Dictionary")
Set Refdeses = CreateObject("Scripting.Dictionary")
Set Locations = CreateObject("Scripting.Dictionary")
Count = 0
For Each Comp In Components
QPAddComponentIndexEntry Uids, CStr(Comp.UID), Comp
Refdes = CStr(Comp.Refdes)
If Len(Refdes) > 0 Then QPAddComponentIndexEntry Refdeses, Refdes, Comp
Set Point = Comp.GetLocation()
QPAddComponentIndexEntry Locations, CStr(Point.X) & "|" & CStr(Point.Y), Comp
Count = Count + 1
If Count Mod 25 = 0 Then QPProgress "index_components", Count, 0
Next
If Context <> QPCanonicalPath(QPProjectPath()) & "|" & QPSheetIdentity() Then _
Err.Raise vbObjectError + 864, "QuickPartReplace", "active context changed during component indexing"
Set QP_ComponentUidIndex = Uids
Set QP_ComponentRefdesIndex = Refdeses
Set QP_ComponentLocationIndex = Locations
Set QP_ComponentRefdesIndex = Nothing
Set QP_ComponentLocationIndex = Nothing
QP_ComponentIndexContext = Context
QPLog QP_Root, "INFO", "component_index_built count=" & Count
End Sub
Function QPBuildComponentAssociationIndex(ByVal UseLocation)
Dim Result, Uid, Bucket, Index, Comp, Point, Key, Context, Count
Context = QPCanonicalPath(QPProjectPath()) & "|" & QPSheetIdentity()
If Context <> CStr(QP_ComponentIndexContext) Then _
Err.Raise vbObjectError + 864, "QuickPartReplace", "active context changed before component association indexing"
Set Result = CreateObject("Scripting.Dictionary")
Count = 0
For Each Uid In QP_ComponentUidIndex.Keys
Set Bucket = QP_ComponentUidIndex.Item(CStr(Uid))
For Each Index In Bucket.Keys
Set Comp = Bucket.Item(CStr(Index))
If UseLocation Then
Set Point = Comp.GetLocation()
Key = CStr(Point.X) & "|" & CStr(Point.Y)
Else
Key = CStr(Comp.Refdes)
End If
If Len(Key) > 0 Then QPAddComponentIndexEntry Result, Key, Comp
Count = Count + 1
If Count Mod 25 = 0 Then QPProgress "index_components", Count, 0
Next
Next
If Context <> QPCanonicalPath(QPProjectPath()) & "|" & QPSheetIdentity() Then _
Err.Raise vbObjectError + 864, "QuickPartReplace", "active context changed during component association indexing"
Set QPBuildComponentAssociationIndex = Result
End Function
Sub QPEnsureComponentIndex()
Dim Context, Components
Context = QPCanonicalPath(QPProjectPath()) & "|" & QPSheetIdentity()
@@ -438,8 +459,8 @@ Sub QPEnsureComponentIndex()
End If
End Sub
Function QPComponentPins(ByRef Comp)
Dim Context, LocalIndex, AllPins, CmpPin, Owner, Bucket, Count, ComponentUid
Function QPComponentPins(ByVal ComponentUid)
Dim Context, LocalIndex, AllPins, CmpPin, Owner, Bucket, Count
Context = QPCanonicalPath(QPProjectPath()) & "|" & QPSheetIdentity()
If Not IsObject(QP_PinIndex) Then Set QP_PinIndex = Nothing
If Not QP_PinIndex Is Nothing Then
@@ -469,7 +490,6 @@ Function QPComponentPins(ByRef Comp)
QPLog QP_Root, "INFO", "pin_index_built count=" & Count
QPProgress "index_pins", Count, Count
End If
ComponentUid = CStr(Comp.UID)
If QP_PinIndex.Exists(ComponentUid) Then
Set QPComponentPins = QP_PinIndex.Item(ComponentUid)
Else
@@ -909,9 +929,12 @@ Sub QPFinishBatchItem()
ValueStates.Item(CStr(Index)).Add "custom_value", QPCustomValue(Command)
Next
End If
If FinalState = "restored_ok" Or Not QP_SessionMode Then
If FinalState = "restored_ok" Then
QPMarkBatchMutation Command
QPCloseBatchProject TargetPath, True
QP_BatchSaveCommitted = True
ElseIf Not QP_SessionMode Then
QPCloseBatchProject TargetPath, False
End If
If FinalState = "restored_ok" Then
QPProgress "verify_saved_project", 0, 1
@@ -927,7 +950,7 @@ Sub QPFinishBatchItem()
Plans.Add CStr(Index), Candidate
Next
QPVerifyRestoredPlans Command, Records, Plans, ValueStates
If Not QP_SessionMode Then QPCloseBatchProject TargetPath, True
If Not QP_SessionMode Then QPCloseBatchProject TargetPath, False
FinalState = "saved_ok"
If QP_SessionMode Then
QP_BatchMessage = QP_BatchMessage & " Saved and reopened for readback; owned project checkpoint verified."
@@ -953,6 +976,42 @@ Sub QPFinishBatchItem()
QPProgress "finished", 1, 1
End Sub
Sub QPMarkBatchMutation(ByRef Command)
Dim Shell, Entry, Required, CommandLine, Key, Value, ExitCode
Set Shell = CreateObject("WScript.Shell")
Required = False
For Each Entry In Shell.Environment("Process")
If InStr(1, CStr(Entry), "DXPART_ATTEMPT_FILE=", vbTextCompare) = 1 Or _
InStr(1, CStr(Entry), "DXPART_BATCH_SESSION_ID=", vbTextCompare) = 1 Or _
InStr(1, CStr(Entry), "DXPART_BATCH_GENERATION=", vbTextCompare) = 1 Or _
InStr(1, CStr(Entry), "DXPART_ATTEMPT_ID=", vbTextCompare) = 1 Then Required = True
Next
If Not Required Then Exit Sub
If Len(QP_HelperExecutable) = 0 Or Not QP_Fso.FileExists(QP_HelperExecutable) Then _
Err.Raise vbObjectError + 879, "QuickPartReplace.Attempt", "mutation proof helper is unavailable"
CommandLine = Chr(34) & QP_HelperExecutable & Chr(34)
If Len(QP_HelperScript) > 0 Then
If Not QP_Fso.FileExists(QP_HelperScript) Then _
Err.Raise vbObjectError + 879, "QuickPartReplace.Attempt", "mutation proof script is unavailable"
CommandLine = CommandLine & " " & Chr(34) & QP_HelperScript & Chr(34)
End If
CommandLine = CommandLine & " --mark-batch-attempt"
For Each Key In Array("job_id", "task_id", "project_path")
Value = CStr(Command(Key))
If Len(Value) = 0 Or InStr(Value, Chr(34)) > 0 Or InStr(Value, vbCr) > 0 Or InStr(Value, vbLf) > 0 Then _
Err.Raise vbObjectError + 879, "QuickPartReplace.Attempt", "invalid mutation proof identity"
Select Case Key
Case "job_id": CommandLine = CommandLine & " --attempt-job "
Case "task_id": CommandLine = CommandLine & " --attempt-task "
Case "project_path": CommandLine = CommandLine & " --attempt-project "
End Select
CommandLine = CommandLine & Chr(34) & Value & Chr(34)
Next
ExitCode = Shell.Run(CommandLine, 0, True)
If ExitCode <> 0 Then Err.Raise vbObjectError + 879, "QuickPartReplace.Attempt", _
"durable mutation proof failed; no CAD write allowed"
End Sub
Sub QPAutomaticReplaceAndRestore(ByRef Command, ByVal SnapshotPath)
Dim ErrorNumber, ErrorSource, ErrorDescription
QPRequireCommandSnapshot Command, SnapshotPath
@@ -1036,8 +1095,13 @@ Function QPNativeReportShowsMutation(ByVal ReportPath)
End Function
Sub QPRequireSnapshotContext(ByVal SnapshotPath)
Dim Records, Meta
Dim Records
Set Records = QPReadSnapshot(SnapshotPath)
QPRequireRecordsContext Records
End Sub
Sub QPRequireRecordsContext(ByRef Records)
Dim Meta
Set Meta = Records.Item("meta")
If QPCanonicalPath(CStr(Meta("project_path"))) <> QPCanonicalPath(QPProjectPath()) Or _
CStr(Meta("sheet_name")) <> QPSheetIdentity() Then _
@@ -1059,7 +1123,8 @@ Sub QPRollbackNativeReplacement(ByVal SnapshotPath)
Expected = ""
For LineIndex = 1 To UBound(Lines)
If Len(Replace(Lines(LineIndex), vbCr, "")) > 0 Then
If Left(CStr(Lines(LineIndex)), 2) <> "U" & vbTab Then _
If Left(CStr(Lines(LineIndex)), 2) = "C" & vbTab Or _
Left(CStr(Lines(LineIndex)), 2) = "A" & vbTab Then _
Expected = Expected & Replace(Lines(LineIndex), vbCr, "") & vbCrLf
End If
Next
@@ -1084,30 +1149,30 @@ Sub QPCaptureAndSelect(ByRef Command, ByVal SnapshotPath)
Dim Comp
Dim Matches
Dim PartNumber
Dim PartAttr
Dim Snapshot
Dim Index
Dim Selectors, Selector, Uid, ValueAttr, ValueText
Dim Selectors, Selector, Uid, ValueAttr, ValueText, MatchedUids, UntouchedCount, NativeRead
If StrComp(CStr(Command("old_part_number")), CStr(Command("new_part_number")), vbTextCompare) = 0 Then _
Err.Raise vbObjectError + 829, "QuickPartReplace", "source and target must differ"
QPInvalidatePinIndex
QPInvalidateComponentIndex
QPProgress "query_components", 0, 0
Set Matches = CreateObject("Scripting.Dictionary")
QP_Stage = "query_components"
QPLog QP_Root, "INFO", "stage=query_components"
Set Components = QP_App.ActiveView.Query(VDM_COMP, VD_ALL)
QPBuildComponentIndex Components
' Capture walks the queried collection directly. Build lookup indexes only
' when restoration needs them, from fresh proxies after native mutation.
Set Selectors = QPCommandTargets(Command)
For Each Comp In Components
PartNumber = ""
Set PartAttr = QPFindCurrentAttribute(Comp, "Part Number")
If Not PartAttr Is Nothing Then PartNumber = QPEffectiveAttributeValue(PartAttr)
Uid = CStr(Comp.UID)
If Selectors Is Nothing Then
PartNumber = QPEffectiveComponentAttribute(Comp, "Part Number")
If StrComp(PartNumber, CStr(Command("old_part_number")), _
vbTextCompare) = 0 Then Matches.Add CStr(Matches.Count), Comp
ElseIf Selectors.Exists(Uid) Then
PartNumber = QPEffectiveComponentAttribute(Comp, "Part Number")
Selector = Selectors.Item(Uid)
ValueText = ""
Set ValueAttr = QPFindCurrentAttribute(Comp, "Value")
@@ -1146,17 +1211,49 @@ Sub QPCaptureAndSelect(ByRef Command, ByVal SnapshotPath)
If Not Selectors Is Nothing Then _
Snapshot = Snapshot & vbTab & QPEncode("targets") & vbTab & CStr(Command("target_selectors"))
Snapshot = Snapshot & vbCrLf
If Len(QPTargetCell(Command)) > 0 Then _
Snapshot = Snapshot & "L" & vbTab & QPEncode(QPTargetCell(Command)) & vbCrLf
Set MatchedUids = CreateObject("Scripting.Dictionary")
For Index = 0 To Matches.Count - 1
Set Comp = Matches.Item(CStr(Index))
QPLog QP_Root, "INFO", "stage=snapshot_component uid=" & QPLogField(CStr(Comp.UID))
Snapshot = Snapshot & QPSnapshotComponent(Comp)
MatchedUids.Add CStr(Comp.UID), True
Next
Set NativeRead = Nothing
If QPUseNativeSnapshot() Then
QPRequireProject Command
Set NativeRead = QPNativeCapture(MatchedUids)
If Not NativeRead Is Nothing Then
If NativeRead("total") <> Components.Count Then _
Err.Raise vbObjectError + 875, "QuickPartReplace.NativeRead", "component count changed during capture"
End If
End If
For Index = 0 To Matches.Count - 1
Set Comp = Matches.Item(CStr(Index))
Uid = CStr(Comp.UID)
QPLog QP_Root, "INFO", "stage=snapshot_component uid=" & QPLogField(Uid)
If NativeRead Is Nothing Then
Snapshot = Snapshot & QPSnapshotComponent(Comp)
Else
QPRequireNativeCapturedTarget CStr(NativeRead("selected")(Uid)), Command, Uid, Selectors
Snapshot = Snapshot & CStr(NativeRead("selected")(Uid))
End If
QPProgress "capture", Index + 1, Matches.Count
Next
If Not Selectors Is Nothing Then
' U remains the seven-field native-helper identity baseline. X/G extend it
' with complete unselected state for every scope, including all-match jobs.
Snapshot = Snapshot & "X" & vbTab & "untouched_full_v1" & vbCrLf
UntouchedCount = 0
If NativeRead Is Nothing Then
For Each Comp In Components
If Not Selectors.Exists(CStr(Comp.UID)) Then _
If Not MatchedUids.Exists(CStr(Comp.UID)) Then
QPProgress "capture_untouched", UntouchedCount, Components.Count - Matches.Count
Snapshot = Snapshot & QPUntouchedComponent(Comp)
UntouchedCount = UntouchedCount + 1
QPProgress "capture_untouched", UntouchedCount, Components.Count - Matches.Count
End If
Next
Else
Snapshot = Snapshot & CStr(NativeRead("text"))
End If
QPWriteUtf8 SnapshotPath, Snapshot
@@ -1173,12 +1270,97 @@ Sub QPCaptureAndSelect(ByRef Command, ByVal SnapshotPath)
QPLog QP_Root, "INFO", "awaiting_native_replace count=" & Matches.Count
End Sub
Sub QPRequireNativeCapturedTarget(ByVal State, ByRef Command, ByVal Uid, ByRef Selectors)
Dim Fields, Selector
Fields = Split(QPUntouchedIdentity(State), vbTab)
If QPDecode(Fields(1)) <> Uid Or StrComp(QPDecode(Fields(3)), _
CStr(Command("old_part_number")), vbTextCompare) <> 0 Then _
Err.Raise vbObjectError + 873, "QuickPartReplace.Target", "selected component changed during native capture"
If Not Selectors Is Nothing Then
Selector = Selectors(Uid)
If QPDecode(Fields(2)) <> CStr(Selector(0)) Or QPDecode(Fields(4)) <> CStr(Selector(1)) Then _
Err.Raise vbObjectError + 873, "QuickPartReplace.Target", "selected component changed during native capture"
End If
End Sub
Function QPUseNativeSnapshot()
Dim Reader, Number
QPUseNativeSnapshot = False
If Not QP_BatchMode Or Not QP_OwnedProject Then Exit Function
If Len(CStr(CreateObject("WScript.Shell").Environment("PROCESS")("DXPART_DESKTOP"))) = 0 Then Exit Function
On Error Resume Next
Set Reader = GetRef("QPNativeReadUntouched")
Number = Err.Number
Err.Clear
On Error GoTo 0
If Number <> 0 Then Exit Function
If QPCanonicalPath(QP_OwnedProjectPath) <> QPProjectPath() Then _
Err.Raise vbObjectError + 875, "QuickPartReplace.NativeRead", "native reader does not own the active project"
QPUseNativeSnapshot = True
End Function
Function QPUntouchedComponent(ByRef Comp)
QPUntouchedComponent = "U" & vbTab & QPEncode(CStr(Comp.UID)) & vbTab & _
QPEncode(CStr(Comp.Refdes)) & vbTab & QPEncode(QPEffectiveComponentAttribute(Comp, "Part Number")) & vbTab & _
QPEncode(QPEffectiveComponentAttribute(Comp, "Value")) & vbTab & _
QPEncode(QPEffectiveComponentAttribute(Comp, "Part Name")) & vbTab & _
QPEncode(QPEffectiveComponentAttribute(Comp, "Part Label")) & vbCrLf
Dim State, Identity, Fields
State = QPUntouchedFullState(Comp)
Identity = QPUntouchedIdentity(State)
Fields = Split(Identity, vbTab)
QPUntouchedComponent = Identity & vbCrLf & "G" & vbTab & Fields(1) & _
vbTab & QPEncode(State) & vbCrLf
End Function
Function QPUntouchedIdentity(ByVal State)
Dim Values, Seen, Line, Fields, Header, Name, Value
Set Values = CreateObject("Scripting.Dictionary")
Set Seen = CreateObject("Scripting.Dictionary")
Values.CompareMode = vbTextCompare
Seen.CompareMode = vbTextCompare
For Each Name In Array("Part Number", "Value", "Part Name", "Part Label")
Values.Add Name, ""
Next
Header = ""
For Each Line In Split(State, vbCrLf)
If Len(Line) > 0 Then
Fields = Split(Line, vbTab)
If Fields(0) = "C" Then
Header = "U" & vbTab & Fields(1) & vbTab & Fields(2)
ElseIf Fields(0) = "A" Then
Name = QPDecode(Fields(2))
If Values.Exists(Name) Then
If Seen.Exists(Name) Then Err.Raise vbObjectError + 874, _
"QuickPartReplace.Target", "duplicate unselected identity attribute"
Seen.Add Name, True
Value = Fields(4)
If Len(Value) = 0 Then Value = Fields(3)
Values(Name) = Value
End If
End If
End If
Next
QPUntouchedIdentity = Header & vbTab & Values("Part Number") & vbTab & _
Values("Value") & vbTab & Values("Part Name") & vbTab & Values("Part Label")
End Function
Function QPUntouchedFullState(ByRef Comp)
Dim Point, Pins, Connections, Attr, AttributeText, Result, Uid
Uid = CStr(Comp.UID)
Set Point = Comp.GetLocation()
Set Pins = QPComponentPins(Uid)
If Pins.Count = 0 Then
' A genuinely empty query is valid for annotation symbols; COM errors
' still propagate. Selected replacement symbols continue to require pins.
Connections = "NO_PINS"
Else
Connections = QPConnectionSignatureFromPins(Uid, Pins)
End If
Result = "C" & vbTab & QPEncode(Uid) & vbTab & QPEncode(CStr(Comp.Refdes)) & _
vbTab & QPEncode(CStr(Point.X)) & vbTab & QPEncode(CStr(Point.Y)) & _
vbTab & QPEncode(CStr(Comp.Orientation)) & vbTab & QPEncode(CStr(Comp.Scale)) & _
vbTab & QPEncode(Connections) & vbCrLf
AttributeText = ""
For Each Attr In Comp.Attributes
AttributeText = AttributeText & QPSnapshotAttribute(Uid, Attr)
Next
QPUntouchedFullState = Result & QPSortSnapshotLines(AttributeText)
End Function
Function QPEffectiveComponentAttribute(ByRef Comp, ByVal Name)
@@ -1189,9 +1371,19 @@ Function QPEffectiveComponentAttribute(ByRef Comp, ByVal Name)
End Function
Sub QPVerifyUntouched(ByRef Records)
Dim Baseline, Components, Comp, Uid, Actual, Matched, Total, Seen
If Not Records.Item("meta").Exists("target_scope") Then Exit Sub
Dim Baseline, FullBaseline, Components, Comp, Uid, Actual, Expected, Matched, Total, Seen
If Not Records.Exists("untouched_full_version") Then _
Err.Raise vbObjectError + 874, "QuickPartReplace.Target", "legacy snapshot has no complete unselected-state proof; recovery requires manual verification"
Set Baseline = Records.Item("untouched")
Set FullBaseline = Records.Item("untouched_full")
If Baseline.Count <> FullBaseline.Count Then _
Err.Raise vbObjectError + 874, "QuickPartReplace.Target", "unselected full-state baseline is incomplete"
' Read new component/pin proxies after each native mutation, restore or reopen.
QPInvalidatePinIndex
QPInvalidateComponentIndex
If QPUseNativeSnapshot() Then
If QPTryNativeVerifyUntouched(Records) Then Exit Sub
End If
Set Components = QP_App.ActiveView.Query(VDM_COMP, VD_ALL)
Matched = 0
Total = 0
@@ -1203,10 +1395,16 @@ Sub QPVerifyUntouched(ByRef Records)
"QuickPartReplace.Target", "duplicate component UID"
Seen.Add Uid, True
If Baseline.Exists(Uid) Then
QPProgress "verify_untouched", Matched, Baseline.Count
Matched = Matched + 1
Actual = Replace(QPUntouchedComponent(Comp), vbCrLf, "")
If Actual <> CStr(Baseline.Item(Uid)) Then _
If Not FullBaseline.Exists(Uid) Then Err.Raise vbObjectError + 874, _
"QuickPartReplace.Target", "unselected full-state baseline is missing"
Actual = QPUntouchedComponent(Comp)
Expected = CStr(Baseline.Item(Uid)) & vbCrLf & "G" & vbTab & QPEncode(Uid) & _
vbTab & QPEncode(CStr(FullBaseline.Item(Uid))) & vbCrLf
If Actual <> Expected Then _
Err.Raise vbObjectError + 874, "QuickPartReplace.Target", "unselected component changed"
QPProgress "verify_untouched", Matched, Baseline.Count
End If
Next
If Total <> Baseline.Count + Records.Item("components").Count Then _
@@ -1254,10 +1452,13 @@ Function QPSnapshotComponent(ByRef Comp)
Dim ErrorNumber
Dim ErrorSource
Dim ErrorDescription
Dim Uid, Pins
Uid = CStr(Comp.UID)
Set Point = Comp.GetLocation()
Connections = QPConnectionSignature(Comp)
Result = "C" & vbTab & QPEncode(CStr(Comp.UID)) & vbTab & _
Set Pins = QPComponentPins(Uid)
Connections = QPConnectionSignatureFromPins(Uid, Pins)
Result = "C" & vbTab & QPEncode(Uid) & vbTab & _
QPEncode(CStr(Comp.Refdes)) & vbTab & QPEncode(CStr(Point.X)) & _
vbTab & QPEncode(CStr(Point.Y)) & vbTab & _
QPEncode(CStr(Comp.Orientation)) & vbTab & QPEncode(CStr(Comp.Scale)) & _
@@ -1268,7 +1469,7 @@ Function QPSnapshotComponent(ByRef Comp)
AttributeText = ""
AttributeCount = 0
For Each Attr In Comp.Attributes
AttributeText = AttributeText & QPSnapshotAttribute(CStr(Comp.UID), Attr)
AttributeText = AttributeText & QPSnapshotAttribute(Uid, Attr)
If Err.Number <> 0 Then Exit For
AttributeCount = AttributeCount + 1
QPProgress "snapshot_attributes", AttributeCount, 0
@@ -1310,8 +1511,7 @@ Function QPSortSnapshotLines(ByVal Text)
End Function
Function QPSnapshotAttribute(ByVal ComponentUid, ByRef Attr)
Dim Instance
Dim InstanceWarning
Dim Instance, Point, ErrorNumber, ErrorDescription
Dim LocationX
Dim LocationY
Dim Color
@@ -1320,20 +1520,17 @@ Function QPSnapshotAttribute(ByVal ComponentUid, ByRef Attr)
Dim Orientation
Dim Visible
InstanceWarning = ""
On Error Resume Next
Instance = Attr.InstanceValue
If Err.Number <> 0 Then
Err.Clear
Instance = Attr.Value
InstanceWarning = "instance_value_fallback"
End If
On Error Resume Next
Set Point = Attr.GetLocation()
LocationX = CStr(Point.X)
LocationY = CStr(Point.Y)
ErrorNumber = Err.Number
ErrorDescription = Err.Description
Err.Clear
On Error GoTo 0
If Len(InstanceWarning) > 0 Then
QPLog QP_Root, "WARN", InstanceWarning & " name=" & CStr(Attr.Name)
End If
LocationX = QPOptionalAttributeField(Attr, "location_x")
LocationY = QPOptionalAttributeField(Attr, "location_y")
If ErrorNumber <> 0 Then Err.Raise ErrorNumber, "QuickPartReplace.Snapshot", _
"Cannot capture " & CStr(Attr.Name) & ".location: " & ErrorDescription
Color = QPOptionalAttributeField(Attr, "color")
Font = QPOptionalAttributeField(Attr, "font")
Size = QPOptionalAttributeField(Attr, "size")
@@ -1398,7 +1595,10 @@ Sub QPRestoreAfterOperatorReplace(ByRef Command, ByVal SnapshotPath)
QPProgress "restore_preflight", 0, 0
Set Records = QPReadSnapshot(SnapshotPath)
QPRequireCommandSnapshot Command, SnapshotPath
QPVerifyUntouched Records
' Owned batches perform full-page checks immediately before saving and
' after disk reopen in QPFinishBatchItem, before publishing completion.
' Manual restoration keeps full checks on both sides of its writes.
If Not QP_BatchMode Then QPVerifyUntouched Records
Set Meta = Records.Item("meta")
If QPCanonicalPath(CStr(Meta("project_path"))) <> QPCanonicalPath(QPProjectPath()) Or _
CStr(Meta("sheet_name")) <> QPSheetIdentity() Then _
@@ -1427,6 +1627,7 @@ Sub QPRestoreAfterOperatorReplace(ByRef Command, ByVal SnapshotPath)
QPProgress "restore_preflight", Index + 1, Records.Item("components").Count
Next
QPProgress "before_restore_transaction", 0, Plans.Count
QPMarkBatchMutation Command
QP_RestoreTransactionOpen = True
QP_App.ActiveView.Block.StartUndoTransaction
On Error Resume Next
@@ -1471,6 +1672,8 @@ Sub QPRestoreAfterOperatorReplace(ByRef Command, ByVal SnapshotPath)
CStr(Command("new_part_number")))
SuccessMessage = "Native replacement and parameter readback passed on current sheet. Replacements: " & _
ReplacementSummary & " " & QPDisplayVerificationSummary(Records)
If Len(QPTargetCell(Command)) > 0 Then SuccessMessage = SuccessMessage & _
" Target Cell verified: " & QPTargetCell(Command) & "."
If Len(QP_NcSyncSummary) > 0 Then SuccessMessage = SuccessMessage & _
" NC synced: " & QP_NcSyncSummary
QPWriteStatus QP_Root, CStr(Command("job_id")), "restored_ok", "", SuccessMessage
@@ -1504,17 +1707,27 @@ Sub QPRestorePlans(ByRef Command, ByRef Records, ByRef Plans)
ValueStates.Item(CStr(Index)).Add "custom_value", QPCustomValue(Command)
QPRestoreComponent Candidate, ComponentRecord, Records.Item("attributes"), _
QPValueMode(Command), QPCustomValue(Command), QPSyncNc(Command)
QPSetTargetCell Candidate, Command
QPProgress "restore_attributes", Index + 1, Plans.Count
Next
QPVerifyRestoredPlans Command, Records, Plans, ValueStates
If Not QP_BatchMode Then QPVerifyUntouched Records
End Sub
Sub QPVerifyRestoredPlans(ByRef Command, ByRef Records, ByRef Plans, ByRef ValueStates)
Dim Index, ComponentRecord, Candidate, AttributeIndex, Record, Attr
Dim Index, ComponentRecord, Candidate, AttributeIndex, Record, Attr, Before
QPProgress "verify_restoration", 0, Plans.Count
For Index = 0 To Plans.Count - 1
Set ComponentRecord = Records.Item("components").Item(CStr(Index))
Set Candidate = Plans.Item(CStr(Index))
QPVerifyTargetCell Candidate, Command
' Captured only after native library identity validation (or recovery
' command validation), before restoration/save; never derive this expected
' identity from the reopened result or from its current Value.
Set Before = ValueStates.Item(CStr(Index))
If QPRequiredAttributeValue(Candidate, "Part Name") <> CStr(Before("part_name")) Or _
QPEffectiveComponentAttribute(Candidate, "Part Label") <> CStr(Before("part_label")) Then _
Err.Raise vbObjectError + 865, "QuickPartReplace", "target library identity changed during restoration or save"
QPRestorePreflight Candidate, ComponentRecord, Records.Item("attributes"), _
CStr(Command("new_part_number")), QPValueMode(Command)
QPVerifyTransform Candidate, ComponentRecord
@@ -1544,6 +1757,13 @@ Sub QPRecoverSavedJob(ByRef Command, ByVal SnapshotPath)
Dim Records, Plans, Used, ValueStates, Index, Record, Candidate, PartNumber
Dim OldCount, NewCount, ErrorNumber, ErrorDescription, RecoveryDocuments, RecoveryDocument, RecoveryProjectData
QPRequireCommandSnapshot Command, SnapshotPath
If Len(QPTargetCell(Command)) > 0 Then
If Not Command.Exists("recovery_library_path") Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "recovery Cell library proof missing"
If QPCanonicalPath(CStr(QP_App.GetProjectData().CentralLibraryPath)) <> _
QPCanonicalPath(QPDecode(CStr(Command("recovery_library_path")))) Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "recovery active library changed"
End If
Set Records = QPReadSnapshot(SnapshotPath)
QPVerifyUntouched Records
Set Plans = CreateObject("Scripting.Dictionary")
@@ -1568,11 +1788,12 @@ Sub QPRecoverSavedJob(ByRef Command, ByVal SnapshotPath)
ElseIf StrComp(PartNumber, CStr(Command("new_part_number")), vbTextCompare) = 0 Then
NewCount = NewCount + 1
If StrComp(QPRequiredAttributeValue(Candidate, "Part Name"), _
CStr(Command("recovery_part_name")), vbTextCompare) <> 0 Then _
CStr(Command("recovery_part_name")), vbBinaryCompare) <> 0 Then _
Err.Raise vbObjectError + 865, "QuickPartReplace.Recovery", "saved target library identity differs"
If QPValueMode(Command) <> "preserve" Then
If StrComp(QPRequiredAttributeValue(Candidate, "Part Label"), _
CStr(Command("recovery_part_label")), vbTextCompare) <> 0 Then _
If Len(CStr(Command("recovery_part_label"))) > 0 Or _
QPValueMode(Command) = "part_label" Or QPValueMode(Command) = "legacy_part_label" Then
If StrComp(QPEffectiveComponentAttribute(Candidate, "Part Label"), _
CStr(Command("recovery_part_label")), vbBinaryCompare) <> 0 Then _
Err.Raise vbObjectError + 865, "QuickPartReplace.Recovery", "saved target library identity differs"
End If
QPRestorePreflight Candidate, Record, Records.Item("attributes"), _
@@ -1611,7 +1832,19 @@ Sub QPRecoverSavedJob(ByRef Command, ByVal SnapshotPath)
Err.Clear
On Error GoTo 0
If ErrorNumber = 0 Then
QPWriteStatus QP_Root, QP_CurrentJobId, "restored_ok", "recovery_verified", "Saved replacement already passes all restoration checks; no CAD writes."
If QP_BatchMode Then
If QP_SessionMode Then Err.Raise vbObjectError + 865, _
"QuickPartReplace.Recovery", "read-only recovery cannot reuse a project session"
' A fresh owned recovery session has already verified the disk state.
' Closing without saving avoids a second save/reopen cycle for no writes.
QPRequireCommandSnapshot Command, SnapshotPath
QPCloseBatchProject CStr(Command("project_path")), False
QP_BatchMode = False
QPWriteStatus QP_Root, QP_CurrentJobId, "restored_ok", "recovery_saved_verified", _
"Saved replacement verified from disk and owned project closed without additional saving."
Else
QPWriteStatus QP_Root, QP_CurrentJobId, "restored_ok", "recovery_verified", "Saved replacement already passes all restoration checks; no CAD writes."
End If
Else
If ErrorNumber <> vbObjectError + 833 And ErrorNumber <> vbObjectError + 834 And _
ErrorNumber <> vbObjectError + 837 And ErrorNumber <> vbObjectError + 840 And _
@@ -1662,6 +1895,9 @@ Sub QPRestorePreflight(ByRef Comp, ByRef ComponentRecord, _
Dim CurrentConnections
Dim SavedConnections
If CStr(Comp.UID) <> CStr(ComponentRecord("uid")) Or _
CStr(Comp.Refdes) <> CStr(ComponentRecord("refdes")) Then _
Err.Raise vbObjectError + 831, "QuickPartReplace", "replacement component UID or Refdes differs from snapshot; no restoration writes allowed"
If StrComp(QPRequiredAttributeValue(Comp, "Part Number"), _
CStr(NewPartNumber), vbTextCompare) <> 0 Then
Err.Raise vbObjectError + 800, "QuickPartReplace", _
@@ -1715,6 +1951,8 @@ Function QPFindUniqueByOldLocation(ByRef ComponentRecord)
Exit Function
End If
Key = CStr(ComponentRecord("refdes"))
If QP_ComponentRefdesIndex Is Nothing Then _
Set QP_ComponentRefdesIndex = QPBuildComponentAssociationIndex(False)
If Len(Key) > 0 And QP_ComponentRefdesIndex.Exists(Key) Then
Set Bucket = QP_ComponentRefdesIndex.Item(Key)
If Bucket.Count > 1 Then Err.Raise vbObjectError + 802, "QuickPartReplace", "ambiguous replacement association"
@@ -1722,6 +1960,8 @@ Function QPFindUniqueByOldLocation(ByRef ComponentRecord)
Exit Function
End If
Key = CStr(ComponentRecord("x")) & "|" & CStr(ComponentRecord("y"))
If QP_ComponentLocationIndex Is Nothing Then _
Set QP_ComponentLocationIndex = QPBuildComponentAssociationIndex(True)
If QP_ComponentLocationIndex.Exists(Key) Then
Set Bucket = QP_ComponentLocationIndex.Item(Key)
If Bucket.Count > 1 Then Err.Raise vbObjectError + 802, "QuickPartReplace", "ambiguous replacement association"
@@ -2005,12 +2245,14 @@ Sub QPRequireCommandSnapshot(ByRef Command, ByVal SnapshotPath)
Dim Records, Meta
Set Records = QPReadSnapshot(SnapshotPath)
Set Meta = Records.Item("meta")
QPRequireSnapshotContext SnapshotPath
QPRequireRecordsContext Records
If CStr(Meta("old_part_number")) <> CStr(Command("old_part_number")) Or _
CStr(Meta("new_part_number")) <> CStr(Command("new_part_number")) Then _
Err.Raise vbObjectError + 830, "QuickPartReplace", "snapshot rule mismatch"
If QPValueMode(Meta) <> QPValueMode(Command) Then _
Err.Raise vbObjectError + 842, "QuickPartReplace", "snapshot Value policy mismatch"
If QPTargetCell(Meta) <> QPTargetCell(Command) Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "target Cell changed since snapshot"
If QPCustomValue(Meta) <> QPCustomValue(Command) Or _
QPSyncNc(Meta) <> QPSyncNc(Command) Then _
Err.Raise vbObjectError + 842, "QuickPartReplace", "snapshot Value or NC option mismatch"
@@ -2029,6 +2271,40 @@ Sub QPRequireCommandSnapshot(ByRef Command, ByVal SnapshotPath)
End If
End Sub
Function QPTargetCell(ByRef Record)
Dim Value, Index
QPTargetCell = ""
If Not Record.Exists("target_cell") Then Exit Function
Value = QPDecode(CStr(Record("target_cell")))
If Len(Value) = 0 Then Exit Function
If Trim(Value) <> Value Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "target Cell selection is invalid"
For Index = 1 To Len(Value)
If AscW(Mid(Value, Index, 1)) >= 0 And AscW(Mid(Value, Index, 1)) < 32 Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "invalid control character in target Cell"
Next
QPTargetCell = Value
End Function
Sub QPSetTargetCell(ByRef Comp, ByRef Command)
Dim Value, Attr
Value = QPTargetCell(Command)
If Len(Value) = 0 Then Exit Sub
Set Attr = QPFindCurrentAttribute(Comp, "Cell Name")
If Attr Is Nothing Then Err.Raise vbObjectError + 878, _
"QuickPartReplace.Cell", "replaced target has no Cell Name attribute"
Attr.InstanceValue = Value
QPVerifyTargetCell Comp, Command
End Sub
Sub QPVerifyTargetCell(ByRef Comp, ByRef Command)
Dim Value
Value = QPTargetCell(Command)
If Len(Value) = 0 Then Exit Sub
If QPRequiredAttributeValue(Comp, "Cell Name") <> Value Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "effective target Cell does not match explicit selection"
End Sub
Function QPValueMode(ByRef Record)
QPValueMode = "legacy_part_label"
If Not Record.Exists("value_mode") Then Exit Function
@@ -2072,6 +2348,8 @@ Function QPCaptureValueState(ByRef Comp)
State.Add "exists", Not (Attr Is Nothing)
State.Add "value", ""
State.Add "nc_required", False
State.Add "part_name", QPRequiredAttributeValue(Comp, "Part Name")
State.Add "part_label", QPEffectiveComponentAttribute(Comp, "Part Label")
If Not Attr Is Nothing Then State("value") = QPEffectiveAttributeValue(Attr)
Set QPCaptureValueState = State
End Function
@@ -2161,15 +2439,20 @@ Function QPConnectionsMatch(ByVal Current, ByVal Saved)
Exit Function
End If
Next
If QPAllSavedNumbersBlank(Expected) Then _
QPConnectionsMatch = QPConnectionsMatchTopology(Actual, Expected)
' Unknown source numbers permit only the same one-to-one physical/net map,
' up to one common translation. Network counts alone cannot prove pin mapping.
End Function
Function QPConnectionLineValid(ByVal Line, ByVal RequireNumber)
Dim Fields, X, Y, ErrorNumber
QPConnectionLineValid = False
Fields = Split(CStr(Line), "|")
If UBound(Fields) < 3 Then Exit Function
If UBound(Fields) <> 3 And UBound(Fields) <> 4 Then Exit Function
If UBound(Fields) = 3 Then
If CStr(Fields(3)) <> "UNCONNECTED" Then Exit Function
Else
If Len(CStr(Fields(3))) = 0 Then Exit Function
End If
If RequireNumber And Len(Trim(CStr(Fields(0)))) = 0 Then Exit Function
If Len(Trim(CStr(Fields(1)))) = 0 Or Len(Trim(CStr(Fields(2)))) = 0 Then Exit Function
On Error Resume Next
@@ -2197,7 +2480,11 @@ End Function
Function QPConnectionNetIdentity(ByVal Line)
Dim Fields
Fields = Split(CStr(Line), "|")
QPConnectionNetIdentity = Trim(CStr(Fields(UBound(Fields))))
If UBound(Fields) = 3 Then
QPConnectionNetIdentity = "UNCONNECTED"
Else
QPConnectionNetIdentity = CStr(Fields(3)) & "|" & CStr(Fields(4))
End If
End Function
Function QPConnectionsMatchOffset(ByRef Actual, ByRef Expected, ByVal OffsetX, ByVal OffsetY)
@@ -2215,7 +2502,7 @@ Function QPConnectionsMatchOffset(ByRef Actual, ByRef Expected, ByVal OffsetX, B
Abs(QPConnectionCoordinate(Candidate, 2) - _
QPConnectionCoordinate(SavedLine, 2) - OffsetY) < 0.0001 And _
StrComp(QPConnectionNetIdentity(Candidate), _
QPConnectionNetIdentity(SavedLine), vbTextCompare) = 0)
QPConnectionNetIdentity(SavedLine), vbBinaryCompare) = 0)
Number = QPConnectionNumber(SavedLine)
If Len(Trim(Number)) > 0 Then _
Match = Match And StrComp(QPConnectionNumber(Candidate), Number, vbBinaryCompare) = 0
@@ -2231,53 +2518,6 @@ Function QPConnectionsMatchOffset(ByRef Actual, ByRef Expected, ByVal OffsetX, B
QPConnectionsMatchOffset = True
End Function
Function QPAllSavedNumbersBlank(ByRef Expected)
Dim Index
QPAllSavedNumbersBlank = True
For Index = 0 To Expected.Count - 1
If Len(Trim(QPConnectionNumber(Expected.Item(CStr(Index))))) > 0 Then
QPAllSavedNumbersBlank = False
Exit Function
End If
Next
End Function
Function QPConnectionsMatchTopology(ByRef Actual, ByRef Expected)
Dim ActualNets, ExpectedNets, Index, Key, Value
Set ActualNets = CreateObject("Scripting.Dictionary")
Set ExpectedNets = CreateObject("Scripting.Dictionary")
ActualNets.CompareMode = vbTextCompare
ExpectedNets.CompareMode = vbTextCompare
For Index = 0 To Actual.Count - 1
Key = QPConnectionNetIdentity(Actual.Item(CStr(Index)))
If ActualNets.Exists(Key) Then
ActualNets(Key) = ActualNets(Key) + 1
Else
ActualNets.Add Key, 1
End If
Next
For Index = 0 To Expected.Count - 1
Key = QPConnectionNetIdentity(Expected.Item(CStr(Index)))
If ExpectedNets.Exists(Key) Then
ExpectedNets(Key) = ExpectedNets(Key) + 1
Else
ExpectedNets.Add Key, 1
End If
Next
QPConnectionsMatchTopology = (ActualNets.Count = ExpectedNets.Count)
If Not QPConnectionsMatchTopology Then Exit Function
For Each Key In ExpectedNets.Keys
If Not ActualNets.Exists(Key) Then
QPConnectionsMatchTopology = False
Exit Function
End If
If ActualNets(Key) <> ExpectedNets(Key) Then
QPConnectionsMatchTopology = False
Exit Function
End If
Next
End Function
Sub QPRestoreDisplay(ByRef Attr, ByRef Record, ByVal Refdes)
Dim Point, Field
For Each Field In Array("x", "y", "color", "font", "size", "orientation", "visible")
@@ -2333,16 +2573,7 @@ End Sub
Function QPFindCurrentAttribute(ByRef Comp, ByVal Name)
Dim Attr
On Error Resume Next
Set Attr = Comp.FindAttribute(CStr(Name))
If Err.Number <> 0 Then
QPLog QP_Root, "WARN", "find_attribute name=" & CStr(Name) & _
" number=" & Err.Number & " source=" & Err.Source & _
" description=" & Err.Description
Err.Clear
Set Attr = Nothing
End If
On Error GoTo 0
Set QPFindCurrentAttribute = Attr
End Function
@@ -2375,9 +2606,7 @@ Function QPEffectiveAttributeValue(ByRef Attr)
Exit Function
End If
If ErrorNumber <> 0 Then
QPLog QP_Root, "WARN", "instance_value_fallback number=" & _
ErrorNumber & " source=" & ErrorSource & " description=" & _
ErrorDescription
Err.Raise ErrorNumber, ErrorSource, ErrorDescription
End If
On Error Resume Next
Value = CStr(Attr.Value)
@@ -2395,7 +2624,13 @@ Function QPEffectiveAttributeValue(ByRef Attr)
End Function
Function QPConnectionSignature(ByRef Comp)
Dim Pins
Dim Pins, Uid
Uid = CStr(Comp.UID)
Set Pins = QPComponentPins(Uid)
QPConnectionSignature = QPConnectionSignatureFromPins(Uid, Pins)
End Function
Function QPConnectionSignatureFromPins(ByVal ComponentUid, ByRef Pins)
Dim PinIndexKey
Dim PinReadCount
Dim CmpPin
@@ -2416,11 +2651,10 @@ Function QPConnectionSignature(ByRef Comp)
Set Signatures = CreateObject("Scripting.Dictionary")
QP_Stage = "query_pins"
Set Pins = QPComponentPins(Comp)
PinReadCount = 0
For Each PinIndexKey In Pins.Keys
Set CmpPin = Pins.Item(CStr(PinIndexKey))
If StrComp(CStr(CmpPin.Component.UID), CStr(Comp.UID), _
If StrComp(CStr(CmpPin.Component.UID), ComponentUid, _
vbBinaryCompare) = 0 Then
Set Point = CmpPin.GetLocation()
PinKey = CStr(CmpPin.Number) & "|" & CStr(Point.X) & "|" & _
@@ -2485,7 +2719,7 @@ Function QPConnectionSignature(ByRef Comp)
For Index = 0 To UBound(Keys)
Result = Result & Signatures.Item(CStr(Keys(Index))) & vbLf
Next
QPConnectionSignature = Result
QPConnectionSignatureFromPins = Result
End Function
Sub QPAddSortedSignature(ByRef Signatures, ByVal PinKey, ByVal PinValue)
@@ -2689,7 +2923,7 @@ Function QPReadSnapshot(ByVal Path)
Dim Result
Dim Components
Dim Attributes
Dim Untouched
Dim Untouched, UntouchedFull
Dim Fields
Dim Index
Dim Record
@@ -2699,6 +2933,7 @@ Function QPReadSnapshot(ByVal Path)
Set Components = CreateObject("Scripting.Dictionary")
Set Attributes = CreateObject("Scripting.Dictionary")
Set Untouched = CreateObject("Scripting.Dictionary")
Set UntouchedFull = CreateObject("Scripting.Dictionary")
Lines = Split(QPReadUtf8(Path), vbLf)
For Index = 0 To UBound(Lines)
If Len(Replace(Lines(Index), vbCr, "")) > 0 Then
@@ -2723,6 +2958,12 @@ Function QPReadSnapshot(ByVal Path)
Meta.Add "target_selectors", CStr(Fields(9))
End If
Result.Add "meta", Meta
Case "L"
If UBound(Fields) <> 1 Or Not Result.Exists("meta") Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "invalid target Cell snapshot"
Result.Item("meta").Add "target_cell", CStr(Fields(1))
If Len(QPTargetCell(Result.Item("meta"))) = 0 Then _
Err.Raise vbObjectError + 878, "QuickPartReplace.Cell", "missing target Cell snapshot"
Case "C"
If UBound(Fields) <> 7 Then Err.Raise vbObjectError + 813, _
"QuickPartReplace", "invalid snapshot component"
@@ -2757,6 +2998,14 @@ Function QPReadSnapshot(ByVal Path)
If Untouched.Exists(QPDecode(Fields(1))) Then Err.Raise vbObjectError + 874, _
"QuickPartReplace.Target", "duplicate unselected component UID"
Untouched.Add QPDecode(Fields(1)), Replace(Lines(Index), vbCr, "")
Case "X"
If UBound(Fields) <> 1 Or Fields(1) <> "untouched_full_v1" Then _
Err.Raise vbObjectError + 874, "QuickPartReplace.Target", "invalid unselected-state protocol"
Result.Add "untouched_full_version", CStr(Fields(1))
Case "G"
If UBound(Fields) <> 2 Or Len(QPDecode(Fields(1))) = 0 Or Len(QPDecode(Fields(2))) = 0 Then _
Err.Raise vbObjectError + 874, "QuickPartReplace.Target", "invalid unselected full-state snapshot"
UntouchedFull.Add QPDecode(Fields(1)), QPDecode(Fields(2))
End Select
End If
Next
@@ -2766,6 +3015,7 @@ Function QPReadSnapshot(ByVal Path)
Result.Add "components", Components
Result.Add "attributes", Attributes
Result.Add "untouched", Untouched
Result.Add "untouched_full", UntouchedFull
Set QPReadSnapshot = Result
End Function
+3
View File
@@ -80,6 +80,9 @@ try {
if (-not (Test-Path -LiteralPath $executable -PathType Leaf)) {
throw "PyInstaller did not produce $executable"
}
$runtimeSmokeRoot = Join-Path $repositoryRoot ("build\frozen-runtime-" + [Guid]::NewGuid().ToString("N"))
& $PythonExecutable tools\verify_packaged_runtime.py $executable $runtimeSmokeRoot
if ($LASTEXITCODE -ne 0) { throw "Frozen supervisor verification failed; build stopped" }
$sourceQuickPartReplace = Join-Path $repositoryRoot "integration\dxdesigner795\QuickPartReplace.vbs"
$packagedQuickPartReplace = Join-Path $repositoryRoot "dist\DxPartReplace\_internal\legacy-runtime\dxdesigner795\QuickPartReplace.vbs"
if (-not (Test-Path -LiteralPath $sourceQuickPartReplace -PathType Leaf)) {
+12
View File
@@ -17,10 +17,18 @@ if viewdraw_api is None:
raise RuntimeError("DxDesigner EE 7.9.5 type library is required for packaging")
shutil.copyfile(viewdraw_api.__file__, generated_root / "viewdraw_api.py")
legacy_runtime_datas = [
(
str(project_root / 'src/dx_productivity/trial_task_center/assets/app.ico'),
'dx_productivity/trial_task_center/assets',
),
(
str(project_root / "integration" / "dxdesigner795" / "QuickPartReplace.vbs"),
"legacy-runtime/dxdesigner795",
),
(
str(project_root / "integration" / "dxdesigner795" / "NativeSnapshotReader.vbs"),
"legacy-runtime/dxdesigner795",
),
]
a = Analysis(
@@ -35,6 +43,8 @@ a = Analysis(
"win32con",
"win32gui",
"win32process",
# GetProcessTimes imports this from pywin32's C extension at runtime.
"win32timezone",
"pywinauto",
"pywinauto.controls.uiawrapper",
],
@@ -78,6 +88,8 @@ exe = EXE(
[],
exclude_binaries=True,
name='DxPartReplace',
icon=str(project_root / 'src/dx_productivity/trial_task_center/assets/app.ico'),
version=str(project_root / 'packaging/windows-version-info.txt'),
debug=False,
bootloader_ignore_signals=False,
strip=False,
+27
View File
@@ -0,0 +1,27 @@
# UTF-8
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(1, 1, 4, 2),
prodvers=(1, 1, 4, 2),
mask=0x3f,
flags=0x2,
OS=0x40004,
fileType=0x1,
subtype=0x0,
date=(0, 0)
),
kids=[
StringFileInfo([
StringTable('040904B0', [
StringStruct('CompanyName', 'DxProductivity'),
StringStruct('FileDescription', 'DxDesigner Part Replacement'),
StringStruct('FileVersion', '1.1.4.2'),
StringStruct('InternalName', 'DxPartReplace'),
StringStruct('OriginalFilename', 'DxPartReplace.exe'),
StringStruct('ProductName', 'DxDesigner Part Replacement'),
StringStruct('ProductVersion', '1.1.4-beta.2')
])
]),
VarFileInfo([VarStruct('Translation', [1033, 1200])])
]
)
+5 -2
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "dx-productivity"
version = "1.1.2"
version = "1.1.4b2"
requires-python = ">=3.12,<3.13"
dependencies = ["PySide6>=6.7,<7", "pywin32>=306", "pywinauto>=0.6.9,<1", "openpyxl>=3.1,<4"]
@@ -13,7 +13,10 @@ dx-part-replace = "dx_productivity.part_replace.cli:main"
dx-part-replace-gui = "dx_productivity.trial_task_center.application:main"
[project.optional-dependencies]
dev = ["pytest>=8,<9", "pytest-cov>=5,<7", "coverage>=7,<8", "build>=1.2,<2", "pytest-qt>=4.4,<5", "PyInstaller>=6.10,<7"]
dev = ["pytest>=8,<9", "pytest-cov>=5,<7", "coverage>=7,<8", "build>=1.2,<2", "pytest-qt>=4.4,<5", "PyInstaller>=6.10,<7", "Pillow>=10,<13"]
[tool.setuptools.package-data]
"dx_productivity.trial_task_center" = ["assets/*.ico", "assets/*.png", "assets/*.svg"]
[tool.setuptools.packages.find]
where = ["src"]
@@ -10,6 +10,7 @@ import sys
from typing import Sequence
from PySide6.QtCore import QTimer, QThreadPool
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import QApplication
from dx_productivity.trial_task_center.logging_setup import LoggingContext, configure_logging, install_exception_hooks
@@ -28,14 +29,35 @@ def _load_window():
return TrialTaskCenterWindow
def configure_application_identity(application: QApplication) -> None:
"""Use one stable Windows identity and icon for source and portable launches."""
from dx_productivity import trial_task_center
if os.name == 'nt':
import ctypes
set_app_id = ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID
set_app_id.argtypes = (ctypes.c_wchar_p,)
set_app_id.restype = ctypes.c_long
set_app_id('DxProductivity.DxPartReplace')
application.setApplicationName('DxPartReplace')
application.setApplicationVersion(VERSION)
application.setWindowIcon(QIcon(str(Path(trial_task_center.__file__).parent / 'assets/app.ico')))
def _parse_arguments(argv: Sequence[str] | None) -> argparse.Namespace:
parser = argparse.ArgumentParser(prog="DxPartReplace")
parser.add_argument("--smoke-test", action="store_true", help=argparse.SUPPRESS)
parser.add_argument("--data-root", type=Path, help=argparse.SUPPRESS)
parser.add_argument("--native-helper", action="store_true", help=argparse.SUPPRESS)
parser.add_argument("--snapshot", type=Path, help=argparse.SUPPRESS)
parser.add_argument('--mark-batch-attempt', action='store_true', help=argparse.SUPPRESS)
parser.add_argument('--attempt-job', help=argparse.SUPPRESS)
parser.add_argument('--attempt-task', help=argparse.SUPPRESS)
parser.add_argument('--attempt-project', type=Path, help=argparse.SUPPRESS)
parser.add_argument('--cell-catalog-worker', type=Path, help=argparse.SUPPRESS)
parser.add_argument("--sceneos-cli", action="store_true", help=argparse.SUPPRESS)
parser.add_argument('--private-cad-action', choices=('probe', 'quit'), help=argparse.SUPPRESS)
parser.add_argument('--private-cad-action', choices=('probe', 'quit', 'checkpoint'), help=argparse.SUPPRESS)
parser.add_argument('--private-cad-evidence', type=Path, help=argparse.SUPPRESS)
parser.add_argument('--private-cad-pid', type=int, help=argparse.SUPPRESS)
return parser.parse_args(list(argv) if argv is not None else None)
@@ -95,9 +117,34 @@ def _flush(context: LoggingContext) -> None:
handler.flush()
def _smoke_batch_runtime(data_root: Path, context: LoggingContext) -> None:
"""Exercise process tracking inside the frozen supervisor before releasing."""
from dx_productivity.trial_task_center.batch_runtime import BatchCadRuntime
with BatchCadRuntime(data_root, 'packaged_runtime_smoke') as runtime:
runtime.bind_logs(context, ())
with runtime.native_scope(data_root / 'runtime-smoke') as lease:
command = str(Path(os.environ['SystemRoot']) / 'System32/cmd.exe')
process = lease.start_process((command, '/d', '/c', 'exit', '0'))
if not runtime.record['processes'][0]['creation_time']:
raise RuntimeError('Smoke process identity has no creation time')
if process.wait(timeout=15) != 0:
raise RuntimeError('Smoke worker did not exit successfully')
if runtime.record['state'] != 'released':
raise RuntimeError('Smoke resources were not released')
context.logger.info('packaged_runtime_smoke_passed batch_id=%s', runtime.session_id)
def main(argv: Sequence[str] | None = None) -> int:
"""Run the Qt shell, returning a conventional process status code."""
arguments = _parse_arguments(argv)
if arguments.mark_batch_attempt:
from dx_productivity.trial_task_center.native_helper import run_attempt_marker
return run_attempt_marker(job_id=arguments.attempt_job, task_id=arguments.attempt_task,
project_path=arguments.attempt_project)
if arguments.cell_catalog_worker is not None:
from dx_productivity.trial_task_center.cell_catalog_worker import run
return run(arguments.cell_catalog_worker)
if arguments.private_cad_action:
if arguments.private_cad_evidence is None or arguments.private_cad_pid is None:
return 2
@@ -120,9 +167,12 @@ def main(argv: Sequence[str] | None = None) -> int:
try:
database_path = data_root / "task-center.db"
_log_startup(logging_context, data_root, database_path)
if arguments.smoke_test and bool(getattr(sys, 'frozen', False)):
_smoke_batch_runtime(data_root, logging_context)
store = TaskStore(database_path)
service = TaskCenterService(store, logging_context)
qt_application = QApplication([sys.executable, *(argv or ())])
configure_application_identity(qt_application)
window = _load_window()(service)
window.show()
if arguments.smoke_test:
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@@ -0,0 +1,18 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256">
<defs>
<linearGradient id="tile" x1="0" y1="0" x2="1" y2="1">
<stop stop-color="#164D91"/>
<stop offset="1" stop-color="#079D98"/>
</linearGradient>
</defs>
<rect x="16" y="16" width="224" height="224" rx="52" fill="url(#tile)"/>
<g fill="none" stroke="#FFFFFF" stroke-width="12" stroke-linecap="round" stroke-linejoin="round">
<path d="M62 97V82Q62 60 84 60H184M169 46L184 60L169 74"/>
<path d="M194 159V174Q194 196 172 196H72M87 182L72 196L87 210"/>
</g>
<g fill="none" stroke="#FFFFFF" stroke-width="9" stroke-linecap="round">
<rect x="88" y="96" width="80" height="64" rx="10"/>
<path d="M76 112H88M76 128H88M76 144H88M168 112H180M168 128H180M168 144H180"/>
</g>
<rect x="109" y="117" width="38" height="22" rx="5" fill="#9BF0DE"/>
</svg>

After

Width:  |  Height:  |  Size: 883 B

@@ -41,6 +41,7 @@ def execute_batch(
stop_event: Event,
continue_after_backup_failure: bool = False,
reuse_project_session: bool = True,
runtime=None,
) -> BatchRunResult:
preparer = service._quick_run_preparer
retention = maintain_quick_run_storage(preparer.data_root)
@@ -71,6 +72,7 @@ def execute_batch(
projects,
rules,
copy_part_number_to_value=task.copy_part_number_to_value,
**({'runtime': runtime} if runtime is not None else {}),
)
metric['completed_units'] = len(session.commands)
initial_progress = progress
@@ -83,9 +85,10 @@ def execute_batch(
project_ids = {_path_key(project.path): project.project_id for project in projects}
if session.progress.completed_items > initial_progress.completed_items:
discovered_no_match = session.progress.completed_items - initial_progress.completed_items
progress = service._synchronize_quick_run_progress(task_id, progress=session.progress)
session.progress = progress
discovered_no_match = session.progress.no_match_items - initial_progress.no_match_items
if discovered_no_match > 0:
append_task_event(
service._logging,
level='INFO',
@@ -106,9 +109,9 @@ def execute_batch(
discovered_no_match,
progress.total_items,
)
else:
progress = session.progress
with backups, preparer.project_session_scope(enabled=reuse_project_session) as project_session:
progress = session.progress
with backups, preparer.project_session_scope(enabled=reuse_project_session,
**({'runtime': runtime} if runtime is not None else {})) as project_session:
while not progress.queue_complete:
if stop_event.is_set():
backups.commit_prefetched(progress)
@@ -137,7 +140,8 @@ def execute_batch(
try:
last_result = preparer.execute_step(task_id, projects, rules, copy_part_number_to_value=task.copy_part_number_to_value,
expected_item=expected, batch_mode=True, batch_session=session,
**({'project_session': project_session} if project_session.enabled else {}))
**({'project_session': project_session} if project_session.enabled else {}),
**({'runtime': runtime} if runtime is not None else {}))
metric['state'] = last_result.state
metric['completed_units'] = int(last_result.state in {'saved_ok', 'restored_ok', 'no_match'})
finally:
@@ -0,0 +1,133 @@
"""Durable write-ahead proof for one logical job in a private CAD attempt.
A prepared record is evidence of no write only while its complete identity still
matches. Helpers never create records and must fail closed if publication fails.
"""
import json
import os
from pathlib import Path
import re
import tempfile
import time
from uuid import uuid4
_IDENTITY = ('session_id', 'generation', 'attempt_id', 'task_id', 'job_id', 'project_path')
def _project(value):
return os.path.normcase(os.path.abspath(value))
def _validate(record):
if not isinstance(record, dict) or record.get('schema_version') != 1:
raise ValueError('invalid batch attempt schema')
for key in ('session_id', 'task_id', 'job_id', 'project_path'):
value = record.get(key)
if not isinstance(value, str) or not value.strip() or any(ord(c) < 32 for c in value):
raise ValueError(f'invalid batch attempt {key}')
generation = record.get('generation')
if type(generation) is not int or generation < 1:
raise ValueError('invalid batch attempt generation')
if not isinstance(record.get('attempt_id'), str) or not re.fullmatch(r'[0-9a-f]{32}', record['attempt_id']):
raise ValueError('invalid batch attempt ID')
if record.get('state') not in {'prepared', 'mutation_possible'}:
raise ValueError('invalid batch attempt state')
return record
def _publish(path, record):
path = Path(path)
descriptor, temporary = tempfile.mkstemp(prefix=f'.{path.name}.', suffix='.tmp', dir=path.parent)
try:
with os.fdopen(descriptor, 'w', encoding='utf-8', newline='') as handle:
json.dump(record, handle, ensure_ascii=False, indent=2)
handle.flush()
os.fsync(handle.fileno())
deadline = time.monotonic() + 1
while True:
try:
os.replace(temporary, path)
break
except PermissionError:
if time.monotonic() >= deadline:
raise
time.sleep(.02)
# POSIX needs a directory sync for the atomic rename; Windows does not
# expose fsync on directories through the CRT.
if os.name != 'nt':
directory = os.open(path.parent, os.O_RDONLY)
try:
os.fsync(directory)
finally:
os.close(directory)
finally:
Path(temporary).unlink(missing_ok=True)
def prepare_attempt(path, *, session_id, generation, task_id, job_id, project_path, attempt_id=None):
record = _validate(dict(schema_version=1, session_id=str(session_id), generation=generation,
task_id=str(task_id), job_id=str(job_id), project_path=_project(project_path),
attempt_id=uuid4().hex if attempt_id is None else attempt_id, state='prepared'))
Path(path).parent.mkdir(parents=True, exist_ok=True)
_publish(path, record)
return record
def read_attempt(path):
return _validate(json.loads(Path(path).read_text(encoding='utf-8')))
def _bound_attempt(path=None, *, job_id=None, task_id=None, project_path=None):
if path is None and 'DXPART_ATTEMPT_FILE' not in os.environ:
if any(key in os.environ for key in ('DXPART_BATCH_SESSION_ID', 'DXPART_BATCH_GENERATION', 'DXPART_ATTEMPT_ID')):
raise ValueError('missing batch attempt file')
return None
raw_path = os.environ.get('DXPART_ATTEMPT_FILE') if path is None else os.fspath(path)
if not raw_path or not Path(raw_path).is_absolute():
raise ValueError('invalid batch attempt file')
path = Path(raw_path)
job_id = str(job_id) if job_id is not None else os.environ.get('DXPART_JOB_ID')
task_id = str(task_id) if task_id is not None else os.environ.get('DXPART_TASK_ID')
if path.is_dir():
if not job_id or not re.fullmatch(r'[A-Za-z0-9_-]+', job_id):
raise ValueError('missing or unsafe batch attempt job ID')
path = path / f'{job_id}.json'
record = read_attempt(path)
expected = {'session_id': os.environ.get('DXPART_BATCH_SESSION_ID'),
'attempt_id': os.environ.get('DXPART_ATTEMPT_ID'),
'generation': os.environ.get('DXPART_BATCH_GENERATION')}
if not all(expected.values()) or str(record['generation']) != expected.pop('generation'):
raise ValueError('missing or stale batch generation')
if any(record[key] != value for key, value in expected.items()):
raise ValueError('stale batch attempt identity')
if not job_id or not task_id or record['job_id'] != job_id or record['task_id'] != task_id:
raise ValueError('batch attempt task/job mismatch')
# Optional environment bindings remain authoritative even when the caller
# supplies explicit command fields.
for key, value in (('DXPART_JOB_ID', job_id), ('DXPART_TASK_ID', task_id)):
if key in os.environ and os.environ[key] != value:
raise ValueError('batch process task/job mismatch')
if project_path is not None and record['project_path'] != _project(project_path):
raise ValueError('batch attempt project mismatch')
return path, record
def mark_mutation_possible(path=None, *, job_id=None, task_id=None, project_path=None):
bound = _bound_attempt(path, job_id=job_id, task_id=task_id, project_path=project_path)
if bound is None:
return None
path, record = bound
if record['state'] != 'mutation_possible':
record = dict(record, state='mutation_possible')
_publish(path, record)
return record
def can_retry_attempt(path, expected):
try:
_validate(expected)
actual = read_attempt(path)
return actual['state'] == 'prepared' and all(actual[key] == expected[key] for key in _IDENTITY)
except (OSError, ValueError, TypeError, KeyError):
return False
@@ -10,6 +10,7 @@ from .errors import TaskCenterError
from .execution_metrics import measure_phase
from .logging_setup import append_task_event
from .quick_run import TERMINAL_STATES, _path_key
from .schematic_backup import BACKUP_MANIFEST_NAME, _is_link_or_reparse
_BACKUP_STATE_NAME = 'batch-backups.json'
_BACKUP_DIRECTORY_NAME = 'batch-backups'
@@ -30,15 +31,26 @@ class BatchBackupCoordinator:
self.root = session.handoff.command_path.parent
self.state_path = self.root / _BACKUP_STATE_NAME
self.state = _read_backup_state(self.state_path, task_id)
self.project_root_keys = {_path_key(project.path):
_path_key(project.path.resolve(strict=False).parent) for project in projects}
self._jobs_by_root = {}
for command in session.commands:
key = self.project_root_keys[_path_key(command[2])]
self._jobs_by_root.setdefault(key, []).append(command[1])
for key, entry in self.state.items():
if entry.get('status') == 'backed_up' and (
self.project_root_keys.get(_path_key(str(entry.get('project_path') or ''))) != key
or not _reusable_backup(self.root, key, entry)
):
raise TaskCenterError('quick_run_backup_invalid',
'原始工程备份丢失、损坏或工程身份不一致,队列已停止;请保留现有备份和执行证据,不能用当前工程覆盖原始副本。')
self.backed_up_roots = {
key for key, entry in self.state.items()
if entry.get('status') == 'backed_up' and _reusable_backup(self.root, key, entry)
if entry.get('status') == 'backed_up'
}
self.unbacked_project_paths = [Path(str(entry['project_path']))
for entry in self.state.values()
if entry.get('status') == 'unbacked' and entry.get('project_path')]
self.project_root_keys = {_path_key(project.path):
_path_key(project.path.resolve(strict=False).parent) for project in projects}
self.continue_after_failure = continue_after_failure
self._backup = backup
self._write_state = write_state
@@ -58,6 +70,15 @@ class BatchBackupCoordinator:
return self.root / _BACKUP_DIRECTORY_NAME / f'project-{_backup_key(root_key)}'
def perform_backup(self, project_path, destination):
root_key = self.project_root_keys[_path_key(project_path)]
prior_work = any(
self.session.latest.get(job, ('', ''))[0] not in {'', 'no_match', 'batch_skipped'}
or (self.root / f'snapshot-{job}.tsv').exists()
for job in self._jobs_by_root.get(root_key, ())
)
if os.path.lexists(destination) or prior_work:
raise TaskCenterError('quick_run_backup_invalid',
'已有备份目录或工程执行记录,但无法确认原始备份;队列已停止,现有证据保持不变。')
with measure_phase(self.service._logging, self.task_id, 'backup_project',
project_path=str(project_path)) as metric:
self._backup(self.data_root, project_path, destination)
@@ -202,21 +223,86 @@ def _write_backup_state(path: Path, task_id: str, projects: dict[str, dict[str,
def _reusable_backup(backup_root: Path, root_key: str, entry: dict[str, object]) -> bool:
destination = backup_root / str(entry.get('destination') or '')
manifest = destination / '.dxpartreplace-backup.json'
if not manifest.is_file() or str(entry.get('destination') or '').replace('\\', '/') != (
relative = str(entry.get('destination') or '').replace('\\', '/')
if relative != (
f'{_BACKUP_DIRECTORY_NAME}/project-{_backup_key(root_key)}'
):
return False
try:
destination = backup_root / relative
manifest = destination / BACKUP_MANIFEST_NAME
if any(_is_link_or_reparse(path) for path in
(backup_root / _BACKUP_DIRECTORY_NAME, destination, manifest)):
return False
payload = json.loads(manifest.read_text(encoding='utf-8'))
return (
isinstance(payload, dict)
and payload.get('format_version') == 1
and payload.get('scope') == 'dxdesigner_schematic_essentials'
and isinstance(payload.get('files'), list)
)
except (OSError, UnicodeError, json.JSONDecodeError):
if (not isinstance(payload, dict) or payload.get('format_version') != 1
or payload.get('scope') != 'dxdesigner_schematic_essentials'
or not isinstance(payload.get('files'), list) or not payload['files']):
return False
source = Path(payload['source_root'])
project = Path(payload['project_path'])
if (not source.is_absolute() or not project.is_absolute()
or _path_key(source) != root_key or _path_key(project.parent) != root_key
or _path_key(project) != _path_key(str(entry.get('project_path') or ''))):
return False
expected = {}
total_bytes = 0
for record in payload['files']:
name, size, digest = record['path'], record['size'], record['sha256']
if (not isinstance(name, str) or not name or '\\' in name or ':' in name or '\0' in name
or any(part in {'', '.', '..'} or part.endswith((' ', '.'))
for part in name.split('/'))
or Path(name).is_absolute() or Path(name).is_reserved()
or name.casefold() in expected or name.casefold() == BACKUP_MANIFEST_NAME.casefold()
or type(size) is not int or size < 0
or not isinstance(digest, str) or len(digest) != 64
or any(character not in '0123456789abcdef' for character in digest)):
return False
expected[name.casefold()] = (size, digest)
total_bytes += size
if (project.name.casefold() not in expected
or payload.get('included_file_count') != len(expected)
or payload.get('included_bytes') != total_bytes):
return False
actual = {}
def walk_error(error):
raise error
for current, directories, files in os.walk(destination, onerror=walk_error):
current = Path(current)
if any(_is_link_or_reparse(current / name) for name in (*directories, *files)):
return False
for name in files:
path = current / name
if path == manifest:
continue
relative_name = path.relative_to(destination).as_posix().casefold()
if relative_name not in expected or relative_name in actual or not path.is_file():
return False
before = path.stat()
if before.st_nlink != 1:
return False
with path.open('rb') as stream:
opened = os.fstat(stream.fileno())
# Windows path/handle ctime semantics differ; compare identity,
# size and mtime across them, then each full stamp to itself.
if (_backup_file_stamp(opened)[:4] != _backup_file_stamp(before)[:4]
or opened.st_nlink != 1):
return False
digest = hashlib.file_digest(stream, 'sha256').hexdigest()
if (_backup_file_stamp(os.fstat(stream.fileno())) != _backup_file_stamp(opened)
or os.fstat(stream.fileno()).st_nlink != 1):
return False
after = path.stat()
if (_backup_file_stamp(before) != _backup_file_stamp(after)
or after.st_nlink != 1 or _is_link_or_reparse(path)):
return False
actual[relative_name] = (after.st_size, digest)
return actual == expected
except (OSError, UnicodeError, ValueError, KeyError, TypeError):
return False
def _backup_file_stamp(info):
return (info.st_dev, info.st_ino, info.st_size, info.st_mtime_ns, info.st_ctime_ns)
@@ -0,0 +1,86 @@
"""Readable release history, separate from authoritative resource proofs."""
from datetime import datetime, timezone
import json
import os
from pathlib import Path
from .logging_setup import LoggingContext, append_task_event, configure_logging
def _append_line(path, line):
path.parent.mkdir(parents=True, exist_ok=True)
with path.open('a', encoding='utf-8', newline='\n') as stream:
stream.write(line + '\n')
stream.flush()
os.fsync(stream.fileno())
def write_release_event(root, path, record, phase, *, context=None, reason='batch_end',
elapsed=0.0, error=''):
"""Try each diagnostic destination; failures never interrupt native cleanup."""
cleanup = record.get('cleanup') if isinstance(record.get('cleanup'), dict) else {}
confirmation = cleanup.get('desktop_confirmation')
confirmation = confirmation if isinstance(confirmation, dict) else {}
cad = record.get('cad_shutdown') if isinstance(record.get('cad_shutdown'), dict) else {}
disappeared = confirmation.get('released')
if phase == 'succeeded' and record.get('reconciled'):
disappeared = True
details = {'batch_id': record.get('session_id'), 'batch_kind': record.get('kind'),
'generation': record.get('generation'), 'desktop': record.get('desktop'),
'cad_pid': record.get('cad_pid'), 'cad_guid': record.get('cad_guid'),
'reason': reason, 'result': 'releasing' if phase == 'started' else (
'released' if phase == 'succeeded' else 'blocked'),
'elapsed_seconds': elapsed, 'record_path': str(path),
'desktop_handle_closed': cleanup.get('desktop_handle_closed'),
'desktop_disappeared': disappeared, 'cad_exit_code': cad.get('cad_exit_code'),
'quit_helper_exit_code': cad.get('quit_helper_exit_code'),
'cad_shutdown': cad, 'shutdown_warning': record.get('shutdown_warning'),
'retries': record.get('retries', {}), 'cleanup': cleanup, 'error': str(error)}
title = {'started': '开始释放后台资源', 'succeeded': '后台资源释放成功',
'failed': '后台资源释放失败,资源释放待处理'}[phase]
purpose = {'batch_end': '批次结束', 'rebuild': '安全重建', 'manual_retry': '重新清理',
'restart_recheck': '重启后重新检查'}.get(reason, reason)
cad_text = f"CAD PID={details['cad_pid']}" if details['cad_pid'] else (
'CAD 未启动' if record.get('cad_start_requested') is False else
'CAD 启动未完成绑定' if record.get('cad_start_requested') else 'CAD 启动状态未知')
message = (f"{title} · {purpose} · 批次 {details['batch_id']} · 代次 {details['generation']}"
f" · 桌面 {details['desktop']} · {cad_text} · 耗时 {elapsed:.3f} 秒")
if phase != 'started':
label = lambda value: '已确认' if value is True else '未确认'
message += (f" · 桌面句柄关闭:{label(details['desktop_handle_closed'])}"
f" · 桌面消失:{label(disappeared)}")
if cad:
message += f" · CAD 退出码={details['cad_exit_code']},退出助手码={details['quit_helper_exit_code']}"
if error:
message += ' · 原因:' + str(error)
message = message.replace('\r', '\\r').replace('\n', '\\n')
level = 'ERROR' if phase == 'failed' else 'INFO'
timestamp = datetime.now(timezone.utc).isoformat(timespec='milliseconds')
errors = []
try:
_append_line(Path(path).with_name('resource-release.log'),
f'{timestamp} {level} {message} | ' + json.dumps(details, ensure_ascii=False))
except Exception as failure:
errors.append('resource-release.log: ' + str(failure))
try:
context = context if isinstance(context, LoggingContext) else configure_logging(root)
except Exception as failure:
errors.append('application log: ' + str(failure))
return errors
for task_id in record.get('log_task_ids', ()):
try:
append_task_event(context, level=level, task_id=task_id,
operation='resource_release_' + phase, message=message, details=details)
except Exception as failure:
errors.append('task ' + str(task_id) + ': ' + str(failure))
try:
context.logger.log(40 if phase == 'failed' else 20, '%s | %s', message,
json.dumps(details, ensure_ascii=False))
if errors:
context.logger.error('resource_release_log_errors batch=%s errors=%s',
record.get('session_id'), errors)
for handler in context.logger.handlers:
handler.flush()
except Exception as failure:
errors.append('application log: ' + str(failure))
return errors
Loaded 100 of 213 files, more files were not shown because too many files have changed in this diff. Show more