{"record":{"id":"9d10ba9e49cc1392","repo":"tinyhumansai/openhuman","slug":"git-failed","errorCode":null,"errorMessage":"git {} failed: {}","messagePattern":"git (.+?) failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/system/workspace_state.rs","lineNumber":344,"sourceCode":"            \"[workspace_state] refusing to run git: dir={}, disallowed_config_key={key}\",\n            dir.display()\n        );\n        anyhow::bail!(\n            \"refusing to run git in {}: its repository config sets `{key}`, which is \\\n             not on the allowlist of configuration this tool will run under. \\\n             Several git config keys name a command git then executes, and this \\\n             directory is agent-writable, so unrecognised configuration is treated \\\n             as untrusted rather than honoured.\",\n            dir.display()\n        )\n    }\n\n    let output = hardened_git(dir).args(args).output().await?;\n\n    if output.status.success() {\n        Ok(String::from_utf8_lossy(&output.stdout).to_string())\n    } else {\n        anyhow::bail!(\n            \"git {} failed: {}\",\n            args.join(\" \"),\n            String::from_utf8_lossy(&output.stderr)\n        )\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use serde_json::json;\n    use tempfile::TempDir;\n\n    fn make_tool(dir: &TempDir) -> WorkspaceStateTool {\n        WorkspaceStateTool::new(dir.path().to_path_buf())\n    }\n\n    #[test]","sourceCodeStart":326,"sourceCodeEnd":362,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/system/workspace_state.rs#L326-L362","documentation":"workspace_state's hardened git invocation ran but exited non-zero; the message wraps the failing subcommand and git's stderr so the operator can see which repository operation (status/log/diff) failed and why.","triggerScenarios":"Thrown at src/openhuman/tools/impl/system/workspace_state.rs:344 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the stderr text in the error to identify the failure","If the repo is mid-rebase or otherwise dirty-state, resolve that state and retry","Verify the directory is a valid git repository and readable by the process"],"exampleFix":null,"handlingStrategy":"try-catch","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"}