Skip to content

Releases

v2.5.2

Choose a tag to compare

@github-actions github-actions released this 25 Nov 15:05

v2.5.2 (2026-11-25) — Windows Checkout Backup Fsync Fix

Fixed

  • Windows Backup Durability Handle (core/src/repo.rs): Open checkout backup files with write access (OpenOptions::new().write(true)) before calling sync_all(), fixing Access is denied (os error 5) from Windows FlushFileBuffers during multi-file checkout.

Full Changelog: v2.5.1...v2.5.2

v2.5.1

Choose a tag to compare

@github-actions github-actions released this 25 Nov 14:37

v2.5.1 (2026-11-25) — Durable Crash-Atomic Checkout Journal

Fixed

  • Crash-Atomic Multi-File Checkout Journal (.shard/checkout_journal.json): Separated shard checkout into strict phases: stage and hash-verify every manifest, back up every existing target file with sync_all() before mutating any working-tree file, persist an atomic fsynced checkout journal (Swapping -> UpdatingHead), swap files, commit HEAD, and remove backups and journal last.
  • Explicit Rollback Error Propagation: Failed swaps and failed HEAD updates roll back all previously replaced files via idempotent copy-and-replace from durable backups, restore HEAD, surface any rollback errors via ShardError::CheckoutRollbackFailed, and keep .shard/checkout_journal.json on disk when rollback encounters an error so shard recover can retry.
  • Automatic & Explicit Crash Recovery: shard recover (and subsequent write operations add, commit, checkout) replays .shard/checkout_journal.json, rolling back interrupted Swapping checkouts or rolling forward UpdatingHead checkouts cleanly.
  • Boundary Fault-Injection Tests (tests/resilience.rs): Added deterministic tests covering backup failure on file 2, mid-swap failure after file 1 was overwritten, HEAD-update failure, simulated mid-swap crash recovery, simulated UpdatingHead crash recovery, and rollback error propagation.

Full Changelog: v2.5.0...v2.5.1

v2.5.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 13:26

v2.5.0 (2026-11-25) — Transactional Checkout, FastCDC Naming & Empirical Checkpoint Benchmarks

Added

  • Transactional Multi-File Checkout: shard checkout now stages and verifies every manifest into same-directory temp files before overwriting any working-tree file, snapshots existing targets for rollback on persist errors, fsyncs touched parent directories, and updates HEAD last. A corrupt or missing chunk on file N of M leaves files 1..N-1 and HEAD untouched.
  • FastCDC Naming (--chunker fastcdc): Renamed the Gear-hash content-defined chunker from RabinChunker / --chunker rabin to FastCdcChunker / --chunker fastcdc, keeping RabinChunker, Chunker::new_rabin, validate_rabin_params, and --chunker rabin as backwards-compatible aliases.
  • Empirical ML Checkpoint Deduplication Benchmark (benchmarks/bench_checkpoints.py): Measured real IEEE-754 float32 safetensors-style checkpoints across full fine-tuning (0.0% chunk dedup), frozen 90% backbone + 10% updated head (89.0% dedup), and 1 MiB adapter prepend over a frozen backbone (54.5% dedup vs 0.0% fixed), checked into benchmarks/checkpoint_dedup_results.json.
  • Resilience & Property Test Suite (tests/resilience.rs): Added FastCDC roundtrip/shift-invariance property tests, SHRD v1 envelope bit-flip/truncation/AAD-swap rejection tests, torn/corrupt CRC32 WAL recovery tests, and multi-file transactional checkout rollback tests.

Changed

  • Documentation Accuracy: Replaced "Rabin CDC" with "FastCDC", removed "Enterprise" headings, updated the comparison table to note HuggingFace Hub uses FastCDC (Xet), and documented where deduplication helps (frozen backbones, adapters, offset-shifted checkpoints, datasets) vs where it does not (full fine-tune epochs).

Full Changelog: v2.4.1...v2.5.0

v2.4.1

Choose a tag to compare

@github-actions github-actions released this 24 Nov 21:23

v2.4.1 (2026-11-25) — Dependency Security Patch

  • Upgraded rusqlite to 0.42 and r2d2_sqlite to 0.37, moving libsqlite3-sys to 0.40 and clearing RUSTSEC-2026-0459.
  • Refreshed the lockfile and audit configuration comment.

Full Changelog: v2.4.0...v2.4.1

v2.4.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 20:41

v2.4.0 (2026-11-24) — Production Security, Durability & Correctness Hardening

Security & Trust Boundaries

  • P2P Ed25519 challenge-response authentication: Restored real challenge-response handshake using fresh 32-byte OsRng nonces with 30s TTL, domain separation bound to both client and server PeerIds, authorized_keys enforcement, and automatic session cleanup on ConnectionClosed.
  • Strict ID & path validation: Added validate_object_id (64 lowercase hex chars) at every Store backend, PartialTransfer, and P2P handler; added safe_repo_join preventing absolute paths, .., .shard/.git, and symlink escapes across checkout, export, pull, and /api/v1/add; added validate_branch_name blocking ../ traversal while supporting hierarchical branch names like feature/foo.
  • HuggingFace push key protection: shard hf push now stages only safe public repository artifacts (including objects.db for Sled/SQLite repos) into an isolated temp directory with a mandatory pre-flight assertion refusing secret.key, repo.key, keys/archive/, wal.log, partial/, and .shard.lock; passes tokens via HF_TOKEN env var instead of CLI flags.
  • Hardened HTTP API (shard serve): Removed CorsLayer::permissive(); added constant-time bearer token auth (SHARD_API_TOKEN or ephemeral OsRng token); confined /api/v1/add inside the repository; fixed /api/v1/commit to return real commit_id and /api/v1/status to load .shard/index; offloaded blocking operations via tokio::task::spawn_blocking.
  • Signature trust & key hardening: verify and pull/sync require valid signatures (with --allow-unsigned opt-in), verify key_id == blake3(public_key), and anchor trust to local keychain + authorized_keys; all secret keys written atomically with 0o600 permissions; repo.key wrapped with Argon2id + AES-256-GCM when passphrase is set; key rotate supports encrypted keys; secret buffers zeroized with zeroize; AEAD AAD binds chunk hashes; removed panicking RepoCipher::key_bytes(); SHARD_PASSPHRASE env var supported across all commands.
  • Dependency upgrades: Upgraded libp2p to 0.57 (and transitive hickory, rustls-webpki, ring, bytes, rand, time), eliminating active security/soundness advisories and pruning .cargo/audit.toml.

