fix: prevent iCDB disconnects and recover failed projects
This commit is contained in:
1 parent
8a517d6f38
commit
2490067b2d
19 files changed
+1117
-60
No files matched your search
@@ -97,7 +97,16 @@ Session: [2026-10-24 08.22.29-10308]
|
||||
重写误判、不可读/超出窗口的基线问题,均补充回归并通过复核。
|
||||
|
||||
本分支修复自动化的错误识别、误导性建议和失败后的继续执行风险,
|
||||
**没有修复现场受损数据库,也没有验证原生 Repair 的现场效果**。
|
||||
现在还会在目标明确、会话完全释放且完整备份成功时,自动调用同版本原生
|
||||
Project → Repair,并只在原生诊断、Project Repair 备份、目标数据库关闭等
|
||||
证据全部满足时重试一次校验。共享符号库路径没有 PRJ 入口时会明确阻断,
|
||||
不会猜测或改修某个 CBB 的 Work 数据库。
|
||||
|
||||
这次在新复制的 IP101GR 工程上完成了真实隔离验证:Repair 菜单确认、完整
|
||||
备份、原生 `dbcheck`/数据库日志、`Project Repair` ZIP 校验和数据库关闭均
|
||||
成功;Repair worker 退出码为 0,随后才允许重试。该验证没有接触生产库。
|
||||
|
||||
仍然**没有修复现场受损数据库,也没有在 `200091-CBB` 上执行恢复**。
|
||||
恢复识别仅覆盖已知日志末尾的有限窗口;错误出现在窗口外、相同历史会话
|
||||
在重写时被原样重报、超出基线窗口的大日志发生重写、以及现场不同日志位置/格式,
|
||||
仍需结合完整原生日志确认。这些不能确认新旧的情况不会自动提升为本轮修复诊断。
|
||||
@@ -0,0 +1,38 @@
|
||||
# iCDB failure lifecycle and recovery implementation plan
|
||||
|
||||
**Goal:** Prevent failed verification from aborting iCDB owners, close owned idle failed documents normally, and attempt native recovery only against a validated idle target with a complete backup.
|
||||
|
||||
**Context:** User confirmed the incident used r4 or earlier. r4 enables `JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE`, calls `TerminateJobObject` and `taskkill /T /F` on failures and native owners. a11eb3c removed those PCB paths, but content-check timeout still kills a process tree. Failed worker exceptions currently release COM references without requesting normal document closure.
|
||||
|
||||
**Architecture:** Keep native transactions alive through timeouts. Signal cooperative cancellation to the worker; let blocking native calls return before closing a document. A separate recovery module owns target checks, backup and the official GUI repair transaction; failed or ambiguous repair remains failed. Work and central-library database ownership are checked separately.
|
||||
|
||||
**Tech stack:** Python 3.12, Windows process handles/private desktops, x86 cscript and Mentor EE7.9.5 native tools. Continue on `codex/icdb-lost-session-diagnostics`.
|
||||
|
||||
## Task 1 — Retain native owners on content timeout
|
||||
|
||||
- [ ] Add a regression that starts a harmless importer with a harmless child, times out, and checks both survive until normal exit or test cleanup.
|
||||
- [ ] Add a content-timeout batch regression proving the second item does not start.
|
||||
- [ ] Remove tree/client termination from `_run_process` timeout; retain/drain the process in a background observer, record PID/command/release in evidence, and return TIMEOUT with `safe_to_continue=False`.
|
||||
- [ ] Verify targeted tests and the existing content-check tests.
|
||||
|
||||
## Task 2 — Normal close of failed owned sessions
|
||||
|
||||
- [ ] Add x86 cscript harness tests for failed Save and close-only operation, checking `Close(False)`, reference release and Quit, with failure status preserved and mismatched identity untouched.
|
||||
- [ ] Implement an identity-checked close helper and call it only after the worker has returned from its native call and released Python references. Retain busy helpers instead of terminating them.
|
||||
- [ ] Add cooperative cancellation at Python/VBS native-operation boundaries; a supervisor timeout/crash must not terminate a pending native Save.
|
||||
- [ ] Add targeted tests for cancel before Save, cancel after a pending call returns, supervisor loss and blocked native-call retention.
|
||||
- [ ] Check shared `SymbolLibs/__ReusableBlocksSymb` ownership as well as Work/PCB database ownership before writing and before declaring release.
|
||||
- [ ] Give the status reader an EOF shutdown grace period before any fallback termination.
|
||||
|
||||
## Task 3 — Attempt official native recovery
|
||||
|
||||
- [ ] Probe native UI on new isolated copies only; record accepted project/database identity, exact command, backup creation and completion signals. Do not invent CLI Repair flags or manipulate native ownership metadata.
|
||||
- [ ] Add recovery-policy tests: reject foreign/unresolved targets, active clients, inconsistent backups and repeat repair; preserve the original error; at most one recovery attempt.
|
||||
- [ ] Implement the supported native repair route with a complete backup and exact target checks. If the installed native tool cannot accept a shared symbol database, retain that explicit blocked result instead of repairing an unrelated Work project.
|
||||
- [ ] Retry opening/verifying only after native success and confirmed release; authoritative READY remains the success criterion.
|
||||
|
||||
## Validation and delivery
|
||||
|
||||
- [ ] Run full Python and PowerShell regressions, compilation and whitespace checks, plus independent code review.
|
||||
- [ ] Verify a successful native run and a controlled failed integration/close on an isolated library, and source fingerprints afterward.
|
||||
- [ ] Record precisely which recovery target types were actually exercised and any remaining field-only limitations; commit changes on the current branch.
|
||||
Reference in new issue
Block a user