Skip to main content

Module runner

Module runner 

Source
Expand description

Tool execution engine for L1 commodity diagnostics

Spawns diagnostic tools as subprocesses, captures their output, parses it through the appropriate parser, and handles timeouts and failures.

Key behaviors:

  • Binary not found: returns ToolResult { success: false } with spawn error
  • Tool timeout: kills child process, returns timeout error
  • Non-zero exit with parseable output: success: true (linters exit non-zero on findings)
  • Parse error: success: false with parse error detail
  • After parsing: injects tool.name into each L1Finding.tool [PM-6]

Parallel execution uses std::thread::scope (Rust 1.63+) for safe scoped threads.

Structs§

ToolRunner
Executes diagnostic tools and captures their output.

Constants§

MAX_OUTPUT_BYTES
Maximum bytes of stdout/stderr to retain from a tool subprocess.