Found while dogfooding the current source.
DbCommandRunner.TryDeleteTemporaryDirectory calls Directory.Delete(path, recursive: true) on caller-provided temp paths after only Directory.Exists(path).
Evidence: src/CodeIndex/Cli/DbCommandRunner.cs:893
The current callers appear to pass checkpoint/restore temp directories, but recursive delete helpers are high-impact enough to deserve a descendant/safe-root assertion before deleting.
Expected: require cleanup targets to be under the expected .cdidx temp/checkpoint root or another explicit safe base, and test that accidental or malformed paths are rejected before recursive deletion.
Found while dogfooding the current source.
DbCommandRunner.TryDeleteTemporaryDirectorycallsDirectory.Delete(path, recursive: true)on caller-provided temp paths after onlyDirectory.Exists(path).Evidence:
src/CodeIndex/Cli/DbCommandRunner.cs:893The current callers appear to pass checkpoint/restore temp directories, but recursive delete helpers are high-impact enough to deserve a descendant/safe-root assertion before deleting.
Expected: require cleanup targets to be under the expected
.cdidxtemp/checkpoint root or another explicit safe base, and test that accidental or malformed paths are rejected before recursive deletion.