Skip to content

[codex] harden atomic writes and checks - #1

Merged
explicit09 merged 1 commit into
mainfrom
codex/fix-atomic-ref-writes
May 19, 2026
Merged

[codex] harden atomic writes and checks#1
explicit09 merged 1 commit into
mainfrom
codex/fix-atomic-ref-writes

Conversation

@explicit09

Copy link
Copy Markdown
Owner

Summary

  • Add atomic file replacement helper for ref/object writes, including Windows replacement via MoveFileExW.
  • Verify object hashes on read and repair corrupt object paths on write.
  • Route branch/ref updates through atomic writes and ignore stale temp ref files in branch listings.
  • Expand release CI to include Rust fmt, clippy, Rust tests, and Python tests.

Root Cause

The previous atomic-write fallback could delete an existing destination before renaming the temp file on Windows-like rename semantics. A crash or second rename failure could leave branch refs or objects missing. Ref temp files were also created in refs/heads, so stale crash leftovers could appear as branches.

Validation

  • cargo test --workspace --exclude vedit-py
  • cargo clippy --workspace --exclude vedit-py -- -D warnings
  • cargo fmt --check
  • cargo check -p vedit-core --target x86_64-pc-windows-msvc
  • git diff --check

@explicit09
explicit09 marked this pull request as ready for review May 19, 2026 04:30
@explicit09
explicit09 merged commit c9ecf75 into main May 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant