pub fn compact( facts: &mut Vec<KnowledgeFact>, config: &LifecycleConfig, ) -> (usize, Vec<KnowledgeFact>)