feat(actor): compile hierarchical actor configs to LangGraph #411

Merged
freemo merged 1 commit from feature/m3-actor-compiler into master 2026-02-24 18:32:04 +00:00
Owner

Summary

Adds the ActorCompiler module that translates hierarchical GRAPH-type actor YAML configurations into executable LangGraph StateGraph node/edge structures with LSP bindings applied per node. This enables PlanExecutor to run compiled actor graphs through the tool runtime using action-configured roles.

Changes

  • src/cleveragents/actor/compiler.py: Core ActorCompiler with compile_actor() entry point. Translates ActorConfigSchema definitions into NodeConfig/Edge structures with LSP binding metadata. Includes subgraph resolution with cross-actor cycle detection, entry/exit validation, and CompilationMetadata output for diagnostics and CLI inspection.
  • src/cleveragents/actor/__init__.py: Exported new compiler types.
  • Documentation: Added docs/reference/actor_compiler.md covering the compilation pipeline, node binding, and error modes.
  • Tests: 13 Behave scenarios (features/actor_compiler.feature with features/steps/actor_compiler_steps.py) covering compile success/failure, subgraph resolution, and node wiring validation. 4 Robot Framework smoke tests (robot/actor_compiler.robot) for compiling and running multi-node actor graphs. ASV performance benchmarks (benchmarks/actor_compiler_bench.py) for compile overhead.
  • vulture_whitelist.py: Whitelisted new public API symbols.

Closes #158

## Summary Adds the `ActorCompiler` module that translates hierarchical GRAPH-type actor YAML configurations into executable LangGraph `StateGraph` node/edge structures with LSP bindings applied per node. This enables `PlanExecutor` to run compiled actor graphs through the tool runtime using action-configured roles. ### Changes - **`src/cleveragents/actor/compiler.py`**: Core `ActorCompiler` with `compile_actor()` entry point. Translates `ActorConfigSchema` definitions into `NodeConfig`/`Edge` structures with LSP binding metadata. Includes subgraph resolution with cross-actor cycle detection, entry/exit validation, and `CompilationMetadata` output for diagnostics and CLI inspection. - **`src/cleveragents/actor/__init__.py`**: Exported new compiler types. - **Documentation**: Added `docs/reference/actor_compiler.md` covering the compilation pipeline, node binding, and error modes. - **Tests**: 13 Behave scenarios (`features/actor_compiler.feature` with `features/steps/actor_compiler_steps.py`) covering compile success/failure, subgraph resolution, and node wiring validation. 4 Robot Framework smoke tests (`robot/actor_compiler.robot`) for compiling and running multi-node actor graphs. ASV performance benchmarks (`benchmarks/actor_compiler_bench.py`) for compile overhead. - **`vulture_whitelist.py`**: Whitelisted new public API symbols. Closes #158
freemo added this to the v3.1.0 milestone 2026-02-24 10:29:17 +00:00
freemo force-pushed feature/m3-actor-compiler from ed35d25946
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 14s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 30s
CI / security (pull_request) Successful in 44s
CI / integration_tests (pull_request) Successful in 2m52s
CI / unit_tests (pull_request) Successful in 6m48s
CI / docker (pull_request) Successful in 39s
CI / benchmark-regression (pull_request) Successful in 17m39s
CI / coverage (pull_request) Failing after 23m6s
to 59cccd94f4
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 24s
CI / quality (pull_request) Successful in 31s
CI / security (pull_request) Successful in 38s
CI / typecheck (pull_request) Successful in 55s
CI / coverage (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
2026-02-24 14:01:58 +00:00
Compare
freemo force-pushed feature/m3-actor-compiler from 59cccd94f4
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 24s
CI / quality (pull_request) Successful in 31s
CI / security (pull_request) Successful in 38s
CI / typecheck (pull_request) Successful in 55s
CI / coverage (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / unit_tests (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
to 882251b858
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 21s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 23s
CI / typecheck (pull_request) Successful in 38s
CI / security (pull_request) Successful in 49s
CI / unit_tests (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
2026-02-24 14:04:37 +00:00
Compare
freemo force-pushed feature/m3-actor-compiler from 882251b858
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 21s
CI / build (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 23s
CI / typecheck (pull_request) Successful in 38s
CI / security (pull_request) Successful in 49s
CI / unit_tests (pull_request) Has been cancelled
CI / integration_tests (pull_request) Has been cancelled
CI / coverage (pull_request) Has been cancelled
CI / benchmark-regression (pull_request) Has been cancelled
CI / docker (pull_request) Has been cancelled
to 76b087e9ca
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 35s
CI / lint (pull_request) Successful in 38s
CI / quality (pull_request) Successful in 33s
CI / build (pull_request) Successful in 24s
CI / integration_tests (pull_request) Successful in 4m49s
CI / unit_tests (pull_request) Successful in 7m26s
CI / docker (pull_request) Successful in 40s
CI / benchmark-regression (pull_request) Successful in 20m55s
CI / coverage (pull_request) Failing after 53m43s
2026-02-24 14:05:52 +00:00
Compare
freemo scheduled this pull request to auto merge when all checks succeed 2026-02-24 14:24:16 +00:00
freemo self-assigned this 2026-02-24 14:27:22 +00:00
freemo force-pushed feature/m3-actor-compiler from 76b087e9ca
Some checks failed
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 35s
CI / lint (pull_request) Successful in 38s
CI / quality (pull_request) Successful in 33s
CI / build (pull_request) Successful in 24s
CI / integration_tests (pull_request) Successful in 4m49s
CI / unit_tests (pull_request) Successful in 7m26s
CI / docker (pull_request) Successful in 40s
CI / benchmark-regression (pull_request) Successful in 20m55s
CI / coverage (pull_request) Failing after 53m43s
to c47e6445d0
Some checks failed
CI / quality (pull_request) Successful in 19s
CI / lint (pull_request) Successful in 22s
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 33s
CI / build (pull_request) Successful in 26s
CI / typecheck (pull_request) Successful in 1m0s
CI / integration_tests (pull_request) Successful in 4m56s
CI / unit_tests (pull_request) Successful in 15m11s
CI / docker (pull_request) Successful in 1m33s
CI / benchmark-regression (pull_request) Successful in 20m55s
CI / coverage (pull_request) Successful in 33m42s
CI / lint (push) Successful in 13s
CI / build (push) Successful in 15s
CI / quality (push) Successful in 17s
CI / security (push) Successful in 28s
CI / typecheck (push) Successful in 32s
CI / benchmark-regression (push) Has been skipped
CI / integration_tests (push) Successful in 3m3s
CI / benchmark-publish (push) Successful in 10m8s
CI / unit_tests (push) Successful in 12m42s
CI / docker (push) Successful in 39s
CI / coverage (push) Has been cancelled
2026-02-24 17:57:20 +00:00
Compare
freemo merged commit c47e6445d0 into master 2026-02-24 18:32:04 +00:00
freemo deleted branch feature/m3-actor-compiler 2026-02-24 18:32:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core!411
No description provided.