{"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":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":784,"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            goal_id: snapshot.goal_id.clone(),\n            last_gap_fingerprint: snapshot.last_gap_fingerprint.clone(),\n            repeated_gap_count: snapshot.repeated_gap_count,","sourceCodeStart":766,"sourceCodeEnd":802,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/session_manager.rs#L766-L802","documentation":"Session export's goal snapshot conversion: the runtime goal status string is none of the recognized values, so it cannot be mapped to a SessionGoalStatus; export refuses to write a goal block it cannot interpret rather than guessing.","triggerScenarios":"Loading a goal snapshot whose status field contains a value outside the four allowed enum strings, e.g. \"in-progress\", \"ACTIVE\", or a localized label.","commonSituations":"Hand-edited goal files with a typo or non-canonical casing; old versions of the tool that used different status names; scripts writing goal JSON with custom statuses.","solutions":["Change the status field to one of: \"active\", \"paused\", \"complete\", \"blocked\".","Delete the goal file and recreate the goal via the TUI.","If migrating from an older format, map legacy status names to the current enum before load."],"exampleFix":"// before\n{\"objective\": \"Ship it\", \"status\": \"in-progress\"}\n// after\n{\"objective\": \"Ship it\", \"status\": \"active\"}","handlingStrategy":"validation","validationCode":"fn status_is_supported(s: &str) -> bool {\n    matches!(s.trim(), \"active\" | \"paused\" | \"complete\" | \"blocked\")\n}","typeGuard":null,"tryCatchPattern":"match load_goal(path) {\n    Err(e) if e.to_string().contains(\"unsupported status\") => {\n        eprintln!(\"fix the status field to active|paused|complete|blocked: {e}\");\n    }\n    other => other?,\n}","preventionTips":["Use only the four canonical status strings (lowercase).","Serialize status from the enum, never free-form strings.","Migrate legacy status names before loading old goal files."],"tags":["validation","enum","goals"],"backgroundTag":"invalid-enum-value","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"}