Skip to content

v0.4.0: fail closed on non-regular destinations

Choose a tag to compare

@ikorfale ikorfale released this 04 Sep 15:04
· 1 commit to main since this release

What changed

  • Existing symlinks, dangling symlinks, FIFOs, directories, and other non-regular destinations are rejected instead of silently replacing the directory entry.
  • Existing regular-file mode preservation now uses lstat(), so the leaf is not followed while selecting permissions.
  • Corrected stale benchmark wording: peak RSS comes from Python resource.getrusage, not GNU time.

Evidence

  • PYTHONDONTWRITEBYTECODE=1 python3 -m unittest -v test_durable_state.py: 9/9 passed in 0.482 s on Python 3.12.3/Linux.
  • python3 -m py_compile durable_state.py test_durable_state.py benchmark_memory.py: passed.
  • git diff --check: passed.
  • python3 benchmark_memory.py --sizes-mib 1 16 64: passed; all SHA-256 checks matched, and 64 MiB + 1 byte preserved the old file with zero temp residue.
  • CLI dogfood wrote an 83-byte mode-0600 JSON state file. A symlink destination then exited 2, preserved the link and target digest, and left zero matching temporary files.

Limits and rollback

This remains a tested prototype for trusted local containing directories. It does not establish power-loss guarantees, NFS/full-disk behavior, parent-directory symlink safety, or safety under hostile concurrent path mutation. Concurrent writers remain last-replacement-wins. Roll back by pinning v0.3.0.