Skip to content

cdidx report should replace bundle outputs atomically #2842

Description

@Widthdom

Found during cdidx code-search audit. Evidence: src/CodeIndex/Cli/ReportCommandRunner.cs writes directly to outputPath via new FileStream(outputPath, FileMode.Create, ...) before the gzip/tar payload is complete. Impact: an interrupted or failed report run can truncate an existing report and leave a partial archive at the requested path. Suggested fix: write to a same-directory temporary file, flush and close it, then atomically replace or move it into place with cleanup on failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions