Finding
export ctags writes directly to the requested output path with StreamWriter(..., append: false, ...). A crash, cancellation, or IO failure can leave a partially written tagfile in place.
Evidence
src/CodeIndex/Cli/ExportImportCommandRunner.cs:262 creates the output directory.
src/CodeIndex/Cli/ExportImportCommandRunner.cs:265 opens the final output path directly.
- The command then streams all symbol rows to that final path.
Suggested fix
Write to a temporary file in the same directory, flush it, then atomically replace or move it into place. Add tests for failure before replacement.
Finding
export ctagswrites directly to the requested output path withStreamWriter(..., append: false, ...). A crash, cancellation, or IO failure can leave a partially written tagfile in place.Evidence
src/CodeIndex/Cli/ExportImportCommandRunner.cs:262creates the output directory.src/CodeIndex/Cli/ExportImportCommandRunner.cs:265opens the final output path directly.Suggested fix
Write to a temporary file in the same directory, flush it, then atomically replace or move it into place. Add tests for failure before replacement.