{"record":{"id":"1d7cd5fbbd557aed","repo":"tinyhumansai/openhuman","slug":"edit-i-missing-path","errorCode":null,"errorMessage":"edit[{i}]: missing `path`","messagePattern":"edit\\[(.+?)\\]: missing `path`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/filesystem/apply_patch.rs","lineNumber":136,"sourceCode":"            return Ok(ToolResult::error(\n                \"Rate limit exceeded: too many actions in the last hour\",\n            ));\n        }\n        if !self.security.record_action() {\n            return Ok(ToolResult::error(\n                \"Rate limit exceeded: action budget exhausted\",\n            ));\n        }\n\n        let path_policy = super::security_for_tool_context(&self.security, context, \"apply_patch\");\n\n        // Parse + group edits by file.\n        let mut parsed: Vec<ParsedEdit> = Vec::with_capacity(edits.len());\n        for (i, raw) in edits.iter().enumerate() {\n            let path = raw\n                .get(\"path\")\n                .and_then(|v| v.as_str())\n                .ok_or_else(|| anyhow::anyhow!(\"edit[{i}]: missing `path`\"))?;\n            let old_string = raw\n                .get(\"old_string\")\n                .and_then(|v| v.as_str())\n                .ok_or_else(|| anyhow::anyhow!(\"edit[{i}]: missing `old_string`\"))?;\n            let new_string = raw\n                .get(\"new_string\")\n                .and_then(|v| v.as_str())\n                .ok_or_else(|| anyhow::anyhow!(\"edit[{i}]: missing `new_string`\"))?;\n            let replace_all = raw\n                .get(\"replace_all\")\n                .and_then(|v| v.as_bool())\n                .unwrap_or(false);\n\n            if old_string.is_empty() {\n                return Ok(ToolResult::error(format!(\n                    \"edit[{i}]: `old_string` must not be empty\"\n                )));\n            }","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/filesystem/apply_patch.rs#L118-L154","documentation":"Guard while parsing apply_patch edits: the i-th edit object has no string `path` field, so the target file cannot be determined. Edits are parsed and grouped by file in a loop; this names the exact failing index.","triggerScenarios":"Thrown at src/openhuman/tools/impl/filesystem/apply_patch.rs:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a string `path` to edit[{i}]","Use a workspace-relative or absolute path consistent with the path policy"],"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-14T05:17:10.506Z"}