{"record":{"id":"e869e576e58e695f","repo":"Hmbown/CodeWhale","slug":"goal-snapshot-has-unsupported-status-other","errorCode":null,"errorMessage":"goal snapshot has unsupported status '{other}'","messagePattern":"goal snapshot has unsupported status '(.+?)'","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":570,"sourceCode":"    pub fn from_runtime(snapshot: &GoalSnapshot) -> io::Result<Option<Self>> {\n        if snapshot.objective.is_none() && snapshot.status.trim() == \"none\" {\n            return Ok(None);\n        }\n        let objective = snapshot\n            .objective\n            .as_deref()\n            .map(str::trim)\n            .filter(|objective| !objective.is_empty())\n            .ok_or_else(|| {\n                io::Error::new(io::ErrorKind::InvalidData, \"goal snapshot has no objective\")\n            })?;\n        let status = match snapshot.status.trim() {\n            \"active\" => SessionGoalStatus::Active,\n            \"paused\" => SessionGoalStatus::Paused,\n            \"complete\" => SessionGoalStatus::Complete,\n            \"blocked\" => SessionGoalStatus::Blocked,\n            other => {\n                return Err(io::Error::new(\n                    io::ErrorKind::InvalidData,\n                    format!(\"goal snapshot has unsupported status '{other}'\"),\n                ));\n            }\n        };\n        let state = Self {\n            schema_version: CURRENT_SESSION_GOAL_SCHEMA_VERSION,\n            objective: objective.to_string(),\n            status,\n            token_budget: snapshot.token_budget,\n            tokens_used: snapshot.tokens_used,\n            time_used_seconds: snapshot.time_used_seconds,\n            continuation_count: snapshot.continuation_count,\n            elapsed_seconds: snapshot.elapsed_seconds.unwrap_or_default(),\n            pause_reason: snapshot.pause_reason,\n        };\n        state.validate()?;\n        Ok(Some(state))","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/session_manager.rs#L552-L588","documentation":"Status enum guard in SessionGoalState::from_runtime: the snapshot's status string, after trimming, does not match any supported SessionGoalStatus value (e.g. not \"active\", \"paused\", \"none\"), so the durable state cannot represent it.","triggerScenarios":"Thrown at crates/tui/src/session_manager.rs:570 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported status strings understood by SessionGoalStatus.","Add a mapping arm in from_runtime if a new status is intentionally introduced.","Check the producer of GoalSnapshot for casing or spelling errors in the status."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}