{"record":{"id":"5e32d7b90924ccdf","repo":"tinyhumansai/openhuman","slug":"commit-message-cannot-be-empty","errorCode":null,"errorMessage":"Commit message cannot be empty","messagePattern":"Commit message cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/filesystem/git_operations.rs","lineNumber":327,"sourceCode":"        }\n    }\n\n    async fn git_commit(&self, cwd: &Path, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let message = args\n            .get(\"message\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'message' parameter\"))?;\n\n        // Sanitize commit message\n        let sanitized = message\n            .lines()\n            .map(|l| l.trim())\n            .filter(|l| !l.is_empty())\n            .collect::<Vec<_>>()\n            .join(\"\\n\");\n\n        if sanitized.is_empty() {\n            anyhow::bail!(\"Commit message cannot be empty\");\n        }\n\n        // Limit message length\n        let message = Self::truncate_commit_message(&sanitized);\n\n        let output = self\n            .run_git_command_in(cwd, &[\"commit\", \"-m\", &message])\n            .await;\n\n        match output {\n            Ok(_) => Ok(ToolResult::success(format!(\"Committed: {message}\"))),\n            Err(e) => Ok(ToolResult::error(format!(\"Commit failed: {e}\"))),\n        }\n    }\n\n    async fn git_add(&self, cwd: &Path, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let paths = args\n            .get(\"paths\")","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/filesystem/git_operations.rs#L309-L345","documentation":"git_commit sanitized the submitted message by trimming each line and dropping empty ones, and the result was the empty string — the commit would have no message text at all, so it is refused before git runs.","triggerScenarios":"Thrown at src/openhuman/tools/impl/filesystem/git_operations.rs:327 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a message containing at least one non-whitespace line","Check that the message field is a JSON string and not accidentally whitespace-only"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}