Skip to main content

dispatch_mock_hostlib_call

Function dispatch_mock_hostlib_call 

Source
pub fn dispatch_mock_hostlib_call(
    module: &str,
    method: &str,
    params: &DictMap,
) -> Option<Result<VmValue, VmError>>
Expand description

Dispatch a hostlib builtin through the same scoped mock registry used by host_call.

Hostlib builtins are addressed by their schema module/method pair, so a test can mock hostlib_tools_run_command(...) with {capability: "tools", operation: "run_command", ...}. During the process.exec -> hostlib run_command migration we also honor existing {capability: "process", operation: "exec", ...} command mocks after the canonical tools.run_command lookup, preserving last-write-wins within each mock lane and giving explicit hostlib mocks precedence.