pub fn save_with_state( hash: u64, groups: &[SemanticGroup], head_commit: Option<&str>, file_hashes: &HashMap<String, u64>, )
Save grouping result to the cache file with optional incremental state.