feat(action-engine): add SeedGraph planning and bundle generation - #535
Conversation
Greptile SummaryThe PR adds SeedGraph planning, compilation, runtime loading, visualization, and generation of complete Action Engine bundles from Prompt2Scene exports.
Confidence Score: 4/5The fan-in state-topology defect should be fixed before merging because generated bundle diagrams can misrepresent the execution graph. Multi-parent execution units preserve all dependency IDs but use only one parent state as their source, while visualization derives its topology solely from those source-to-target transitions. Files Needing Attention: embodichain/gen_sim/action_engine/compiler/v2.py and embodichain/gen_sim/action_engine/graph_visualization.py
|
| Filename | Overview |
|---|---|
| embodichain/gen_sim/action_engine/compiler/v2.py | Adds bidirectional SeedGraph conversion, but fan-in units materialize an inconsistent source-state topology that produces inaccurate graph visualizations. |
| embodichain/gen_sim/action_engine/generation/generator.py | Orchestrates task interpretation, planning, scene normalization, validation, and bundle generation with extensive input checks. |
| embodichain/gen_sim/action_engine/generation/source_scene.py | Resolves Prompt2Scene formats and normalizes identifiers, paths, scales, poses, and world-frame rotation. |
| embodichain/gen_sim/action_engine/planning/linker.py | Links node and task-group dependencies while validating persisted execution contracts and resource constraints. |
| embodichain/gen_sim/action_engine/runtime/loader.py | Loads and verifies persisted SeedGraphs, supports regeneration and A/B artifacts, and converts them into runtime programs. |
| embodichain/gen_sim/action_engine/graph_visualization.py | Adds chain and DAG rendering with runtime overlays; its source-target topology exposes the compiler's fan-in representation defect. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Prompt2Scene export] --> B[Scene preparation]
B --> C[Task planning]
C --> D[SeedGraph linking and validation]
D --> E[SeedGraph artifact]
D --> F[ExecutionProgram conversion]
F --> G[Runtime loader]
F --> H[Graph visualization PNG]
B --> I[Fast gym config]
E --> J[Generated bundle]
H --> J
I --> J
Prompt To Fix All With AI
### Issue 1
embodichain/gen_sim/action_engine/compiler/v2.py:238
**Fan-in state topology drops branches**
When an execution unit has multiple parent units, this conversion uses only the first parent’s target as the edge source while retaining every parent in `depends_on`. Because graph visualization derives topology exclusively from `source` and `target`, generated bundle diagrams disconnect the remaining branches from the join and can assign incorrect DAG levels and layout.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(action-engine): add SeedGraph plann..." | Re-trigger Greptile
| for unit_id in ordered_units: | ||
| unit = units[unit_id] | ||
| dependencies = sorted(unit["depends_on"]) | ||
| source = start if not dependencies else target_by_unit[dependencies[0]] |
There was a problem hiding this comment.
Fan-in state topology drops branches
When an execution unit has multiple parent units, this conversion uses only the first parent’s target as the edge source while retaining every parent in depends_on. Because graph visualization derives topology exclusively from source and target, generated bundle diagrams disconnect the remaining branches from the join and can assign incorrect DAG levels and layout.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/action_engine/compiler/v2.py
Line: 238
Comment:
**Fan-in state topology drops branches**
When an execution unit has multiple parent units, this conversion uses only the first parent’s target as the edge source while retaining every parent in `depends_on`. Because graph visualization derives topology exclusively from `source` and `target`, generated bundle diagrams disconnect the remaining branches from the join and can assign incorrect DAG levels and layout.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.058e21a to
28f9695
Compare
28f9695 to
63a6f6a
Compare
63a6f6a to
ef4449c
Compare
Description
Stack
ljd/gen-sim-refactor-03-task-frontendAdd deterministic and online SeedGraph planning, strict compiler and linker stages, offline/online candidate selection, bundle generation, packaged robot and sensor templates, artifact hashing, and headless graph visualization.
The persisted graph is validated through the same loader boundary used by later execution layers.
Refs #531
Type of change
Validation
git diff --check- passedChecklist