From fc77c9bb6d1daf90bc57a01962e657b972bcb801 Mon Sep 17 00:00:00 2001 From: Ragnor Comerford Date: Mon, 8 Jun 2026 16:07:23 +0200 Subject: [PATCH] test(optimize): assert the reconcile is metadata-only (fragments_removed) The doc-comment promises fragments_added == fragments_removed == 0 for the metadata-only reconcile; the test only checked fragments_added. Assert fragments_removed == 0 too so the invariant is machine-checked. --- crates/omnigraph/tests/maintenance.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/omnigraph/tests/maintenance.rs b/crates/omnigraph/tests/maintenance.rs index 288ce62..54062e0 100644 --- a/crates/omnigraph/tests/maintenance.rs +++ b/crates/omnigraph/tests/maintenance.rs @@ -312,6 +312,10 @@ async fn optimize_reconciles_preexisting_manifest_head_drift() { person.fragments_added, 0, "drift reconcile is metadata-only — no new compaction", ); + assert_eq!( + person.fragments_removed, 0, + "drift reconcile is metadata-only — no fragments rewritten", + ); // Manifest now tracks the Lance HEAD. let snap = db.snapshot_of(ReadTarget::branch("main")).await.unwrap();