Skip to content

[cli-status-doctor-semantics] 1-3-2 corrupted diagnostic bundle v2 #671

Description

@jununfly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions