Skip to main content

Module executor

Module executor 

Source
Expand description

CodeGraph execution layer — execute code objects from the graph.

V14.0 scope: Read CodeNode body from Arrow, execute via external Python process, capture output. No file materialization — code lives in the graph.

§Future roadmap

  • V14.0: subprocess execution (current) — spawns python3 -c with code body
  • V14.1: PyO3 in-process execution (requires Captain approval + PyO3 dep)
  • Post-V14: Rust-native interpretation (long-term goal)

§Security (V14.0)

  • Timeout: Enforced via child.wait_timeout() — process killed after deadline.
  • stdout/stderr: Captured, not printed to parent process.
  • Import sandboxing: NOT enforced in V14.0 — call_args is NOT sanitized. This is an internal API for trusted agent use. Do NOT expose to untrusted input. Sandboxing deferred to V14.1 (Captain escalation).

Structs§

ExecutionResult
Result of executing a code object.

Enums§

ExecutorError
Errors from code execution.

Functions§

execute_object
Execute a CodeNode’s body as Python code.

Type Aliases§

Result