pub fn check_incremental_safety(
db: &Connection,
events_dir: &Path,
) -> Result<(), String>Expand description
Check if incremental apply is safe or if full rebuild is needed.
Checks:
- Schema version matches
LATEST_SCHEMA_VERSION projected_eventstracking table exists- Sealed shard manifests are intact (file sizes match)
Returns Ok(()) if incremental is safe, Err(reason) with a human-readable
reason string if a full rebuild is needed.
ยงErrors
Returns an error string describing why incremental rebuild is unsafe (schema mismatch, missing tracking table, or shard corruption).