{"record":{"id":"2e9b5ad0d8e37a03","repo":"tinyhumansai/openhuman","slug":"unknown-clear-arg-other","errorCode":null,"errorMessage":"unknown clear arg: {other}","messagePattern":"unknown clear arg: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/memory_cli.rs","lineNumber":413,"sourceCode":"fn run_clear(args: &[String]) -> Result<()> {\n    let mut namespace: Option<String> = None;\n    let mut verbose = false;\n    let mut i = 0;\n\n    while i < args.len() {\n        match args[i].as_str() {\n            \"--namespace\" | \"-n\" => {\n                namespace = Some(next_arg(args, &mut i, \"--namespace\")?);\n            }\n            \"-v\" | \"--verbose\" => {\n                verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman memory clear --namespace <ns> [-v]\");\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown clear arg: {other}\")),\n        }\n    }\n\n    let namespace =\n        namespace.ok_or_else(|| anyhow::anyhow!(\"--namespace is required for clear\"))?;\n\n    crate::core::logging::init_for_cli_run(verbose, crate::core::logging::CliLogDefault::Global);\n\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()?;\n\n    rt.block_on(async {\n        let client = create_memory_client(\"clear\").await?;\n        client\n            .clear_namespace(&namespace)\n            .await\n            .map_err(anyhow::Error::msg)?;","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/memory_cli.rs#L395-L431","documentation":"Catch-all arm of the `openhuman memory clear` argument loop. Only --namespace/-n, -v/--verbose and -h/--help are recognised; any other token aborts parsing before any destructive clear runs. This guard fires on typos or on a value that drifted out of position behind --namespace.","triggerScenarios":"Thrown at src/core/memory_cli.rs:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only --namespace/-n and -v/--verbose with `openhuman memory clear`.","Ensure the namespace value directly follows --namespace.","Run with -h to see usage."],"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"}