{"record":{"id":"97fd3ffb41e6c2fd","repo":"Hmbown/CodeWhale","slug":"session-goal-schema-v-is-newer-than-supported-v","errorCode":null,"errorMessage":"Session goal schema v{} is newer than supported v{}","messagePattern":"Session goal schema v(.+?) is newer than supported v(.+?)","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":593,"sourceCode":"        };\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))\n    }\n\n    pub fn validate(&self) -> io::Result<()> {\n        if self.schema_version > CURRENT_SESSION_GOAL_SCHEMA_VERSION {\n            return Err(io::Error::new(\n                io::ErrorKind::InvalidData,\n                format!(\n                    \"Session goal schema v{} is newer than supported v{}\",\n                    self.schema_version, CURRENT_SESSION_GOAL_SCHEMA_VERSION\n                ),\n            ));\n        }\n        let objective = self.objective.trim();\n        if objective.is_empty() || objective.chars().count() > MAX_SESSION_GOAL_OBJECTIVE_CHARS {\n            return Err(io::Error::new(\n                io::ErrorKind::InvalidData,\n                format!(\n                    \"Session goal objective must contain 1..={MAX_SESSION_GOAL_OBJECTIVE_CHARS} characters\"\n                ),\n            ));\n        }\n        Ok(())\n    }","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/session_manager.rs#L575-L611","documentation":"Forward-compatibility guard in SessionGoalState::validate: the persisted goal sidecar declares a schema_version greater than CURRENT_SESSION_GOAL_SCHEMA_VERSION, meaning it was written by a newer Codewhale version and this build cannot safely interpret it.","triggerScenarios":"Thrown at crates/tui/src/session_manager.rs:593 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Upgrade Codewhale to a version supporting the newer goal schema.","Remove or archive the newer-format goal sidecar if continuing on the old version is required.","Avoid manually editing schema_version fields in goal files."],"exampleFix":null,"handlingStrategy":"fallback","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"}