Context
Roadmap: cli-status-doctor-semantics
Node: 1-3-2 corrupted诊断bundle后续版本
This was discovered while unifying CLI/status/doctor graph-health semantics.
The current shipped slice makes zcodegraph status classify an unreadable
existing database as corrupted and print recovery commands without
auto-cleaning or auto-rebuilding.
Problem
zcodegraph doctor --bundle currently depends on status/DB paths that may try
to open .zcodegraph/zcodegraph.db. For a corrupted SQLite database, that can
fail before a useful diagnostic bundle is created.
Desired outcome
Add a doctor bundle path for corrupted graph databases that does not require
opening the malformed DB. It should collect replay-safe metadata such as:
- DB file presence, size, mtime, and sanitized open error
- diagnostic record availability (
last-run, last-failure)
- project/root hash and privacy-preserving environment metadata
- exact recovery commands
It must not upload anything automatically and must not include source code or
plaintext source paths by default.
Acceptance gate
- A corrupted
.zcodegraph/zcodegraph.db can produce a local diagnostic bundle.
- The bundle path does not call
CodeGraph.open on the corrupted DB.
- Tests cover the malformed DB path and privacy policy.
zcodegraph status remains non-destructive and continues to print recovery
commands rather than auto-cleaning.
Context
Roadmap:
cli-status-doctor-semanticsNode:
1-3-2 corrupted诊断bundle后续版本This was discovered while unifying CLI/status/doctor graph-health semantics.
The current shipped slice makes
zcodegraph statusclassify an unreadableexisting database as
corruptedand print recovery commands withoutauto-cleaning or auto-rebuilding.
Problem
zcodegraph doctor --bundlecurrently depends on status/DB paths that may tryto open
.zcodegraph/zcodegraph.db. For a corrupted SQLite database, that canfail before a useful diagnostic bundle is created.
Desired outcome
Add a
doctorbundle path for corrupted graph databases that does not requireopening the malformed DB. It should collect replay-safe metadata such as:
last-run,last-failure)It must not upload anything automatically and must not include source code or
plaintext source paths by default.
Acceptance gate
.zcodegraph/zcodegraph.dbcan produce a local diagnostic bundle.CodeGraph.openon the corrupted DB.zcodegraph statusremains non-destructive and continues to print recoverycommands rather than auto-cleaning.