Core Storage, Durability, Memory & Correctness

  • Atomic writes & crash-safe WAL: Added atomic_write (write -> sync_all -> rename -> dir fsync) across FlatStore, Index, refs, HEAD, tags.json, and config.json. WAL now backs up HEAD, active branch ref (refs/heads/<branch>), and index with per-record CRC32 checksums, sync_all(), and graceful recovery from truncated trailing records.
  • Real cross-process locking: Replaced polling OpQueue with OS-level advisory locking (fs2 on <repo_root>/.shard.lock) combined with in-process RwLock across all operations.
  • Eliminated OOM paths: Replaced 1 GiB zstd::bulk::decompress and unbounded zlib decompression with bounded streaming decompression (64 MiB default cap); streamed checkout, export, and pull chunk-by-chunk via BufWriter; streamed push object-by-object from Store; added key-only StorageBackend::iter_keys() for Sled/SQLite GC.
  • Self-describing SHRD v1 chunk envelopes: Fixed push rejection and pull resume corruption for zstd/zlib/--private repos and prevented silent corruption when compression/privacy flags change.
  • 3-way LCA merge: Rewrote merge() with DAG Lowest Common Ancestor computation, full FileManifest preservation (compression, size, content_type, merkle_root), and explicit conflict detection.
  • Fail-closed GC: Deduplicated prune -> gc::gc(); added recursive branch scanning for slashed branches, KeyRotation and partial/ reachability marking, iterative DAG traversal, RAII panic-safe guard, and fail-closed abort on any mark-phase error.
  • Backend & chunker fixes: Removed buggy objects.idx from FlatStore; enabled SQLite WAL + synchronous=NORMAL + busy_timeout=5000 on every pooled connection; reused open Store in import/share/sync to fix Sled double-open crashes; replaced broken rolling hash with true shift-invariant FastCDC (64-bit Gear hash + dual normalized masks).
  • Commit snapshot semantics & import(): Commits now carry forward unmodified manifests from parent commits; import() preserves source directory hierarchy.

Modularity, Bindings, CLI & Repo Hygiene

  • Decomposed 3,566-LOC core/src/lib.rs into focused submodules (repo, auth, backup, p2p_sync, hf, chunk_codec, fs_util, error).
  • Fixed SHARD_* env var key mapping (preserving underscores) and wired validate_config() (with zlib instead of gzip).
  • Rewrote python/shard-py to invoke shard-core directly with GIL release (py.allow_threads).
  • Routed CLI diagnostics strictly to stderr while keeping clean data/JSON on stdout; fixed key verify --json non-zero exit code on failure.
  • Un-ignored and stabilized test_three_node_pull and test_sync_auto_pull; added comprehensive security, P2P auth, merge, GC, and HTTP API tests.
  • Hardened Dockerfile (non-root user), docker-compose.yml, and scripts/install.sh (mktemp -d + trap + macOS shasum); cleaned root clutter.

What's Changed

  • release: v2.3.0 — auth enforcement, share robustness, status --porcelain by @sandy-sachin7 in #1

New Contributors

Full Changelog: v2.3.0...v2.4.0

v2.3.0 — Auth Enforcement, Share Robustness, Status --porcelain

Choose a tag to compare

@sandy-sachin7 sandy-sachin7 released this 02 Jul 20:55

Critical Security Fixes

  • Authorization bypass fixed: P2P serve_request now enforces authentication before serving content
  • Pull/Push now perform challenge-response auth handshake before data exchange

Major Fixes

  • Share re-announces HEAD periodically (30s) and on new connections
  • Share subscribes to repo-specific gossipsub topic
  • Share CLI accepts --listen address argument
  • Proper error logging instead of silent swallows
  • OP_QUEUE guard for concurrent safety

Features

  • shard status --porcelain mode (git-style output)
  • HuggingFace dataset push/pull integration
  • validate_chunk_size() public function

Chores

  • Version bump v2.2.1 -> v2.3.0
  • ignore crate replaces walkdir
  • CI: release build + cargo doc steps added
  • fmt and cargo audit compliance fixes
  • Docker build fix: removed unused reqwest dependency

v2.2.1

Choose a tag to compare

@github-actions github-actions released this 26 May 20:25
chore: bump to v2.2.1 for crates.io publish

v2.2.0

Choose a tag to compare

@github-actions github-actions released this 26 May 20:14
fix: mark flaky test_three_node_pull as ignored

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 25 May 20:28
Release v2.1.0

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 25 May 20:20
Release v2.0.1