{"record":{"id":"7dc825eff2dd738e","repo":"tinyhumansai/openhuman","slug":"ingest-document-missing-required-field-source-id","errorCode":null,"errorMessage":"ingest_document: missing required field `source_id`","messagePattern":"ingest_document: missing required field `source_id`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/query/ingest_document.rs","lineNumber":75,"sourceCode":"    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        log::debug!(\"[tool][memory_tree] ingest_document invoked\");\n\n        let title = args\n            .get(\"title\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"ingest_document: missing required field `title`\"))?\n            .to_string();\n        let body = args\n            .get(\"body\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"ingest_document: missing required field `body`\"))?\n            .to_string();\n        let source_id = args\n            .get(\"source_id\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"ingest_document: missing required field `source_id`\"))?\n            .trim()\n            .to_string();\n        let provider = args\n            .get(\"provider\")\n            .and_then(|v| v.as_str())\n            .unwrap_or(\"agent\")\n            .to_string();\n        let source_ref = args\n            .get(\"source_ref\")\n            .and_then(|v| v.as_str())\n            .map(|s| s.to_string());\n        let owner = args\n            .get(\"owner\")\n            .and_then(|v| v.as_str())\n            .unwrap_or(\"\")\n            .to_string();\n\n        if title.trim().is_empty() || body.trim().is_empty() || source_id.is_empty() {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/query/ingest_document.rs#L57-L93","documentation":"Field-level validation in the ingest_document tool's execute: the `source_id` argument is absent or not a string (title and body already validated). source_id is the dedupe/scope key for the stored document; without it the chunk cannot be attributed to a source, so the write is refused before touching the memory store.","triggerScenarios":"Thrown at src/openhuman/memory/query/ingest_document.rs:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a stable \"source_id\" identifying the collection scope","Use the same source_id for re-ingests of the same document to dedupe"],"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"}