{"record":{"id":"7d59b318b2cfa7cb","repo":"tinyhumansai/openhuman","slug":"missing-branch-parameter","errorCode":null,"errorMessage":"Missing 'branch' parameter","messagePattern":"Missing 'branch' parameter","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/filesystem/git_operations.rs","lineNumber":368,"sourceCode":"        self.sanitize_git_args(paths)?;\n\n        let output = self.run_git_command_in(cwd, &[\"add\", \"--\", paths]).await;\n\n        match output {\n            Ok(_) => Ok(ToolResult::success(format!(\"Staged: {paths}\"))),\n            Err(e) => Ok(ToolResult::error(format!(\"Add failed: {e}\"))),\n        }\n    }\n\n    async fn git_checkout(\n        &self,\n        cwd: &Path,\n        args: serde_json::Value,\n    ) -> anyhow::Result<ToolResult> {\n        let branch = args\n            .get(\"branch\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'branch' parameter\"))?;\n\n        // Sanitize branch name\n        let sanitized = self.sanitize_git_args(branch)?;\n\n        if sanitized.is_empty() || sanitized.len() > 1 {\n            anyhow::bail!(\"Invalid branch specification\");\n        }\n\n        let branch_name = &sanitized[0];\n\n        // Block dangerous branch names\n        if branch_name.contains('@') || branch_name.contains('^') || branch_name.contains('~') {\n            anyhow::bail!(\"Branch name contains invalid characters\");\n        }\n\n        let output = self\n            .run_git_command_in(cwd, &[\"checkout\", branch_name])\n            .await;","sourceCodeStart":350,"sourceCodeEnd":386,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/filesystem/git_operations.rs#L350-L386","documentation":"Git tool argument guard inside git_checkout: the required 'branch' argument is missing or not a string. Fires before the checkout command is built.","triggerScenarios":"Thrown at src/openhuman/tools/impl/filesystem/git_operations.rs:368 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass 'branch' as the branch name string","List branches first to copy the exact name"],"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"}