(project_root: &Path)
| 377 | } |
| 378 | |
| 379 | fn classify_project_storage(project_root: &Path) -> DoctorStorageStatus { |
| 380 | let Ok(layout) = crate::storage::resolve_layout_for_current_profile(project_root) else { |
| 381 | return DoctorStorageStatus::Stale; |
| 382 | }; |
| 383 | let graph_exists = layout.graph_db_path.exists(); |
| 384 | let manifest_exists = layout |
| 385 | .manifest_path |
| 386 | .as_ref() |
| 387 | .is_some_and(|path| path.is_file()); |
| 388 | match layout.storage_mode { |
| 389 | crate::storage::StorageMode::ProjectLocal if graph_exists => DoctorStorageStatus::RepoLocal, |
| 390 | crate::storage::StorageMode::ProfileSharded if graph_exists => { |
| 391 | DoctorStorageStatus::ProfileSharded |
| 392 | } |
| 393 | crate::storage::StorageMode::ProfileSharded if manifest_exists => { |
| 394 | DoctorStorageStatus::ManifestReconstructable |
| 395 | } |
| 396 | _ => DoctorStorageStatus::Stale, |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | async fn classify_project_storage_with_registry( |
| 401 | project_root: &Path, |
no test coverage detected