105 lines
7.3 KiB
Markdown
105 lines
7.3 KiB
Markdown
# Issue #2 implementation plan
|
|
|
|
Approved by user on 2026-11-02. Continue branch codex/temp-issue-2-icdb-recovery,
|
|
baseline ec78dd7 (491 tests). Do not merge, publish or close the issue. Preserve
|
|
untracked review.diff. Python 3.12, PySide6, Mentor EE7.9.5, private desktop by
|
|
default. No force termination of native database owners, deleting locks,
|
|
guessing native write interfaces, or editing LMC binary contents.
|
|
|
|
Each task uses regression tests, focused validation and a separate commit.
|
|
Real field lost-session reproduction and Windows 10 validation must be reported
|
|
as unverified when unavailable; header corruption is not a substitute.
|
|
|
|
## Task 1: ICDB failure lifecycle and repair outcomes
|
|
|
|
Extend the existing owned-empty-PCB close path to wait for its launcher as well.
|
|
Cover COM connected without a document, delayed dialogs/addresses/process exit.
|
|
Native Repair must report missing healthy backup, native repair failure, database
|
|
busy, unknown dialogs and timeout/unreleased distinctly using this run's native
|
|
logs and Output. Safely close an idle, conclusively failed native repair tool;
|
|
never act on unrecognized prompts or active native operations.
|
|
Preserve original error, original evidence and all repair evidence. Record release
|
|
state. Repair success in summaries means original native repair succeeded AND
|
|
same-project reopening, verification and authoritative GREEN succeeded. Historical
|
|
backup restoration remains RESTORED_REVIEW_REQUIRED. A conclusively failed repair
|
|
may continue independent CBB items only if all relevant processes and addresses
|
|
are released and scope is project-local; shared-library/unknown ownership stops.
|
|
Add sanitized replay of issue2 lost-session/open-failure events with asserted target,
|
|
stage and invocation order; one automatic repair maximum, no repeated PCB loop.
|
|
Maintain VerifyRequest/VerifyResult compatibility. Files primarily failed_session,
|
|
pcb_bridge, mentor_adapter, native_repair[_ui], verify_runner, icdb_maintenance and
|
|
their tests. Update release evidence. No native live operations without coordinator
|
|
agreement (only one native operation at a time). Coordinator builds candidate and
|
|
runs frozen tests after review. Field fault sample is not in the attachment (logs
|
|
only); do not claim field recovery.
|
|
|
|
## Task 2: Search, filtering, selection and non-READY maintenance
|
|
|
|
Implement local name/partition keyword search and filters: all, READY, non-READY,
|
|
PENDING, unknown/read errors, missing project. Non-READY includes unconfirmed states
|
|
without calling them corrupt. Show visible/READY/error counts; no Mentor rereads on
|
|
filtering. Management selection permits READY; verify/maintenance/default backup
|
|
recovery exclude READY. Operations target current visible checked rows; hiding a row
|
|
clears its checkbox. Provide select visible/clear selection. Maintenance entry,
|
|
confirmation, progress and report agree on non-READY target set. Existing verify-all
|
|
means visible eligible rows, maintenance defaults visible eligible rows with checked
|
|
subset if any. Refresh affected authoritative statuses after operations, retain search
|
|
and filter. No premature integration of CRUD; expose selected records for Task4.
|
|
Maintain CbbRecord compatibility and explicit status separate from action result.
|
|
Tests include mixed READY/PENDING/errors/missing, filtering after state transitions,
|
|
selection scope and 381/3000 row responsiveness. Files UI main_window, small focused
|
|
filter helper if useful, backup dialog and maintenance report + tests. Avoid unrelated
|
|
UI overhaul. Commit and report focused tests plus full suite once.
|
|
|
|
## Task 3: Scoped primary-file hashes and verified backups
|
|
|
|
Copy and retain complete backup trees. Restrict SHA256 and semantic before/after
|
|
comparison to primary project/design/database/constraint files and required library
|
|
dependencies: PRJ/PCB/DXP, icdb.dat, Layout, schematic/logic/symbol assets, CES/config,
|
|
target LMC and shared database dependencies. Explicitly exclude runtime logs/temp/
|
|
locks/address records, historical backups, PDF/generated output from content hashes;
|
|
address files still participate in idle checks. Treat unclassified engineering data
|
|
conservatively as primary rather than accidentally excluding it. For central-library
|
|
manifest, only target CBB Work/Cert plus active library configuration/shared library
|
|
dependency trees; do not hash unrelated CBB projects.
|
|
During copy validate tree membership and file size/mtime before/after; primary files
|
|
also source/destination SHA256, including locked database stream bytes. Logs changing
|
|
after successful snapshot must not invalidate subsequent semantic comparison, while
|
|
primary changes/additions/deletions must block install. Manifest is versioned and
|
|
contains relative paths, size, hash and scope; progress gives hashed files/bytes/stage.
|
|
Keep existing validate-copy -> target conflict check -> retain Work -> install ->
|
|
reopen verification. Preserve old backups and evidence on failure. Add tests for logs
|
|
only, all primary categories, changed/deleted sources, target concurrency, copied byte
|
|
corruption and preserved recovery copies. Files backup_recovery and new focused
|
|
manifest helper + tests. Reuse helper in management Task4 without changing old public
|
|
Verify contracts. Document explicit rules/compatibility, commit after tests.
|
|
|
|
## Task 4: Native CBB management and delivery
|
|
|
|
Integrate add, same-name update, remove in current application. Input complete PRJ/PCB
|
|
projects, no Packager/PDF/part replacement/rename/partition move. Add conflicts never
|
|
overwrite. Update matches existing name/partition and backs up complete old project
|
|
and library recovery snapshot. Remove backs up then uses verified Mentor native
|
|
operation; reread confirms absence. Never fake removal by deleting directories.
|
|
Add/update reread identity, default auto-verify optional per batch, distinguish upload
|
|
failed, uploaded-but-verification-failed, uploaded-and-verified. Preserve source files.
|
|
Use isolated native adapter: capability detection by installed version/interface plus
|
|
isolated validation. Prefer proven COM/command; verified private desktop controls only
|
|
fallback, never foreground input. Unsupported operations disabled with exact reason.
|
|
Use cbb-upload-795 as research only, no external runtime dependency. Native API research
|
|
comes from coordinator. No fabricated operation parameters. Snapshot/readback result
|
|
must correspond to actual library entry and source engineering identity.
|
|
Requests/results contain operation, library, CBB, partition, source, auto_verify,
|
|
stage/status, safe_to_continue and evidence path. Serialize all writes with existing
|
|
verification mutex and a library-level lock compatible with original uploader; apply
|
|
coordination to verify/recovery too. Stop when native release uncertain. Persist item
|
|
checkpoints and show unfinished tasks on restart, never replay automatically.
|
|
Provide safe preview/confirmation for destructive operations; backups outside target.
|
|
Test isolated add/conflict/update/remove/reimport, cancellation, timeout/network errors,
|
|
partial successes, no-op/lying native response, busy library, restart checkpoints.
|
|
Implement capabilities conservatively: if actual native operation cannot be proven,
|
|
its UI remains disabled with actionable explanation and validation gap is explicit.
|
|
Full Python/compile/diff checks, candidate frozen smoke, Windows11 native scenario;
|
|
Windows10 and real field sample explicitly unverified if inaccessible. Coordinator
|
|
provides final review and source/frozen deliverables without merging/publishing.
|