pub async fn run_check(
range: &str,
guidelines_path: Option<&Path>,
repo_path: Option<&Path>,
strict: bool,
model: Option<String>,
) -> Result<CheckOutcome>Expand description
Non-interactive core for omni-dev git commit message check.
Shared by the CLI (which prints the report and uses the exit code) and the
MCP server (which returns the structured outcome to the caller). Always
runs a single direct AI call — the MCP tool boundary never needs the
map-reduce/interactive-retry flow from CheckCommand::execute.
When repo_path is provided the current working directory is changed for
the duration of the call (serialised by a global mutex) so CWD-dependent
context-discovery and AI-scratch paths resolve relative to the target repo.