MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / classify_project_storage

Function classify_project_storage

src/doctor.rs:379–398  ·  view source on GitHub ↗
(project_root: &Path)

Source from the content-addressed store, hash-verified

377}
378
379fn 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
400async fn classify_project_storage_with_registry(
401 project_root: &Path,

Calls 2

existsMethod · 0.80

Tested by

no test coverage detected