Skip to content

Write case source-check reports atomically #640

Closed

Description

@LunaStev

Problem

tools/check_case_sources.py rewrites its JSON report after each completed source so earlier results survive later failures. The report is written directly to the final path with Path.write_text(), so interruption during a write can leave the report truncated or invalid.

Scope

Write each report update to a temporary file in the same directory and replace the destination only after the new JSON has been written successfully.

Keep the current report format, checkpoint frequency, and source-check behavior unchanged.

Completion criteria

  • A successful checkpoint replaces the previous report with complete JSON.
  • A failed or interrupted write does not corrupt the previous valid report.
  • Temporary files are cleaned up after handled failures.
  • tools/test_check_case_sources.py covers successful replacement and failed write/replace paths.
  • The tests do not require a Wave compiler or LLVM.

Related: #462

Activity

  1. added
    bug
    good first issue
    help wanted
    on Sep 15, 2026
  2. changed the title [-][Bug]: Write case source-check reports atomically[/-] [+]Write case source-check reports atomically[/+] on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions