{"record":{"id":"60929e4d5d509d14","repo":"tinyhumansai/openhuman","slug":"invalid-cards-e","errorCode":null,"errorMessage":"invalid `cards`: {e}","messagePattern":"invalid `cards`: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/tools/todo.rs","lineNumber":158,"sourceCode":"                patch.content = optional_string(&args, \"content\");\n                ops::edit(&location, &id, patch).await\n            }\n            \"update_status\" => {\n                let id = required_string(&args, \"id\")?;\n                let status = required_string(&args, \"status\")?;\n                let status = ops::parse_status(&status).map_err(anyhow::Error::msg)?;\n                ops::update_status(&location, &id, status).await\n            }\n            \"remove\" => {\n                let id = required_string(&args, \"id\")?;\n                ops::remove(&location, &id).await\n            }\n            \"replace\" => {\n                let cards = args\n                    .get(\"cards\")\n                    .ok_or_else(|| anyhow::anyhow!(\"missing `cards` for op=replace\"))?;\n                let cards: Vec<TaskBoardCard> = serde_json::from_value(cards.clone())\n                    .map_err(|e| anyhow::anyhow!(\"invalid `cards`: {e}\"))?;\n                ops::replace(&location, cards).await\n            }\n            \"clear\" => ops::clear(&location).await,\n            \"list\" => ops::list(&location).await,\n            other => {\n                return Ok(ToolResult::error(format!(\n                \"unknown op '{other}' (expected add|edit|update_status|remove|replace|clear|list)\"\n            )))\n            }\n        };\n\n        match result {\n            Ok(snap) => {\n                let payload = json!({\n                    \"threadId\": snap.thread_id,\n                    \"cards\": snap.cards,\n                    \"markdown\": snap.markdown,\n                });","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/tools/todo.rs#L140-L176","documentation":"The `cards` array supplied to the todo tool's op=replace failed to deserialize into card objects — the wrapped error names the exact serde mismatch (wrong field type, unknown structure). Fires after the presence check but before any write, so the board is unchanged.","triggerScenarios":"Thrown at src/openhuman/agent/tools/todo.rs:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Match each card object to the todo card schema (string ids, valid status values)","Check the serde error text for the offending field and value"],"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-23T08:17:48.524Z"}