{"record":{"id":"40edbd00337f8d47","repo":"Hmbown/CodeWhale","slug":"selected-fleet-is-invalid-or-unreadable-inspect-fleet-and","errorCode":null,"errorMessage":"selected Fleet '{}' ({}) is invalid or unreadable; inspect /fleet and repair or clear the selection.","messagePattern":"selected Fleet '(.+?)' \\((.+?)\\) is invalid or unreadable; inspect /fleet and repair or clear the selection\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":8311,"sourceCode":"    config: &mut Config,\n    workspace: &Path,\n    explicit_route_override: bool,\n    explicit_reasoning_override: bool,\n) -> Result<bool> {\n    if explicit_route_override {\n        return Ok(false);\n    }\n    let Some(selected) = crate::fleet::store::resolve_selected_fleet(workspace).map_err(|_| {\n        anyhow!(\n            \"Selected Fleet is missing or unreadable; inspect /fleet and repair or clear the selection.\"\n        )\n    })?\n    else {\n        return Ok(false);\n    };\n    let fleet_name = crate::safe_label::SafeLabel::phrase(&selected.name);\n    let (fleet, _) = crate::fleet::store::load_fleet_at(&selected.path).map_err(|_| {\n        anyhow!(\n            \"selected Fleet '{}' ({}) is invalid or unreadable; inspect /fleet and repair or clear the selection.\",\n            fleet_name,\n            selected.scope.label()\n        )\n    })?;\n    let Some(operator) = fleet.operator.as_ref() else {\n        return Ok(false);\n    };\n    let provider_id = operator.provider.trim();\n    let model_id = operator.model.trim();\n    if provider_id.is_empty() || model_id.is_empty() {\n        bail!(\n            \"selected Fleet '{}' has an incomplete operator route; provider and model must both be non-empty\",\n            fleet_name\n        );\n    }\n    let safe_provider_id = crate::safe_label::SafeLabel::identifier(provider_id);\n    let safe_model_id = crate::safe_label::SafeLabel::catalog_model(model_id);","sourceCodeStart":8293,"sourceCodeEnd":8329,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/lib.rs#L8293-L8329","documentation":"Thrown when the selected Fleet record itself resolved, but `load_fleet_at(&selected.path)` fails to load the fleet definition at the recorded path. The selection points at a Fleet file that is missing, malformed, or unreadable. The error is sanitized through `SafeLabel` and names the fleet and its scope.","triggerScenarios":"A turn starts with a selected Fleet whose definition file at `selected.path` fails `load_fleet_at`: file deleted or moved, invalid YAML/JSON, or unreadable permissions. Skipped when an explicit route override is set.","commonSituations":"Deleting or renaming a fleet file referenced by a saved selection; hand-editing fleet YAML with syntax errors; syncing workspaces across machines so the recorded path no longer exists.","solutions":["Open /fleet and re-select a valid Fleet (or clear the selection).","Restore or fix the fleet definition file at the path shown in the error.","Validate the fleet file's syntax (YAML/JSON) before re-selecting.","If workspaces move, update the selection to the fleet's current location."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if let Ok(Some(selected)) = fleet::store::resolve_selected_fleet(workspace) {\n    if fleet::store::load_fleet_at(&selected.path).is_err() {\n        println!(\"selected fleet file missing/invalid at {}\", selected.path.display());\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate fleet files (parse them) before registering or selecting them.","Avoid moving or deleting fleet files referenced by a saved selection.","Use /fleet to manage selections rather than editing files by hand."],"tags":["fleet","config","file-not-found"],"backgroundTag":"resource-not-found","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}