Import DxPartReplace 1.2.0-beta.31 and Windows x64 dependencies
This commit is contained in:
1 parent
12895e9868
commit
427095212b
154 files changed
+8079
-267
No files matched your search
@@ -0,0 +1,11 @@
|
||||
# DxPartReplace 1.2.0-beta.10
|
||||
|
||||
- 替换结果及 Excel 导出增加原 Value / 实际回读 Value。原值来自替换前快照,实际值在原有属性核验后读取;保存重开核验后重新记录实际值。按 job_id / 返回状态关联并立即保存在事件日志,避免下一个规则覆盖证据。旧历史缺失数据明确标注,不推算实际值。
|
||||
- 左侧工程列表分为正在替换、未完成、已完成,三组独立折叠并记忆偏好;使用蓝色、浅橙色、绿色背景,损坏/校验失败工程额外标红。只将真实活动工程归入正在替换;旧轮次保留在历史。
|
||||
- 按用户要求:损坏/无法读取的工程关闭读取会话后跳过,不修复、不重复尝试打开。只读采集取消、CAD 启动和无进展等待均有界;在确认资源退出后继续后面的工程。
|
||||
- 旧版强制关闭留下的只读监督进程可在新导入前回收,必须同时核验旧主窗口已退出、监督进程 PID 和创建时间吻合、操作属于只读白名单。写入过程保护和其他 CAD 进程不受此规则影响。
|
||||
- 新增“停止当前工程”,外层结束本次自有进程而不等待 COM,标红“已停止 / 结果待核验”。界面批量调度按工程隔离监督进程,保护当前工程后停止本轮;尚未执行的工程可另行继续。原有 Replace Part、属性恢复、保存和核验逻辑不变。安全暂停继续等待当前项收尾。
|
||||
|
||||
升级时保留完整 data,与新 EXE 和 _internal 配套使用。修复的是采集、取消和调度流程,不修复工程 iCDB 数据库。
|
||||
|
||||
验证及边界详见 docs/superpowers/plans/2026-10-29-values-and-project-groups.md。
|
||||
@@ -0,0 +1,13 @@
|
||||
# DxPartReplace 1.2.0-beta.11
|
||||
|
||||
本版增加读取和解析的诊断记录,用于定位 UID 报告格式、CAD 启动、工程打开及器件采集中的具体问题。保持所有解析接受条件、UID 校验、原生替换、Value/NC、取消和资源释放策略不变。
|
||||
|
||||
- `application.log` 增加受监督只读操作的进度、校验返回的通过/失败/未核对行数,以及最多 100 条失败行的工程、Excel 行号和原因。明确区分“调用返回”和“校验通过”。
|
||||
- 每次原生清单/后台 CAD 读取的证据目录增加 `read-trace.jsonl` 和 `read-state.json`,记录 UTC 时间、进程、工程/任务标识、解析阶段和退出结果。后台工作进程每 5 秒记录等待状态、无进展秒数、计数和是否请求取消;不模拟进度。
|
||||
- 原生 UID 错误增加报告文件名、行号、UID 原文和字符编码、附近报告片段;同时保留有界的正常器件标识样例。可区分大写 I、小写 l、数字 1 及隐藏字符;不会自动改写 UID。
|
||||
- 诊断包新增上述记录及现有原生采集元数据、工作进程状态/输出、读取会话释放记录;优先导出近期读取记录。继续执行容量限制和用户路径/凭证脱敏,不导出完整原生报告、BOM、数据库或工程。
|
||||
- 所有新增追踪写入均为尽力记录。诊断存储不可写时,不改变业务结果或跳过资源清理。
|
||||
|
||||
使用:升级后重新导入有问题的清单,出现等待或失败时点击“诊断包”,发送生成的完整 ZIP。仅发送 application.log 无法包含详细报告片段。新版本不能补录旧版已经发生的解析过程。
|
||||
|
||||
便携版已包含运行依赖;仍需本机安装可用的 DxDesigner。升级保留完整 data,并配套使用新 EXE 和 _internal。
|
||||
@@ -0,0 +1,7 @@
|
||||
# DxPartReplace 1.2.0-beta.12
|
||||
|
||||
- 诊断包 `DxPartReplace-诊断-20261030-112928` 显示:工程实际已打开;原生展开报告中的 `POWER_IN`,符号 `in.1` 且没有位号,被误判为缺少 UID 的物料。随后 CAD 采集又因为某对象 UID 或位号为空而停止。该诊断没有记录第二个对象的字段,因此不能断定它就是 POWER_IN,也不能由此认定工程损坏。
|
||||
- 原生解析只排除明确的 POWER_IN/in.1、POWER_OUT/out.1 无位号命名端口,要求符号类型单一、两份报告端口数量一致;其他不明对象继续执行原有安全检查和 CAD 回退。
|
||||
- CAD 采集按 BOM 位号匹配:无位号对象无法作为替换目标,跳过并记录;可定位的器件仍必须具有 UID。保留全部有位号器件,继续检测不同料号下重复位号。跳过对象的 UID、料号及图页写入日志,最多记录 20 条并显示总数。诊断包现在包含相关运行日志。
|
||||
- 真正的“有位号但缺 UID”单独报告器件身份不完整,不再直接断言工程损坏。替换、核验及 Value/NC 规则不变。
|
||||
- 本版按诊断证据构造报告、使用实际 Windows Script Host 运行模拟 CAD 的真实采集脚本,并执行回归及便携版启动检查。未对真实用户工程进行替换验收。
|
||||
@@ -0,0 +1,10 @@
|
||||
# DxPartReplace 1.2.0-beta.13
|
||||
|
||||
- 排查诊断包 `20261030-132517`:`LDO_S2032_SOT23_1V5` 两次通过后台 CAD 采集,随后工程文件指纹不可用;第二次快照读取 `database/icdb.dat` 时返回拒绝访问。当时同一自有只读 CAD 会话仍存活,但记录不足以证明具体占用者。
|
||||
- 当采集后完整指纹无法读取,仅在当前自有只读 CAD 的工程及工作进程已经通过同一工程和会话检查点确认关闭时,释放本次会话后重新读取完整指纹。设计文件变化仍不能通过;仅数据库会话数据变化仍需两次相同的器件清单。资源释放失败立即停止。若确认释放后仍无法核验,报告并跳过该工程,其他工程可以继续。
|
||||
- 原生清单按 `in.1` / `out.1` 类型识别无位号命名端口,如 `POWER_EN`,并保留两份报告的计数核对;不明、重复或不一致的符号仍回退到 CAD 验证。
|
||||
- 端口名称不限制为某个 CBB 或某个器件,可包含中文及常见标点;CAD 回退对无位号对象也采用通用规则。`20261030-134255` 诊断包中,BOB_XPON、CA_CARD_HIGH 等也出现了工程指纹校验失败;由于日志遗漏,不能断定各工程的具体占用原因相同。
|
||||
- Value 识别增加 `_NC`、`_nc`。旧 Value 含标识时,以新 Part Label 加 `/NC`;新值已有任一有效标识不重复,Part Label 不存在时保留旧 Value。`NC_OPTION`、`_NCM` 等较长文本不会误判。
|
||||
- 诊断包优先收集最近任务、后台记录及主日志的有界尾部;文件数与总大小仍有限制,继续脱敏并排除原始工程及数据库。
|
||||
|
||||
升级保留整个 `data`,配套使用 EXE 与 `_internal`。自动测试使用模拟工程和 Windows Script Host;本次未修改真实 CAD 工程,请在目标电脑先重新导入并核对实际结果。
|
||||
@@ -0,0 +1,14 @@
|
||||
# DxPartReplace 1.2.0-beta.9
|
||||
|
||||
修复强制退出后 CBB 导入被旧后台会话记录长期阻塞的问题。
|
||||
|
||||
- 导入/采集/执行前,在独占批次锁内自动复核已退出进程和资源记录,归并中断的监督记录;不重放旧请求。
|
||||
- 主窗口退出时,后台的人工核验等待可在持久保存中断保护后退出收尾,避免等待已不存在的主窗口。
|
||||
- 已退出监督进程、已退出 CAD/工作进程和空私有桌面的联合证据允许回收残留桌面对象;未知或仍存活的资源保持阻断。
|
||||
- 手动“检查后台会话”不再启动另一个清理监督进程;仍有待处理资源时明确提示,不再一律报告成功。
|
||||
- 保留全部中断写入保护、已保存执行结果和历史数据;原生替换和 Value/NC 规则未修改。
|
||||
- 白色界面优化工程名称/次要信息、导航选中态、状态标记、卡片间距和简短错误提示;器件明细保持主要空间,进度仍可折叠。
|
||||
|
||||
升级:关闭旧版,保存并保留完整 data,将新包 EXE 和 _internal 配套更新。若旧版后台已卡住,先保存其他 CAD 工程并重启一次电脑再使用新版。不要删除保护记录绕过核验。此更新处理软件恢复,不修复已损坏的工程 iCDB 数据库。
|
||||
|
||||
验证记录见 2026-10-29 interrupted-import 实施计划。进程级验证仅使用临时目录、真实 Windows 监督进程和模拟业务,没有打开或修改用户 CAD 工程。
|
||||
@@ -0,0 +1,38 @@
|
||||
# Workspace Redesign Implementation Plan
|
||||
|
||||
> **For agentic workers:** Use superpowers:executing-plans inline. Track the checked tasks and evidence here.
|
||||
|
||||
**Goal:** 实现讨论确认的白色工作区、可重复导入和 Value/NC 规则,同时保持原生器件替换机制。
|
||||
|
||||
**Architecture:** 原生 VBS 继续负责替换与属性核验;Python 导入层负责每次实时库存、路径映射与按工程校验;新的 Qt 工作区复用已验证服务、后台 worker 和持久化接口。
|
||||
|
||||
**Tech Stack:** Python 3.12, PySide6, pywin32, openpyxl, VBScript, pytest, PyInstaller.
|
||||
|
||||
**Spec:** docs/superpowers/specs/2026-10-27-workspace-redesign.md
|
||||
|
||||
## Global Constraints
|
||||
|
||||
- 固定白色,工程列表/器件明细独立卡片,紧凑进度。
|
||||
- 原生替换和连接/身份核验不移除;开发不修改真实 CAD 工程。
|
||||
- 源码无 Git;在当前目录工作,ZIP 是原始回退点。
|
||||
|
||||
## Review Focus
|
||||
|
||||
- 新旧料号并存、同位号跨图页、其他料号不能被误认已完成。
|
||||
- 已完成或删除任务不能让新导入使用陈旧库存。
|
||||
- 多文件重复器件和工程重名必须报告而不重复替换。
|
||||
- 缺少/空白 Part Label 的赋值、保存回读和恢复路径须一致。
|
||||
- 后台资源释放失败不能抹掉已核验结果,未核验不能当成功。
|
||||
|
||||
## Tasks
|
||||
|
||||
- [ ] 1. 环境/基线:保存源码备份,建立 Python 3.12 环境,运行现有 pytest;建立本文件作为进度账本。
|
||||
- [ ] 2. Value/NC:添加并运行真实 cscript 替身回归(先失败),实现缺失 Part Label 使用快照旧 Value,独立 NC 不分大小写,正常/恢复/验证一致。
|
||||
- [ ] 3. 导入:添加新旧料号混合回归(先失败);增加实时新旧料号库存和逐器件已达目标跳过、工程路径映射、多表合并、独立工程错误隔离。
|
||||
- [ ] 4. Qt 工作区:添加界面行为回归(先失败);新建白色桌面 shell,单工程/批量入口、独立工程与器件框、内嵌结果/历史、紧凑进度与日志导出,接入实际后台服务。
|
||||
- [ ] 5. 集成/交付:运行完整默认测试及受影响 VBS/应用/打包回归,截图检查桌面,构建 EXE 和说明;复核核心接口和未决实机风险。
|
||||
|
||||
## Ledger
|
||||
|
||||
Ruling: 用户已明确批准界面及功能并要求开始实现,因此不再要求重复批准实施计划。
|
||||
Ruling: 没有 Git 元数据,原位修改并保留同级源码 ZIP,不能创建 Git worktree 或提交。
|
||||
@@ -0,0 +1,45 @@
|
||||
# Interrupted import recovery implementation plan
|
||||
|
||||
> **For agentic workers:** Use superpowers:executing-plans to implement this plan task-by-task.
|
||||
|
||||
**Goal:** Permit CBB import after a crashed read session once resource exit is proven, retaining write uncertainty and improving the approved white workspace.
|
||||
|
||||
**Architecture:** Reconcile abandoned ownership under the existing supervisor lease before native admission; use the same path for manual cleanup. Keep business protection independent from physical resource release.
|
||||
|
||||
**Tech Stack:** Python 3.12, PySide6, Win32, PyInstaller.
|
||||
|
||||
**Spec:** ../specs/2026-10-29-interrupted-import-design.md
|
||||
|
||||
## Global constraints
|
||||
|
||||
- Do not change replacement/property rules or delete engineering data.
|
||||
- Retain uncertain-write markers and previously saved results.
|
||||
- Keep fixed white theme, left project list, compact progress and portable runtime.
|
||||
- The workspace has no Git metadata; edit in place and preserve user data.
|
||||
|
||||
## Review focus
|
||||
|
||||
- Dead read supervisors must not permanently block unrelated imports.
|
||||
- Interrupted writes must stay protected after physical cleanup.
|
||||
- Live or unknown process/desktop ownership must remain blocked.
|
||||
- A cleanup request must not create another stale cleanup supervisor.
|
||||
- Pending cleanup must not be presented as successful release.
|
||||
|
||||
## Tasks
|
||||
|
||||
- [x] Add failing crash-record/admission, empty-desktop and UI cleanup-feedback regression tests.
|
||||
- [x] Implement preflight reconciliation in batch_supervisor.py and proven orphan checks in batch_resources.py; run the targeted tests and existing safety coverage.
|
||||
- [x] Refine workspace_window.py/workspace_styles.py with compact status/notice, project list delegate, empty state and accurate cleanup feedback; render the actual Qt window.
|
||||
- [x] Review changes, run relevant checks, update version/release notes, build and inspect the portable beta.9 ZIP.
|
||||
|
||||
## Execution ledger
|
||||
|
||||
- Investigation: uploaded application.log contains only recent overview reads and export_diagnostics, without the shown earlier exception. Screenshot identifies batch_resources_pending; source confirms unconditional pending-supervisor admission and manual-only reconciliation.
|
||||
- Ruling: apply established UI choices and authorized repair directly; no new UX workflow or approval round needed.
|
||||
- Investigation: wait_for_resolution retained an interactive wait even after the actual GUI parent exited. Added durable owner-exit notification; pipe loss with a live parent only requests ordinary stop.
|
||||
- RED/GREEN: old admission reproduced batch_resources_pending; old manual cleanup unnecessarily launched another supervisor; old orphan empty-desktop recovery remained blocked. Regression tests now pass. A real temporary GUI was killed while its worker awaited reconciliation; worker exit and next batch admission passed without CAD.
|
||||
- Review: fixed exact CAD identity preference for PID reuse and gated orphan marker publication on confirmed parent exit. Fresh read-only reviewer found no remaining medium/high issues.
|
||||
- Ruling: corrected existing test fixtures for atomic PID observation, explicit extended-path directory creation and intended empty-residue semantics; no safety assertions for live windows were removed.
|
||||
- Ruling: native junction creation uses an existing 8.3 DOS target when available; direct extended-prefix targets are not valid for CPython's helper. Canonical target verification remains mandatory. Existing regression failed before correction and passes afterward.
|
||||
- Verification: 162 tests passed in 45.83s across interrupted-import recovery, supervisor/runtime, safe stop, isolated desktop/CAD, workspace import/operations/feedback/window and packaging. Real Qt screenshots inspected at 1400x940 and 1280x800.
|
||||
- Packaging: PyInstaller build and frozen EXE runtime smoke passed (real child process identity and private-desktop release, environment Python variables removed). ZIP CRC, required runtime files, beta.9 version and SHA256 sidecar verified; 254 files, including 229 dependency files, no user data. Archive SHA256: 79741a786ca8cf8cac3e7d5b28e0044d852b95432da96d40215874e8eb30691d.
|
||||
@@ -0,0 +1,32 @@
|
||||
# Value readback and collapsible project groups
|
||||
|
||||
User-authorized scope: display original and actual readback Value in results/export; three independently collapsible, clearly colored project groups. Existing white layout and replacement/attribute rules remain binding.
|
||||
|
||||
Design: collect Value using a read-only report after existing restore/save verification. Bind reports to the exact job/state and persist structured values in task events before the next queue item starts. Missing historical evidence displays “未记录”; do not derive actual Value from Part Label or a planned new value. Preserve existing five-column result parser callers through an optional detailed mode. The workspace/export use eight columns.
|
||||
|
||||
Sidebar groups: 正在替换 (blue), 未完成 (amber), 已完成 (green), including counts. Running and unfinished default expanded; completed defaults collapsed. Remember each group's preference. Only the active queue project is running; completed and validated already-target-only projects belong to completed. Failures/paused/unconfigured remain unfinished. Group headings do not select an engineering project or change execution order. Feedback moves projects between groups and refreshes terminal statuses.
|
||||
|
||||
- [x] Add failing structured Value parsing/report correlation tests and real WSH read-only report tests.
|
||||
- [x] Record and ingest Value readback, extend workspace result and Excel columns; preserve historical/failed-result honesty.
|
||||
- [x] Add collapsible groups, backgrounds, persistence and active-project updates with UI regression tests.
|
||||
- [x] Render actual results/group states, review, run relevant checks, build and verify portable beta.10.
|
||||
|
||||
Constraints: no actual user CAD project writes during verification; preserve old data and interrupted-write protections. No Git metadata is present.
|
||||
|
||||
## Steering and execution ledger
|
||||
|
||||
- User added corrupt-project cancellation/restart failure, then explicitly requested skip/no recovery for read failures, then immediate current-project Stop without waiting for COM. These are part of this delivery.
|
||||
- Read cancellation/runtime work was delegated under subagent-driven-development; Value/UI and final integration stayed in the parent. Read task limits: startup45s, no-progress45s +5s grace; cancel5s, bounded owned Quit/Job cleanup. Failed read sessions release before skip; no automatic failed-project retry.
|
||||
- Task reviews caught and resolved native CLI nonzero skip semantics, exact request/claim provenance for orphan termination, recovered Value reporting, first-project Running rendering and same-window old-round duplication. Reviewer usage limit prevented a final independent reread; parent finishes with regression and integration checks.
|
||||
- Immediate Stop uses one existing supervised engine per project. It durably protects only that project, exits owned processes, marks persistent manual_stop and leaves later projects unlaunched. Existing mixed/write interruption handling remains.
|
||||
|
||||
## Final verification — 2026-10-29
|
||||
|
||||
- Combined regression: **365 passed in 91.44s**, covering read/restart resource admission, real owned-process cancellation and forced Stop, isolated CAD lifecycle, native inventory handling, grouped UI, results/export, recovery evidence, real WSH Value reports, unchanged Value policy and packaging tests. Uses base Python with project/venv packages and offscreen Qt; does not open user CAD projects.
|
||||
- Initial concurrent build/regression run had one failure in the 1-second native-sidecar liveness timing test (364 passed). No monitor logic was changed to suppress it: the full monitor module passed 33/33, then the complete combined selection passed serially as above. Heavy concurrent build load is suspected, not proven, as the initial timing cause.
|
||||
- Actual Qt previews inspected at 1280 and 1400 widths: `build/beta10-workspace-1280.png`, `build/beta10-workspace.png`, `build/beta10-workspace-results.png`. Red current-project Stop remains visible in the compact bottom toolbar.
|
||||
- PyInstaller completed successfully; EXE FileVersion `1.2.0.10`, ProductVersion `1.2.0-beta.10`.
|
||||
- `tools/verify_packaged_runtime.py dist/DxPartReplace/DxPartReplace.exe build/beta10-frozen-check` passed with Python environment overrides removed. Actual frozen supervisor launched, process creation time read, owned desktop and process resources positively released, clean application exit recorded.
|
||||
- ZIP verified: 254 files, bundled Python DLL and native VBS present; VBS byte-identical to source; no `data/` user records; CRC test and SHA-256 sidecar match.
|
||||
- Deliverable: `dist/DxPartReplace-1.2.0-beta.10-Windows-x64.zip` (51,642,840 bytes), SHA-256 `ab4585e1580cbf638ccfab5e45cb8c44144619fafe55559095467553a8cc0151`.
|
||||
- Boundary: no real user DxDesigner project was replaced during verification. Existing developer-machine long-path fixture failures remain outside this change and are disclosed in the bundled instructions.
|
||||
@@ -0,0 +1,17 @@
|
||||
# Discovery fingerprint and signal ports
|
||||
|
||||
Evidence from `DxPartReplace-诊断-20261030-132517.zip`: the LDO_S2032_SOT23_1V5 native reader rejected the named `POWER_EN` symbol of type `in.1`. The fallback CAD reader opened the project and completed twice, each time returning ten component identities. The second native snapshot got `PermissionError` on `database/icdb.dat`; the same read-only CAD session remained alive. The task then failed in DiscoveryCache after its post-read fingerprint could not be verified. This indicates a locked/unreadable database; the bundle cannot prove which process held the lock. No CAD replacement occurred in this import.
|
||||
|
||||
Fix: recognize named in.1/out.1 ports independent of their names, retaining empty-reference, unique symbol-type, empty path, and paired-report count checks. For a post-discovery fingerprint that is unavailable, request release only from the active owned read-only CAD session after validating its matching project, session and closed-project/worker checkpoint. Recompute the entire fingerprint after confirmed release, then keep existing design-change, database-churn, equal-inventory, and cache-admission guards. A failed release or still-unreadable/changed project is not treated as valid; write sessions are never terminated by this path.
|
||||
|
||||
Diagnostic export: the supplied bundle reached the 512-file cap and omitted current task evidence, and application.log exceeded the per-file limit. Export a bounded redacted tail of the current application log, prioritize recently active tasks and recent batch sessions, and raise the still-bounded count to 4096 while retaining the existing 32 MiB and symlink/allowlist limits.
|
||||
|
||||
Tests: reproduce an owned CAD database lock, ensure real project modifications remain rejected, verify per-read database churn requires two equal inventories, verify failed cleanup is not cached, test the actual runtime checkpoint/ownership guard and write-session exclusion, cover POWER_EN and other named ports plus ambiguous symbol cases, and test bundle prioritization/tail redaction. No user CAD write during testing.
|
||||
|
||||
Steering: additionally recognize old Value's `_NC` and `_nc` as NC markers, using the existing `/NC` output convention, preventing duplicates, preserving original Value without a new Part Label, and rejecting longer tokens such as NC_OPTION. If a positively released read session still leaves the project unverifiable, report a released-project error so the BOM batch can continue with other projects.
|
||||
|
||||
The later `20261030-134255` bundle also shows the same final fingerprint error for BOB_XPON and CA_CARD_HIGH; several preceding projects passed and remaining rows were left unchecked. Its 512-file export cap omitted 485 records, so the exact underlying fingerprint issue for each project is not available. Do not assert they all have the same lock or are damaged. Port recognition is not tied to a project or fixed UID/name: named in.1/out.1 symbols with no Ref Designator are checked in both reports, including names with punctuation and non-ASCII text; unsupported or ambiguous cases still fall back to CAD. The existing CAD inventory handles no-reference objects generically across projects while retaining all addressable components.
|
||||
|
||||
Verification: 529 regression tests passed before the `_NC` and released-project reporting steering. Afterwards, 375 focused tests passed covering the modified NC flow, full actual VBS restoration on WSH fakes, cache safety, batch continuation, resource ownership, diagnostic export and UI. After further generalizing port-name characters, 73 impacted tests passed, including Chinese/punctuation names, ambiguous identities, actual WSH `_NC`, and verified-release skip behavior. The beta.12 VBS and final source differ only in the requested NC recognition regex. No real CAD engineering project was opened or written.
|
||||
|
||||
PyInstaller beta.13 build succeeded. Frozen supervisor, process identity and resource-release smoke passed with a fresh data root; ZIP CRC and SHA-256 sidecar passed, Python runtime included, source VBS matches bundled VBS, updated parser/cache modules archived, version 1.2.0.13, and no user data included. Deliverable: `dist/DxPartReplace-1.2.0-beta.13-Windows-x64.zip`, SHA-256 `855cffb0bfe3a3e98a2363ed22a4f612442905ea4b578c41a153b1f2a28a5fc2`.
|
||||
@@ -0,0 +1,11 @@
|
||||
# Power port identity during BOM inventory
|
||||
|
||||
Evidence: the supplied 11:29 diagnostic bundle for `LDO_1117_1V5` records a successful CAD open, followed by `inventory_read_component ... component identity is incomplete`. The native flat report rejects `POWER_IN`, whose symbol name is `in.1` and whose reference designator is blank. The native report also shows actual components including CP04 with `$1I44`. The exact CAD object with the incomplete identity is not recorded, so the CAD-side cause is not proven to be the same port.
|
||||
|
||||
Fix both causes without changing replacement or attribute rules: the native parser excludes only unambiguously identified POWER_IN/in.1 or POWER_OUT/out.1 named ports, and verifies that their counts match between both reports. Other malformed or ambiguous symbols continue to require CAD fallback. During CAD inventory, objects without a reference designator cannot be addressed by a BOM row and are excluded with logged details and a visible progress message. A nonempty reference with missing UID continues to fail. The wildcard inventory still collects all addressable components to detect duplicate references. A true missing UID is reported as an identity issue, not conclusively as a corrupt project.
|
||||
|
||||
Verification: use report fixtures based on the observed evidence, negative cases for conflicting symbol types and mismatched reports, real WSH tests using fake COM-shaped objects for the actual discovery routine, read-only recovery/cleanup tests, the existing Value/NC and native replace contract tests, and a frozen portable build. No actual user CAD project is opened or modified during automated tests.
|
||||
|
||||
Completed: 486 selected regression tests passed in 84.51s, including actual WSH execution of the discovery routine with named POWER_IN, a valid component, and a duplicate reference using another part. Tests verify missing UID for a real reference still fails, ambiguous named ports do not bypass checks, and released resources permit subsequent work. The extracted recovery-label test needed a stub for the existing Value-readback reporter; the real readback is separately covered by integration tests.
|
||||
|
||||
Compared the previous beta.11 bundled VBS with the current source: every routine outside the discovery subroutine and its new helper is identical after newline normalization. Frozen beta.12 passed the packaged supervisor/resource-release smoke check. ZIP CRC, version metadata, bundled Python, new VBS/source match, parser presence and SHA-256 sidecar all verified; user data is excluded. Deliverable: `dist/DxPartReplace-1.2.0-beta.12-Windows-x64.zip`, SHA-256 `083cf51bd37c6c9a34081d325bd5c8a8220b9c5d66de6eb389f5e92ccc10bf8c`. Actual user project and the precise CAD object missing UID/refdes remain to be checked on the target computer.
|
||||
@@ -0,0 +1,17 @@
|
||||
# Read and parser diagnostics
|
||||
|
||||
User request: record the parsing process so a later diagnostic export identifies the stalled stage. This is observability only; preserve parser acceptance, UID checks, replacement/property rules, cancellation and resource ownership behavior.
|
||||
|
||||
Implementation: bounded, best-effort JSONL traces plus an atomic last-stage snapshot beside existing native/discovery evidence. Record timestamp/PID/project, parser stages, tool exits, exact failing UID and report line context, CAD startup/worker stages, progress and stop/timeout/exit outcomes. Keep the main application log useful by recording supervised read progress and row/project report outcomes. Extend the diagnostic allowlist for these artifacts, worker status/output and existing native metadata; export sampled report context rather than full source reports or databases.
|
||||
|
||||
- [x] Add failing tests for invalid UID context, trace bounds/non-interference, real worker stage traces and diagnostic export.
|
||||
- [x] Implement parser and read-stage evidence, application summaries, bundle coverage.
|
||||
- [x] Run focused regressions and packaged runtime verification; build portable beta.11 and document how to reproduce/export.
|
||||
|
||||
No user CAD writes during verification. Trace I/O failure must never alter a business result or bypass resource cleanup.
|
||||
|
||||
Verification so far: 6 new targeted checks initially failed for missing tracing/progress/export, then passed. Read/runtime/diagnostic regression: 169 passed. Combined selection including UI, native ASCII parsing, stop/restart, service, unchanged Value/NC policy, real WSH reports and packaging: 413 passed in 82.62s. After adding report-header samples, reran all affected native-parser/reader/trace/export tests: 60 passed in 1.95s. No acceptance criteria or native VBS replacement code changed.
|
||||
|
||||
Final package verification: PyInstaller build succeeded. Frozen EXE runtime smoke passed using a fresh `build/beta11-frozen-check` with Python environment overrides removed; real owned supervisor/desktop resources released and clean exit recorded. Confirmed the new read_trace module is archived in PYZ, EXE FileVersion 1.2.0.11 / ProductVersion 1.2.0-beta.11. ZIP CRC test passed, Python runtime present, no user data included, native VBS byte-identical to source and SHA-256 sidecar matched.
|
||||
|
||||
Deliverable: `dist/DxPartReplace-1.2.0-beta.11-Windows-x64.zip`, 51,655,699 bytes; SHA-256 `bd4b50eaf2263ca28b86ea13548df6d3876e643ad52ee913d41d5f12f7c88087`. No real user CAD project opened or modified. Reproduce after upgrade and send the full diagnostic ZIP; old incidents cannot be retroactively traced.
|
||||
@@ -0,0 +1,20 @@
|
||||
# 物料替换工作区重构
|
||||
|
||||
## 已确认的产品行为
|
||||
|
||||
- 单工程和批量替换分别提供入口,共用原生替换、属性恢复和保存回读执行链。默认使用自有独立后台 CAD。
|
||||
- 固定白色界面、蓝色主按钮、柔和玻璃卡片。工程列表与当前工程器件明细分别成框。紧凑进度栏保留阶段、时间、进度、日志和诊断导出;详细阶段按需展开。
|
||||
- 支持总表、多份 CBB 分表及分表目录。先精确匹配路径,再按相对目录和唯一 CBB 名称匹配。冲突必须人工指定,不能猜测同名工程。
|
||||
- 每次重新读取当前库存。相同器件当前料号为旧料号则待替换,为目标新料号则禁用并标记已是目标,其他料号或身份不唯一则报错。一个 Excel 行多个位号分别判定。
|
||||
- 部分工程校验失败时,通过的工程可先保存执行;不确定 CAD 资源或保存结果继续阻断执行。
|
||||
- 删除只移出当前列表,历史证据保留;再次导入新建处理轮次,不能重放有未核验结果的旧操作。
|
||||
- 默认替换后 Value 来源为新器件有效 Part Label。属性不存在或空白时使用替换前快照中的旧 Value。旧 Value 的独立 NC/nc 或 /NC、/nc 标记同步到新 Value,避免重复追加;不把 NCM、NC_OPTION 判为 NC。旧 Value 样式按现有机制恢复。
|
||||
- 实际保存回读结果在独立结果页可见,不能把计划当实际成功。日志记录运行版本、工程、阶段、目标、异常编号、堆栈、阶段耗时和后台退出证据,支持导出诊断 ZIP。
|
||||
|
||||
## 工程约束
|
||||
|
||||
继续使用 Python 3.12 / PySide6,原生对话框与 Library Wins、器件身份和连接完整性检查保持。保留旧服务和旧数据兼容入口。不得在用户真实 CAD 工程上自动做开发测试;使用 VBS 替身、临时工程和 Qt offscreen 验证。
|
||||
|
||||
## 交付
|
||||
|
||||
当前源码目录无 Git 元数据,在同级保存修改前 ZIP。交付更新源码、可运行桌面程序与使用说明,标注实机 CAD 验证范围。
|
||||
@@ -0,0 +1,13 @@
|
||||
# Interrupted import recovery and workspace polish
|
||||
|
||||
The user authorized fixing CBB import after a forced exit and improving the existing white workspace. Existing decisions remain binding: project list in the sidebar, large component table, compact progress, persistent history, original replacement and Value/NC rules.
|
||||
|
||||
Recovery runs under the existing exclusive supervisor lease before launching another native batch. Recheck exact process identities, reconcile abandoned supervisor journals, retain all interrupted-write markers, and release only resources proven inactive. A dead supervisor plus exited recorded workers/CAD and an empty private desktop can be reconciled without requiring the obsolete owner to publish a final handle-close certificate. Live or unreadable ownership stays blocked with an actionable message. Never delete project databases or replay replacement work.
|
||||
|
||||
Explicit resource recheck uses the same local reconciliation path rather than creating another cleanup supervisor. The UI reports pending versus released resources accurately. Diagnostics retain the underlying error; the banner presents a short actionable description.
|
||||
|
||||
Visual changes refine the existing layout: neutral white cards, clearer navigation and project selection, compact header/controls, muted project metadata, accessible table text and a compact status badge. No dark mode or larger progress area.
|
||||
|
||||
Approaches: deleting protection files would lose uncertainty evidence; always requiring manual cleanup reproduces the reported dead end. Automatic evidence-based reconciliation is selected within the user's existing authorized recovery scope.
|
||||
|
||||
Validation uses synthetic persistent crash records, real Windows supervisor child processes without CAD, mocked Win32 observations for empty/live desktop cases, existing safety tests, UI rendering, and portable packaging. Real project writes are not part of validation.
|
||||
@@ -0,0 +1,35 @@
|
||||
# beta.16 代码审查与修复记录
|
||||
|
||||
日期:2026-10-30。
|
||||
范围:工作区 BOM 导入/草稿/保存、工程切换、任务暂停/继续、只读 CAD 采集错误、后台资源复核。通过实际分支追踪、临时工程/Excel 回归用例和独立审查确认问题;不将推测作为已修复根因。
|
||||
|
||||
## 发现与修复
|
||||
|
||||
| 优先级 | 触发条件与影响 | 修复位置与行为 |
|
||||
|---|---|---|
|
||||
| P1 | 重新导入某工程时,监督器在读取报告产生前拒绝/取消;该工程原有草稿、预览和已保存计划的执行资格可能继续保留 | workspace_window.py `_error`、`_stage_import`:无报告错误也带回工程范围;撤销本次工程旧草稿/预览,添加待处理状态;工程路径标识统一大小写,执行时排除这些工程,其他工程保持可用 |
|
||||
| P2 | 逐份导入两个 CBB 且第一份未保存;第二次导入覆盖第一份的完整核验预览,保存时第一份被迫重新采集或因旧基线失败 | `_stage_import` 合并不受本次导入影响的预览,保留原始基线;仅更新当前清单涉及的工程,保存仍在事务内重新验证基线和工程身份 |
|
||||
| P2 | 导入后 current_id 已变,旧器件表尚未刷新且 dirty=true;旧行可能被保存到新工程草稿名下,造成串行显示/身份不符拒绝保存 | `_table_task_id` 绑定表格所属任务,记忆草稿前检查任务身份;导入切换时清空和禁止编辑旧表格,等待新上下文返回 |
|
||||
| P2 | 共享 TargetFilter 默认隐藏所有未选中行,手工配置页没有“显示未选中”开关,导致未勾选器件全部消失且无法勾选 | 共享器件表恢复默认显示全部;新版工作区显式保持默认隐藏未选中,并可用复选框展开 |
|
||||
| P2 | 在两个工程之间暂停,外层返回 paused=false 和临时随机 token;界面错误显示“运行结束”。在通知当前工程后、监督器启动前暂停,又会显示取消异常 | workspace_execution.py 正确返回暂停及下一工程;工程边界暂停没有内层 token,仅中途暂停保留真实 token;继续仅使用当前可见且校验可执行的工程,避免使用不存在的队列编号 |
|
||||
| P2 | 读取超时被统一显示成“工程损坏或无法读取”,误导排查 | batch_runtime.py 在确认只读会话释放后区分打开超时、其他读取超时、CAD 启动失败、身份不完整和一般读取失败;工程列表同步显示超时状态 |
|
||||
| P2 | 原生报告位号与属性冲突只记录计数和一句话,诊断包无法找出触发回退的器件 | native_inventory_protocol.py 在保留原有回退判定的同时,记录具体 UID、标题位号、属性位号、报告行号;未放宽身份/重复位号核验 |
|
||||
|
||||
## 验证与证据
|
||||
|
||||
- 新增导入回归:连续未保存导入、失败重导入、监督器提前拒绝、已有计划执行排除、旧表格编辑串入防护。
|
||||
- 新增暂停回归:工程边界暂停没有虚假 token,继续只启动剩余工程;启动前取消保留真实续跑 token。
|
||||
- 新增读取回归:超时仍关闭只读资源并保留释放证明,消息不推断损坏;报告冲突带回 UID 和两个字段。
|
||||
- 完整测试:1016 passed,6 failed,1 warning。日志:build/beta16-suite.log。
|
||||
- 6 个失败均在 fixture 的 Path.mkdir 阶段触发 WinError 206/3(当前 Windows 长路径策略限制),尚未执行产品逻辑:test_execution_metrics.py 的两项长证据路径用例,test_project_long_paths.py 的四项工程路径用例。未更改系统策略或跳过这些测试。
|
||||
- 两项资源日志用例更新了过期的 Win32 API 模拟接口;真实 Windows 用例保留外部窗口,确认仍会阻断未释放的桌面,不会回放已完成结果。
|
||||
- 便携 EXE 已通过 tools/verify_packaged_runtime.py 冻结版启动/监督进程/进程身份/资源释放检查;ZIP 完整性、校验和和不包含用户 data 均已核对。
|
||||
- 独立审查复查了导入合并、暂停 token、路径大小写、旧表任务身份与资源保护分支,未发现遗留的本次改动相关实质性问题。
|
||||
|
||||
## 仍需明确的范围
|
||||
|
||||
- 本次没有对用户真实 CAD 工程进行端到端替换。FEM 工程在 DxDesigner OpenProject 内部等待的原因仍未由当前诊断包证明;新版完善了读取错误分类和位号冲突证据,不宣称已修复工程本体。
|
||||
- Windows 源码从 .venv 的重定向 python.exe 直接启动监督器存在 PID 不同的研发运行限制;独立 EXE 不经过此路径且已自检。测试使用基解释器与 venv 依赖目录,未放宽精确进程身份校验。
|
||||
- 原生 Replace Part、Value/Part Label/NC 规则、保存核验、强制停止后的待核验保护未改写。
|
||||
|
||||
交付:dist/DxPartReplace-1.2.0-beta.16-Windows-x64.zip。升级先关闭旧程序,保留旧 data 文件夹,完整解压程序和 _internal,确认窗口版本为 beta.16。
|
||||
@@ -0,0 +1,40 @@
|
||||
# 诊断分析:DxPartReplace-诊断-20261030-164044
|
||||
|
||||
分析时间:2026-10-30。所有过程时间均换算为北京时间(日志 timestamp_utc 加 8 小时)。本次仅分析诊断记录和代码,未修改程序或工程。
|
||||
|
||||
## 已确认结论
|
||||
|
||||
1. 本次导入 8 份分表,共 32 行。前 5 个 ETHERNET 工程通过;FEM_KCT8529H 读取失败后已跳过并继续 RTC5638HE。
|
||||
2. FEM_KCT8529H 和 RTC5638HE 的直接阻塞点都是 QuickPartReplace.vbs 的 `QPEnsureProject`,`App.OpenProject(CStr(TargetPath))` 调用之后没有返回到 `session_ready`。
|
||||
3. 读取监控在 open_project 无进展 45 秒后请求停止;FEM_KCT8529H 再等待约 5 秒后结束只读会话,确认资源释放,继续下一工程。该故障发生在器件枚举和 BOM 匹配前。
|
||||
4. “工程损坏或无法读取”是 batch_runtime.py 将读取异常统一包装后的提示,不是 DxDesigner 返回的数据库损坏诊断。本包没有提供足够证据认定数据库损坏。
|
||||
5. 诊断包在第 7/8 个工程仍在读取时导出,supervisor.json 为 running,session.json 为 ready/generation 3,缺少最终 result.json。FEM_SKY85717 只有任务事件文件,没有本次读取过程。截图中的最终 3 个失败不能全部由本包核实。
|
||||
|
||||
## 逐工程证据
|
||||
|
||||
| 工程 | 原生报告解析 | CAD 路径 | 可确认的结论 |
|
||||
|---|---|---|---|
|
||||
| FEM_KCT8529H | 两次 icdb2ascii 均退出码 0;有效报告解析 67 个符号,29 个符号的标题位号与 Ref Designator 属性不一致;9 个命名端口被忽略 | 16:39:01 进入 open_project;16:39:47 无进展约 45 秒触发停止;16:39:52 已确认释放后台会话 | OpenProject 调用等待超时,未进入器件枚举或 BOM 匹配;数据库损坏未被证实 |
|
||||
| FEM_RTC5638HE / RTC5638HE.prj | 两次 icdb2ascii 均退出码 0;有效报告解析 65 个符号,21 个符号位号字段不一致;5 个命名端口被忽略 | 16:40:00 进入 open_project;16:40:45.823 已无进展 45.062 秒并请求停止;诊断快照到此截止 | 同样卡在 OpenProject,包内没有最终退出、释放和匹配结果 |
|
||||
| FEM_SKY85717 | 包内无本次解析记录 | 包内无本次 CAD 读取记录 | 截图显示失败,但本包不能确认具体阶段和原因 |
|
||||
| ETHERNET_1G(对照) | 同样出现 2 个位号字段不一致并回退 | 两次 CAD 核验均成功;OpenProject 分别约 6.219 秒、4.046 秒;读到 10 个器件 | 位号字段不一致并不必然导致工程无法打开 |
|
||||
|
||||
## 原生报告为什么回退
|
||||
|
||||
native_inventory_protocol.py 比较 FLAT BLOCKS 报告的符号标题 `ref des ...` 与属性 `Ref Designator`。两个字符串不一致时将 UID 放入 inconsistent_refs。随后 HIER BLOCKS 解析遇到涉及该 UID 的请求物料就转 CAD 核验。
|
||||
|
||||
工作区导入会请求旧料号、新料号和 `*`(全库存用于检测重复位号),因此未直接列入替换清单的其他器件也可能触发回退。记录中的 29/21 是字段不一致数量,不是缺少 UID 的数量,也不是清单错误数量。
|
||||
|
||||
原生工具正常输出报告,且摘要记录 source_hashes_unchanged=true,说明这一步能读取工程快照,并未修改源文件。它不能证明 CAD 能正常打开,也不能证明全部器件身份一致。
|
||||
|
||||
## 仍无法从本包确定的底层原因
|
||||
|
||||
OpenProject 未返回的内部原因尚不可见:可能是工程打开流程等待对话框、工程数据库/依赖问题,或正常加载超过 45 秒。这些都是待验证假设。本包没有对话框正文、打开阶段的内部 CAD 错误,不能将过去其他工程出现的 iCDB 报错直接套用到本次。
|
||||
|
||||
原生完整 scope.txt/effective.txt 被诊断包白名单排除(manifest 中标为 outside_allowlist);现有追踪只保存符号标题样本和不一致计数,没有保存触发失败的 UID 及两个位号值。因此本包不能继续确定究竟哪个器件的哪两个字段不同。
|
||||
|
||||
## 建议的下一步
|
||||
|
||||
先在前台 DxDesigner 单独打开这三个 FEM 工程,记录是否弹窗、具体正文,以及到可正常操作所需时间。若前台也无法打开,应根据实际 CAD 报错处理工程;若前台能很快打开,应调查后台 OpenProject 的等待窗口/会话差异;若正常加载确实超过 45 秒,则需要调整工程打开阶段的超时策略。
|
||||
|
||||
程序后续应记录触发回退的 UID、标题位号和属性位号;读取超时时捕获自有后台窗口的标题/正文;提示应区分“打开超时”“CAD 明确拒绝打开”“身份核验失败”,避免将超时直接呈现为工程损坏。若需要核对 SKY85717,请在整批结束后再次导出完整诊断包。
|
||||
@@ -0,0 +1,29 @@
|
||||
# 诊断分析:20261102-112907
|
||||
|
||||
日期:2026-11-02。诊断来源:工作目录内 `DxPartReplace-诊断-20261102-112907`。
|
||||
|
||||
## 导入结果
|
||||
|
||||
本次日志记录 9 个工程、27 行 BOM:24 行通过,3 行失败。失败行均属于 `LDO_S2032_SOT23_1V5`。完整导入约 7 分 47 秒,期间存在反复回退 CAD 采集和重复库存检查。
|
||||
|
||||
失败工程的一致性检查涉及 `database/icdb.dat` 与 `database/cdbsvr/sAddress.adr` 的内容变化。旧逻辑只容许前者作为读取会话变化候选,后者导致核对失败。这条失败证据不能直接证明原理图损坏。
|
||||
|
||||
## 为什么界面没有 UF?,日志却出现 UF?
|
||||
|
||||
日志中的“标题位号”指原生导出报告 Symbol 记录的 `ref des` 字段,不是窗口标题,也不是截图识别结果。同一 UID 的另一字段 `Prop Ref Designator` 是实例属性。日志记录前者为 `UF?`、后者为 `UP01`。
|
||||
|
||||
因此,画面显示 UP01 与导出报告还带有 UF? 可以同时发生。带问号的值呈现占位形式;它究竟来自库的默认属性、内部注释还是报告展开机制,当前证据不足,不能断言用户工程上的位号有误。
|
||||
|
||||
旧解析器要求两个字段完全一致,一旦不一致就放弃快速报告读取,改用较慢的 CAD 读取。这样的回退反复发生,是此次慢导入的可见原因之一。
|
||||
|
||||
## 本次调整
|
||||
|
||||
1. 对 UF?、C? 等占位标题,只有分层、展开两份报告对同一唯一 UID 的实际实例位号均一致,才采用实例属性继续快速读取。重复、嵌套 UID 和实际属性冲突仍不放行。规则对所有工程通用。
|
||||
2. 将精确的会话地址路径 `database/cdbsvr/sAddress.adr` 纳入已有的运行数据库变化判定;其余设计内容须一致,还需两次库存身份完全一致。缓存完整指纹仍包含这些文件,不全面忽略 database 目录。
|
||||
3. BOM 匹配本身已经使用位号等信息;保留 UID 作为报告关联和内部定位信息。本次优化减少不必要的回退,不删除身份核对。
|
||||
|
||||
不增加导入/保存阶段的中心库查询,维持替换失败后再查询的策略。
|
||||
|
||||
## 验证边界
|
||||
|
||||
相关解析、缓存和 BOM 导入回归共 107 项通过。覆盖占位标题与实际属性一致、真实属性冲突、会话地址变化、真实设计文件变化等。模拟回归和冻结程序自检不能代替全部真实 CBB 的现场验收;实际耗时改善需用同批 BOM 复测。
|
||||
@@ -0,0 +1,25 @@
|
||||
# 诊断分析:20261103-160621
|
||||
|
||||
日期:2026-11-03;现场版本:1.2.0-beta.30。
|
||||
|
||||
## 现场结果
|
||||
|
||||
工程 Xview 导入从 15:58:43 到 15:59:23,约 40 秒。原生报告解析本身约 0.4 秒,但因 CP? / CX05 位号字段差异两次回退 CAD 采集。
|
||||
|
||||
替换第 0 组目标 `4300-CF5610-7100` 未加载,DxDataBook 轮询预算为 30 秒,最终 batch_failed;该组工程关闭未保存。之后四组均记录 saved_ok:CX24、CX25/CX32、CX27、CX29/CX31,共 6 个器件。CX20/CX21 所属失败组没有保存成功证据。本次不能描述成整个任务从未继续。
|
||||
|
||||
第 0 组失败完成于 16:01:06;后续四组完成于 16:01:59、16:03:00、16:03:46、16:04:38。成功步骤仍包含原生替换、属性/引脚恢复、保存重开回读等耗时。末组记录 native_replace 约 24.1 秒,index_pins 约 4.8 秒,其余时间分布于快照、恢复和回读,不能全部归因于 UID 匹配。
|
||||
|
||||
用户确认中心库缺少目标料号;日志单独能证明的是未加载该目标并超时,不能据超时自动断言中心库确实缺料。
|
||||
|
||||
## beta.31 调整
|
||||
|
||||
- 按最新用户决定,取消替换失败后的中心库存在性查询。导入、保存和失败处理均不启动这类额外查询;具体旧/新料号、图页和原始错误保留,失败项留待人工处理,其他可执行项继续。显式目标封装选择及核心原生替换核验仍保留。
|
||||
- DxDataBook 目标列表轮询预算从 30 秒缩短到 8 秒,并记录目标、状态和实际耗时。8 秒是轮询预算;单次原生/UIA 调用如阻塞仍受外层看门狗约束,不承诺完整收尾仅用 8 秒。
|
||||
- 后续成功步骤不再让早先失败的目标与错误详情被“当前步骤”遮盖。
|
||||
- 分层属性保留与展开标题完全相同的占位位号时,允许同一唯一 UID 的展开实例生效位号参与快速读取;真正的具体位号冲突仍回退 CAD。诊断包没有完整报告字段,此次分层字段具体值仍需现场新日志确认;新增 scope_refdes 信息供后续核实。
|
||||
- 修正复选框鼠标命中区域:点击整个复选框单元格即可切换,不再必须点中小方框;已有目标、执行中和历史证据锁定规则保留。
|
||||
|
||||
## 验证范围
|
||||
|
||||
166 项解析、缓存、失败隔离、停止、目标执行与 Qt 鼠标交互回归通过。测试覆盖无目标料号的短轮询、失败后不查中心库且继续下一工程、后续成功不遮盖失败详情、复选框中央点击和锁定状态。真实 CBB 速度和库加载行为仍需现场复测;不减少保存回读核验来宣称提速。
|
||||
@@ -0,0 +1,38 @@
|
||||
# 诊断分析:LNB_TPS65233
|
||||
|
||||
日期:2026-11-03。诊断包:`DxPartReplace-诊断-20261103-164814`。任务:`9a224826-316c-4119-a36b-be5656aa486a`。本次仅诊断与记录,不修改运行代码或发布包。
|
||||
|
||||
## 结论
|
||||
|
||||
首发异常是软件执行结果交接阶段的 `ADODB.Stream` 文件写入错误,错误编号 3004(写入文件失败),不是日志已经证明的缺料号、位号或连接错误。
|
||||
|
||||
CN09 有保存返回、关闭、重新打开、回读验证通过及 saved_ok 状态证据。随后结果交接文件写入出错,被保守记为 batch_saved_unverified,工程因此停止。不能把整工程状态理解为所有器件均未替换。
|
||||
|
||||
## 逐项证据
|
||||
|
||||
| 器件 | 替换 | 日志证据 |
|
||||
| --- | --- | --- |
|
||||
| CN07、CN08 | 4300-CF1000-5200 → 4300-CF1000-5100 | 18:49:36 saved_readback_verified;saved_ok;事件包含实际料号和 Value=10pF/50V/NC,已保存回读成功 |
|
||||
| CN09,UID $1I1302 | 4300-CF1010-7200 → 4300-CF1010-7100 | 18:49:54 native_helper_exit code=0;18:50:02 save_returned;18:50:03 project_closed;18:50:11 saved_readback_verified;status.tsv 先有 saved_ok,随后写入 batch_saved_unverified/3004 |
|
||||
|
||||
CN09 的原 Value 是 `100PF/50V`。此包没有其独立 value-readback.tsv 或成功业务事件,不能仅凭预览替代实际最终 Value 记录;保存回读通过本身有日志和 status.tsv 双重证据。其他后续条目没有相应执行完成证据。
|
||||
|
||||
原始错误为:`ADODB.Stream: save was requested; persisted outcome requires reconciliation. 写入文件失败。`。日志位置:该任务 `quick-run/quick-part-replace.log:57` 为保存回读成功,紧接第 58 行出错;`status.tsv:5` 成功,第 6 行为后续异常。
|
||||
|
||||
18:50:17 随后记录 auto_project_timeout 和后台进程退出未确认。这些是首发文件写入异常之后的收尾记录,不是首先发生的替换故障。`stage=query_pins` 是保留的阶段标签;异常来源实际为 ADODB.Stream,不能据此判为引脚连接冲突。
|
||||
|
||||
## 定位与推断边界
|
||||
|
||||
对照 beta.31 代码 `QPFinishBatchItem`:保存重开核验后先记录 saved_readback_verified,再追加 saved_ok,然后调用 QPWriteUtf8 写 project-session-result.tsv。QPWriteUtf8 通过 ADODB.Stream.SaveToFile(..., 2) 直接覆盖文件。
|
||||
|
||||
Python 的 project_session.py 同时反复 read_text 轮询同一文件。根据已存在 saved_ok 和其后的 ADODB.Stream 错误,最符合执行顺序的失败位置是 project-session-result.tsv 的覆盖写入。代码没有给这次写入附带目标路径或底层占用信息,因此具体文件定位属于高可信推断,并非诊断包直接记录了文件路径。
|
||||
|
||||
本机最小实验:只在临时文件上使用真实 ADODB.Stream.SaveToFile;Python 持有读取句柄时写入失败,COM scode=-2146825284(低位 3004);释放句柄后同一路径同一内容写入成功。未访问 CAD 或修改用户工程。
|
||||
|
||||
这验证了读写竞争能够产生完全相同的错误,且与现有轮询实现吻合。现场到底由该轮询、其他进程占用或其他文件系统问题触发,包内证据不足以唯一确认;不声称已证实具体占用进程、磁盘满或工程损坏。
|
||||
|
||||
## 处理建议
|
||||
|
||||
先人工打开工程核对 CN09 的实际料号与 Value,再处理尚未完成条目;保留 CN07、CN08 的成功记录。不要因交接报错就重复认定这些器件换料失败。
|
||||
|
||||
后续代码修复应针对结果交接:避免读写同一文件发生覆盖冲突,增加受限重试或可靠的独立/原子交接,并记录具体失败路径和底层错误;区分“工程回读已通过、结果通知失败”与“CAD 换料失败”。本次未实施或发布此修复。
|
||||
@@ -0,0 +1,24 @@
|
||||
# 诊断分析:TUNER+DEMOD_DVB-C_M88RC6800
|
||||
|
||||
日期:2026-11-03。来源:`DxPartReplace-诊断-20261103-164814`,任务 `81210983-ea44-474a-a94c-e960fafce99e`,现场 beta.31。本次仅诊断,不改程序。
|
||||
|
||||
## 首发原因
|
||||
|
||||
失败组:`4300-CA4750-A200 → 4300-CA4750-A210`,包含 CT64($1I2612)、CT65($1I2614)、CT61($1I2616)。原理图 M88RC6800、图页 CVBS_BUFFER。
|
||||
|
||||
17:01:38 原生 helper 返回 code=0,随后进行属性恢复与回读。17:01:44 日志记录 `display_readback_mismatch uid=$1I2612 refdes=CT64 attribute=Part Label fields=font=13->0`。
|
||||
|
||||
这意味着程序按旧快照恢复 Part Label 显示字体后,实际读回的字体编号是 0,预期编号是 13。13/0 是 Font 属性值,不是字号,也不是 Part Label 的文字内容。源码 QPRestoreDisplay 写入保存的 Font,QPVerifyDisplay 要求数值完全一致;不一致抛出 vbObjectError+837,日志错误号为 -2147220667。
|
||||
|
||||
此例不是缺料号,也不是已记录的引脚网络对调;它在显示属性字体核验处失败。具体为何字体无法保持为 13,诊断不能确定:可能涉及属性继承、原生字体编号归一化或库符号行为,需要在同一 CAD 会话观察写入/读回或对照符号属性。不能直接断言电脑缺字体或库一定损坏。
|
||||
|
||||
## 结果范围
|
||||
|
||||
- CT34:4300-CA105E-T5 → 4300-CA1050-A100,saved_ok。
|
||||
- CT47、CT48:4300-NF150C-T5 → 4300-CF1500-5100,saved_ok。
|
||||
- CT51、CT55:4300-CF3300-5200 → 4300-CF3300-5100,saved_ok。
|
||||
- CT64、CT65、CT61 是同一失败组,未获得保存并重开回读成功证据,不能只把 CT64 一只视为未完成。
|
||||
|
||||
队列原有 7 组;前三组已确认成功,第 4 组因字体属性核验失败中断,后续 3 组未见启动状态。
|
||||
|
||||
失败后状态为 hard_failure / awaiting_reconciliation,收尾无法确认,17:01:58 触发自动超时并记录后台进程退出未确认。超时与释放失败是后续收尾问题;首发错误是 CT64 的 Part Label 字体 13 → 0 不一致。既不能把原生 helper 返回 0 当作全部成功,也不应把前三组已保存的成功记录抹掉。
|
||||
@@ -0,0 +1,29 @@
|
||||
# 诊断分析:T18250_IN_LOOP_Filter_Shield
|
||||
|
||||
日期:2026-11-03。来源:`DxPartReplace-诊断-20261103-164814`,现场版本 beta.31。本次仅分析,不修改程序、不打包。
|
||||
|
||||
## 结论与成功范围
|
||||
|
||||
导入的最终 9 行 BOM 均通过器件对应校验。本次队列有 2 个实际替换组:
|
||||
|
||||
- 16:46:46,第 0 组 `CT29`、`CT32`:`4300-CA2250-A200 → 4300-CA2250-A100`,状态 saved_ok,已保存并重开回读成功。
|
||||
- 第 1 组 `DT01`(UID `$9I3008`):`452F-7T0301-0S00 → 452N-7TUS03-0S00`。16:47:07 原生 helper 返回 code=0;16:47:10 连接校验失败,状态 hard_failure。没有该组保存并回读成功证据。
|
||||
|
||||
## 首发错误
|
||||
|
||||
图页为 `T18250 / TUNER_T18250`。quick-part-replace.log 给出:
|
||||
|
||||
| 引脚 | 替换前 | 替换后 |
|
||||
| --- | --- | --- |
|
||||
| 1 | (680,1120),`$9N4338 / GND` | (670,1130),`$9N2774 / LOOPOUT` |
|
||||
| 2 | (680,1180),`$9N2774 / LOOPOUT` | (670,1190),`$9N4338 / GND` |
|
||||
|
||||
两端网络按引脚号发生对调。当前 QPConnectionsMatch 允许统一平移,但要求已知引脚号、网络及相对几何匹配;此例无法匹配。因此不是单纯的坐标平移,也不是目标料号未找到。原生替换调用成功不等于连接关系验证通过。
|
||||
|
||||
更深层原因可能涉及新旧库符号的引脚编号/几何布局/方向,以及替换时的引脚对应关系。诊断包不能确定其中哪一项是库定义错误;需要对照两个料号的符号和真实引脚定义确认,不能仅凭日志判断应旋转还是修改库。
|
||||
|
||||
## 为什么随后停止
|
||||
|
||||
校验失败后进入 awaiting_reconciliation,safe_stop=false,程序无法确认这一组写入/保存的最终状态,保留 uncertain.flag。16:47:15 监督器自动超时停止;同时记录后台 CAD 进程退出未确认。因此“超时”和“后台释放失败”是首发连接冲突后的收尾问题,不是缺料号查询导致的首发错误。
|
||||
|
||||
建议人工检查 DT01 的实际料号及 1/2 脚网络,核对新旧符号对应关系后再决定处理方式。CT29、CT32 的成功证据应保留;不要将两组统称全部未替换,也不要跳过连接验证把 DT01 标为成功。
|
||||
Reference in new issue
Block a user