feat: add registry repair framework
- add shared registry validation service - add transaction-safe repair CLI - refactor doctor to use validator - improve restore integrity checks - add registry repair integration tests - strengthen global slug consistency
This commit is contained in:
1 parent
2761863c14
commit
f4947489af
12 files changed
+796
-255
No files matched your search
+9
-7
@@ -356,17 +356,19 @@ impl Db {
|
||||
{
|
||||
let system_conn = db.system.lock().unwrap();
|
||||
let users_conn = db.users.lock().unwrap();
|
||||
match crate::db::users::verify_global_slug_registry_integrity(
|
||||
match crate::services::registry_validator::RegistryValidator::scan(
|
||||
&system_conn,
|
||||
&users_conn,
|
||||
&config.data_dir,
|
||||
None,
|
||||
) {
|
||||
Ok((errors, warnings)) => {
|
||||
for err in errors {
|
||||
tracing::error!("Global registry integrity error: {}", err);
|
||||
}
|
||||
for warn in warnings {
|
||||
tracing::warn!("Global registry integrity warning: {}", warn);
|
||||
Ok(issues) => {
|
||||
for issue in issues {
|
||||
tracing::error!(
|
||||
"Global registry integrity issue: {:?} for slug {}",
|
||||
issue.issue_type,
|
||||
issue.slug
|
||||
);
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in new issue
Block a user