{"record":{"id":"0c9f4dd469ccfb91","repo":"Hmbown/CodeWhale","slug":"session-goal-objective-must-contain-1-max-sessi","errorCode":null,"errorMessage":"Session goal objective must contain 1..={MAX_SESSION_GOAL_OBJECTIVE_CHARS} characters","messagePattern":"Session goal objective must contain 1\\.\\.=(.+?) characters","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/session_manager.rs","lineNumber":603,"sourceCode":"            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    }\n\n    #[must_use]\n    pub fn to_runtime_snapshot(&self) -> GoalSnapshot {\n        GoalSnapshot {\n            objective: Some(self.objective.clone()),\n            status: match self.status {\n                SessionGoalStatus::Active => \"active\",\n                SessionGoalStatus::Paused => \"paused\",\n                SessionGoalStatus::Complete => \"complete\",\n                SessionGoalStatus::Blocked => \"blocked\",","sourceCodeStart":585,"sourceCodeEnd":621,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/session_manager.rs#L585-L621","documentation":"Validation in SessionGoalState::validate: the trimmed objective length fell outside the 1..=MAX_SESSION_GOAL_OBJECTIVE_CHARS (8192) bound. Goal objectives are persisted as bounded files (MAX_SESSION_GOAL_FILE_BYTES 64 KiB) and an empty or oversized objective is invalid data for the goal schema.","triggerScenarios":"Thrown at crates/tui/src/session_manager.rs:603 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply an objective with at least 1 and at most MAX_SESSION_GOAL_OBJECTIVE_CHARS characters.","Truncate or summarize overly long objectives before persisting."],"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"}