{"record":{"id":"8a8da5648ee51c39","repo":"tinyhumansai/openhuman","slug":"unknown-function-namespace-function-run-op","errorCode":null,"errorMessage":"unknown function '{namespace} {function}'. Run `openhuman {namespace} --help`.","messagePattern":"unknown function '(.+?) (.+?)'\\. Run `openhuman (.+?) --help`\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":583,"sourceCode":"    // *nothing* is filtered, a gated function is still found here, and a check\n    // placed only in the not-found arm would never execute — the command would\n    // simply run. Gating the resolved function instead makes this fire on the\n    // path users actually take, and it stays correct under `run`/`serve` where\n    // `grouped` genuinely is filtered.\n    //\n    // `capability_for_parts` consults the UNFILTERED registry and yields `None`\n    // for a function registered nowhere, so a genuine typo short-circuits the\n    // gate and falls through to the unknown-function message below. Keeping the\n    // two distinguishable is the point: collapsing them would make real typos\n    // harder to diagnose, which is the failure `docs/specs/kernel.md` §3.3\n    // carves the CLI out of.\n    crate::core::cli_capability::ensure_capability_blocking(\n        all::capability_for_parts(namespace, function).flatten(),\n        &format!(\"openhuman {namespace} {function}\"),\n    )?;\n\n    let Some(schema) = schemas.iter().find(|s| s.function == function).cloned() else {\n        return Err(anyhow::anyhow!(\n            \"unknown function '{namespace} {function}'. Run `openhuman {namespace} --help`.\"\n        ));\n    };\n\n    if args.len() > 1 && is_help(&args[1]) {\n        print_function_help(namespace, &schema);\n        return Ok(());\n    }\n\n    // Generic parameter parsing and validation based on schema.\n    let params = parse_function_params(&schema, &args[1..]).map_err(anyhow::Error::msg)?;\n    let method = all::rpc_method_from_parts(namespace, function)\n        .ok_or_else(|| anyhow::anyhow!(\"unregistered controller '{namespace}.{function}'\"))?;\n\n    // Same as the explicit `call` path above — any registered controller may\n    // ultimately drive an orchestrator turn.\n    let rt = tokio::runtime::Builder::new_multi_thread()\n        .enable_all()","sourceCodeStart":565,"sourceCodeEnd":601,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/core/cli.rs#L565-L601","documentation":"The namespace resolved against the registry, but no controller schema in it matches the function name. As with namespaces, the CLI consults the UNFILTERED registry (no ambient context), so a function compiled out by a cargo gate is genuinely absent — e.g. `memory_diff` when the `memory-git` feature is off, while the `memory` namespace itself remains. The capability gate deliberately distinguishes a real typo (falls through to this message) from a gated function, to keep typos diagnosable per docs/specs/kernel.md §3.3.","triggerScenarios":"`openhuman memory seach` (typo); `openhuman memory memory_diff ...` on a build without `memory-git`; calling a function renamed or removed in this version; wrong namespace for a function that lives elsewhere.","commonSituations":"Autocomplete/manual recall errors; feature-gated functions on slim builds; version drift where a function was renamed; scripts targeting a fuller build.","solutions":["List the namespace's real functions: `openhuman <namespace> --help`","Fix the function-name typo","If the function sits behind a cargo feature (e.g. memory-git for memory_diff), rebuild with that feature"],"exampleFix":"# before\nopenhuman memory seach --query 'foo'\n# after\nopenhuman memory search --query 'foo'","handlingStrategy":"validation","validationCode":"# bash: verify the function exists in this namespace before invoking\nopenhuman \"$NS\" --help 2>/dev/null | grep -qw \"$FN\" \\\n  || { echo \"unknown function '$NS $FN' — see 'openhuman $NS --help'\" >&2; exit 2; }\nopenhuman \"$NS\" \"$FN\" \"$@\"","typeGuard":null,"tryCatchPattern":"out=$(openhuman \"$ns\" \"$fn\" \"${@}\" 2>&1) || { case \"$out\" in *\"unknown function\"*) echo \"typo or feature-gated function: $ns $fn\" >&2;; *) printf '%s\\n' \"$out\" >&2;; esac; exit 1; }","preventionTips":["Discover exact function names with `openhuman <namespace> --help` instead of guessing","Some functions are cargo-gated (e.g. memory_diff needs memory-git) while the namespace stays — check the build features","Prefer copy-paste from the schema/help over manual recall for RPC names"],"tags":["cli","dispatch","feature-gate","json-rpc"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}