Skip to content

feat(task-engine): add orchestration and end-to-end integration - #538

Draft
skywhite1024 wants to merge 2 commits into
ljd/gen-sim-refactor-06-execution-agentfrom
ljd/gen-sim-refactor-07-task-orchestration
Draft

feat(task-engine): add orchestration and end-to-end integration#538
skywhite1024 wants to merge 2 commits into
ljd/gen-sim-refactor-06-execution-agentfrom
ljd/gen-sim-refactor-07-task-orchestration

Conversation

@skywhite1024

@skywhite1024skywhite1024 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Stack

Complete the task-first GenSim vertical slice with Task Engine scene feasibility, cross-engine adapters, parallel scene/action orchestration, deterministic recovery and final inspection, run-directory isolation, unified CLI entry points, package data, benchmarks, and architecture documentation.

This layer also ports the upright-grasp ranking and yaw-equivalent downstream reachability enhancement onto main's current AtomicAction endpoint/timing API. It intentionally fixes stale recording and coordinated-grasp test expectations found while rebasing the original branch.

Supersedes #531.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Refactor (mainline AtomicAction API compatibility)

Validation

  • Focused Task Engine and integration coverage - 157 passed
  • Full affected GenSim regression - 706 passed, 9 warnings
  • Related AtomicAction regression - 120 passed
  • Black 26.3.1 - 855 Python files unchanged
  • git diff --check - passed

Checklist

  • Code passes Black 26.3.1.
  • Architecture documentation is included.
  • Unit, integration, and compatibility tests cover the affected behavior.
  • No new third-party dependency is required.

@skywhite1024skywhite1024 added agent Features related to agentic system enhancement New feature or request refactor task A task written in openai gym format for imitation learning or reinforcement learning labels Aug 20, 2026
@greptile-apps

Copy link
Copy Markdown

Greptile Summary

The PR adds a unified Task Engine orchestration pipeline spanning scene preparation, candidate planning, bundle publication, subprocess execution, and CLI integration.

  • Adds versioned orchestration, scene adaptation, feasibility, workflow-state, and artifact contracts.
  • Adds isolated run directories, configuration defaults, prepared-bundle execution, and end-to-end tests.
  • Extends grasp generation and pickup behavior with diagnostics and fallback handling.

Confidence Score: 4/5

The prepared-bundle CLI should not be merged until its success policy is recalculated for the environment count actually launched.

A caller can override the replica count used by execution while acceptance retains a threshold derived from the configured count, causing deterministic false rejection or false acceptance under the all policy.

Files Needing Attention: embodichain/gen_sim/task_engine/cli.py and embodichain/gen_sim/task_engine/config.py

Important Files Changed

FilenameOverview
embodichain/gen_sim/task_engine/cli.pyAdds the unified command interface and prepared-bundle acceptance logic; environment-count overrides are evaluated against a stale configured threshold.
embodichain/gen_sim/task_engine/workflow.pyImplements the end-to-end workflow, parallel interpretation and scene work, bounded retries, publication, and optional execution.
embodichain/gen_sim/task_engine/orchestration/coordinator.pyCoordinates candidate grounding, feasibility checks, planning fallback, preflight, and transactional bundle publication.
embodichain/gen_sim/task_engine/orchestration/scene_source.pyAdds source resolution, content fingerprinting, dependency hashing, and mutation detection for externally owned scene projects.
embodichain/gen_sim/task_engine/_bundle_runner.pyAdds the private subprocess boundary, bundle validation, integrity verification, and Action Engine preflight.
embodichain/gen_sim/task_engine/config.pyDefines strict workflow, planning, and vectorized execution policies loaded from packaged or caller-supplied YAML.
embodichain/lab/sim/atomic_actions/primitives/pick_up.pyExtends pickup planning with grasp diagnostics and support-plane fallback behavior.

Sequence Diagram

sequenceDiagram
participant CLI
participant Workflow as TaskEngineWorkflow
participant Scene as SceneBackend
participant Coordinator
participant Executor as SubprocessActionExecutor
participant Runner as Bundle Runner
CLI->>Workflow: prepare / run-all request
Workflow->>Scene: materialize and inspect scene
Scene-->>Workflow: scene revision and inspection
Workflow->>Coordinator: prepare candidates and bundle
Coordinator-->>Workflow: published executable bundle
alt run-all
Workflow->>Executor: execute bundle with num_envs
Executor->>Runner: launch Action Engine subprocess
Runner-->>Executor: execution report
Executor-->>Workflow: environment outcomes
end
Workflow-->>CLI: manifest and final status
Loading

Fix all with GreploopFix All in CodexFix All in Claude Code

Prompt To Fix All With AI
### Issue 1
embodichain/gen_sim/task_engine/cli.py:181
**Success threshold uses stale count**
When `--num-envs` differs from the configured environment count, execution uses the override but `required_successes` remains based on the configured count, causing `success_policy=all` to reject every smaller run or accept a larger run without all launched environments succeeding.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(task-engine): add orchestration and..." | Re-trigger Greptile


def _run_prepared_bundle(args: argparse.Namespace) -> int:
_, _, execution_cfg = load_task_engine_config(args.config)
num_envs = execution_cfg.num_envs if args.num_envs is None else int(args.num_envs)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1Success threshold uses stale count

When --num-envs differs from the configured environment count, execution uses the override but required_successes remains based on the configured count, causing success_policy=all to reject every smaller run or accept a larger run without all launched environments succeeding.

Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/task_engine/cli.py
Line: 181
Comment:
**Success threshold uses stale count**
When `--num-envs` differs from the configured environment count, execution uses the override but `required_successes` remains based on the configured count, causing `success_policy=all` to reject every smaller run or accept a larger run without all launched environments succeeding.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in CodexFix in Claude Code

@skywhite1024
skywhite1024 marked this pull request as draft August 21, 2026 07:30
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-07-task-orchestration branch from 7b3f430 to 49f439fCompareAugust 21, 2026 09:56
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-07-task-orchestration branch 2 times, most recently from 0bcf207 to d23a2f7CompareAugust 21, 2026 10:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentFeatures related to agentic systemenhancementNew feature or requestrefactortaskA task written in openai gym format for imitation learning or reinforcement learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@skywhite1024@yuecideng