[major] migrate to diagnostics