Skip to content

v0.3.0 — Field-report fixes + platform regression suite

Latest

Choose a tag to compare

@flawme flawme released this 01 Sep 19:58

Every bug from the v0.2.0 Windows field report is fixed, plus five more found by the new regression suite during CI hardening. Each fix has a permanent named regression test.

Critical fixes

  • Stale scan cache → wrong-content restores — the cache keyed on (size, mtime-seconds); two same-size writes within one second reused the first content's hash, and restore silently returned OLD data while verification passed. The cache now keys on sub-second mtime, and checkpoint self-heals: a hash that doesn't match the file's actual content discards the cache and re-scans.
  • Read-only files broke every re-restore (os error 5) — restore now clears read-only/hidden/system attributes (and Unix write-protect bits) before overwriting or deleting, then re-applies the checkpoint's attributes.
  • mtime restore failures were silent — SetFileTime after the readonly attribute was applied failed and was swallowed, so verification failed ~50% of the time. mtime is applied before protection attributes; failures are warnings.

Also fixed

  • Checkpoint IDs deterministic — the ID hashed the creation timestamp, breaking the documented idempotency contract. IDs are now a pure function of description + root + state.
  • Unhashable files poisoned checkpoints — locked files were stored with an empty hash and could never be restored. Now skipped with a warning.
  • .git/ internals were checkpointed — the scanner skips .git/ at any depth.
  • Windows ACL restore always failed (os error 87) — three bugs: NUL-padded SDDL strings, SetNamedSecurityInfoW handed the whole security descriptor as the DACL, and owner/group flags set with null pointers. ACL (DACL) restore now works.
  • diff reported every restored file as Modified on Windows — the re-captured SDDL legitimately differs (inherited ACEs merged), so ACL is excluded from diff's metadata comparison.
  • Restore was not transactional under locks — a pre-flight probe checks every overwrite/delete target first; it is layout-aware and clears write-protection before probing (protection is not a lock).
  • Ignore-rule changes caused phantom diffs — diff/restore treat the checkpoint as a self-contained state under its own rules.
  • migrate accepted newer repositories — now errors with an upgrade hint.
  • Concurrency races — temp-file collisions in the object store, scan cache, and snapshot saves (PID-only names); all use unique names per write.
  • Path-safety guard covered only hashed entries — hashless entries with absolute/traversing paths are now rejected too.

New: platform regression suite

tests/regression/ — 135+ named tests organized by platform (common/, windows/, macos/, linux/). 442 tests total, run on all three CI platforms every commit.

Platform support

Linux and Windows are officially tested (CI matrix + field testing). macOS runs the same CI suite and shares the Unix code paths with Linux — substantially equivalent coverage.

Full changelog: https://github.com/flawme/varn/blob/master/CHANGELOG.md