Problem
Several cleanup and rollback paths manipulate checkpoint backups or recursively delete temporary directories after earlier validation. If a path changes between validation and use, or cleanup failures are swallowed, recovery behavior becomes hard to audit and can leave partial state behind.
Evidence
src/CodeIndex/Cli/DbCommandRunner.cs: checkpoint restore delete/move/copy helpers around backup restoration.
src/CodeIndex/Cli/DbCommandRunner.cs: temporary directory recursive cleanup after validation.
src/CodeIndex/Cli/ProgramRunner.cs: upgrade script directory cleanup catches and ignores failures.
Requested improvement
- Revalidate cleanup targets immediately before recursive delete or restore moves.
- Make backup restore ordering/rollback auditable and fail predictably.
- Emit bounded diagnostics for cleanup failures instead of silent catches.
Duplicate check: no matching OPEN ISSUE found during the cdidx audit pass.
Problem
Several cleanup and rollback paths manipulate checkpoint backups or recursively delete temporary directories after earlier validation. If a path changes between validation and use, or cleanup failures are swallowed, recovery behavior becomes hard to audit and can leave partial state behind.
Evidence
src/CodeIndex/Cli/DbCommandRunner.cs: checkpoint restore delete/move/copy helpers around backup restoration.src/CodeIndex/Cli/DbCommandRunner.cs: temporary directory recursive cleanup after validation.src/CodeIndex/Cli/ProgramRunner.cs: upgrade script directory cleanup catches and ignores failures.Requested improvement
Duplicate check: no matching OPEN ISSUE found during the cdidx audit pass.