Skip to content

test(tasks): gate cube physical recovery - #483

Merged
yuecideng merged 42 commits into
mainfrom
feat/cube-physical-recovery-gates
Aug 25, 2026
Merged

test(tasks): gate cube physical recovery#483
yuecideng merged 42 commits into
mainfrom
feat/cube-physical-recovery-gates

Conversation

@yuecideng

@yuecidengyuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

  • Layer: 14/14
  • Base: feat/production-parallel-safety
  • Depends on: feat(expert-program): validate parallel joint segments #482
  • Followed by: Top of stack
    Close the current physical acceptance loop for declarative Expert Programs. The UR5 cube preset uses 100 real motion samples while retaining the 0.08-rad tracking gate and bounded replanning; a slow GPU gate proves all three lazy Pick/Place/settle/validator cycles complete through contact dynamics.

A second slow gate injects only a bounded controller-ready gripper-open command through ordinary env.step() calls during Place. It proves physical held-object loss, core-owned symbolic invalidation, RECOVERY_REQUIRED, a real re-acquisition Pick, Place retry, and completion of the remaining program. The fault wrapper never writes object pose, velocity, constraint, attachment, or task state.

This layer also documents the placement and parallel APIs and refreshes the deterministic rollout report.

Refs #471
Refs #474

Type of change

  • Enhancement (non-breaking change which improves existing functionality)
  • Documentation update

Screenshots

Not applicable.

Validation

  • Relevant cross-stack regression — 1215 passed, 2 skipped, 8 deselected
  • pytest -q tests/benchmark/expert_program/test_demo_success_cube_sim.py tests/benchmark/expert_program/test_cube_physical_recovery_sim.py -m 'slow and gpu and requires_sim' --run-gpu — 2 passed in 186.81s
  • pytest -q tests/gym/envs/tasks/test_multi_segments_cube_pick_place.py tests/gym/envs/tasks/test_open_drawer.py tests/scripts/tools/test_expert_program_rollout_report.py — 19 passed, 1 deselected
  • python scripts/tools/expert_program_rollout_report.py --check — up to date
  • make html — succeeded; Sphinx reported 698 repository-wide warnings
  • Black 26.3.1 check on changed Python files and git diff --check

Checklist

  • Changed Python files pass Black 26.3.1.
  • Public API, usage, rollout, and design documentation is updated.
  • Unit, integration, and real-simulation tests prove the behavior.
  • No dependency update is required.

Make endpoint bindings, timed command frames, transports, routing, safe holds, and profile lowering controller-agnostic. Preserve joint trajectories as optional feedback artifacts and add staged, same-address invocation revision semantics for mobile and whole-body safety.
@yuecideng
yuecidengforce-pushed the feat/cube-physical-recovery-gates branch from 21b62d7 to f116933CompareAugust 11, 2026 16:09
@yuecidengyuecideng added task A task written in openai gym format for imitation learning or reinforcement learning gym robot learning env and its related features docs Improvements or additions to documentation labels Aug 11, 2026
@yuecideng
yuecideng marked this pull request as ready for review August 11, 2026 16:12
@greptile-apps

greptile-appsBot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds registration-owned physical-effect evidence for repeated cube manipulation and exercises successful execution plus object-loss recovery through simulation.

  • Adds immutable control-part evidence factory declarations, fingerprinting, and runtime assembly.
  • Derives cube grasp evidence from simultaneous contact with both configured gripper fingers.
  • Adds slow GPU acceptance tests for three-cycle execution and physical loss/reacquisition.
  • Refreshes task configurations, rollout reporting, documentation, and planner extraction logic.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains in the eligible follow-up review scope.

No blocking failure remains.

Important Files Changed

FilenameOverview
embodichain/lab/gym/envs/expert_program/catalog.pyAdds fingerprinted registration and fresh runtime construction for control-part evidence providers while restructuring catalog extension snapshots.
embodichain/lab/gym/envs/expert_program/extensions.pyDefines immutable declarations and factory protocols for the built-in control-part evidence route and tightens extension transport validation.
embodichain/lab/gym/envs/expert_program/simulation_environment.pyInstalls the registration-owned evidence provider during simulation runtime assembly.
embodichain_tasks/embodichain_tasks/expert_program/repeated_pick_place.pyAdds dual-finger cube-contact observation and the task-owned factory used to establish physical grasp evidence.
embodichain/lab/sim/planners/curobo/curobo_planner.pyRefactors batched cuRobo trajectory extraction and result assembly while preserving aligned trajectory and timing outputs.
tests/benchmark/expert_program/test_cube_physical_recovery_sim.pyAdds an end-to-end simulation gate covering held-object loss, symbolic invalidation, reacquisition, placement retry, and completion.
tests/benchmark/expert_program/test_demo_success_cube_sim.pyAdds a slow physical acceptance gate for all three repeated pick/place cycles.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Pick cube] --> B[Dual-finger contact evidence]
B --> C[Symbolic held state]
C --> D[Place attempt]
D --> E{Object still held?}
E -->|Yes| F[Settle and validate]
E -->|No| G[Invalidate held state]
G --> H[Recovery required]
H --> I[Re-acquire cube]
I --> D
F --> J[Advance program]
Loading

Reviews (5): Last reviewed commit: "Merge branch 'main' into feat/cube-physi..." | Re-trigger Greptile

@skywhite1024
skywhite1024force-pushed the feat/cube-physical-recovery-gates branch 2 times, most recently from 30dd2d0 to f116933CompareAugust 21, 2026 11:31
…alog
# Conflicts:
#	agent_context/MAP.yaml
#	agent_context/topics/atomic-actions/atomic-actions.md
#	agent_context/topics/motion-planning/motion-planning.md
#	docs/design/declarative_expert_program_plan.md
#	docs/design/expert_program_rollout_report.md
#	docs/source/api_reference/embodichain/embodichain.lab.gym.envs.expert_program.rst
#	docs/source/api_reference/embodichain/embodichain.lab.sim.atomic_actions.rst
#	docs/source/api_reference/embodichain/embodichain.lab.sim.skills.rst
#	docs/source/overview/sim/atomic_actions/builtin_actions.md
#	docs/source/overview/sim/atomic_actions/expert_programs.md
#	docs/source/overview/sim/atomic_actions/index.md
#	docs/source/overview/sim/atomic_actions/robot_skill_profiles.md
#	docs/source/overview/sim/index.rst
#	docs/source/overview/sim/scene_registry.md
#	docs/source/tutorial/atomic_actions.rst
#	embodichain/agents/mllm/expert_program.py
#	embodichain/lab/gym/envs/__init__.py
#	embodichain/lab/gym/envs/demo.py
#	embodichain/lab/gym/envs/embodied_env.py
#	embodichain/lab/gym/envs/expert_program/__init__.py
#	embodichain/lab/gym/envs/expert_program/bridge.py
#	embodichain/lab/gym/envs/expert_program/cfg.py
#	embodichain/lab/gym/envs/expert_program/compiler.py
#	embodichain/lab/gym/envs/expert_program/decoder.py
#	embodichain/lab/gym/envs/expert_program/environment.py
#	embodichain/lab/gym/envs/expert_program/loader.py
#	embodichain/lab/gym/envs/expert_program/simulation.py
#	embodichain/lab/gym/envs/expert_program/simulation_environment.py
#	embodichain/lab/gym/envs/expert_program/simulation_policies.py
#	embodichain/lab/gym/envs/managers/_event_functors/dynamic_settling.py
#	embodichain/lab/gym/utils/gym_utils.py
#	embodichain/lab/sim/atomic_actions/__init__.py
#	embodichain/lab/sim/atomic_actions/affordance.py
#	embodichain/lab/sim/atomic_actions/bindings.py
#	embodichain/lab/sim/atomic_actions/core.py
#	embodichain/lab/sim/atomic_actions/engine.py
#	embodichain/lab/sim/atomic_actions/execution.py
#	embodichain/lab/sim/atomic_actions/goals.py
#	embodichain/lab/sim/atomic_actions/plans.py
#	embodichain/lab/sim/atomic_actions/primitives/_helpers.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.py
#	embodichain/lab/sim/atomic_actions/primitives/hand_over.py
#	embodichain/lab/sim/atomic_actions/primitives/move_end_effector.py
#	embodichain/lab/sim/atomic_actions/primitives/move_held_object.py
#	embodichain/lab/sim/atomic_actions/primitives/move_joints.py
#	embodichain/lab/sim/atomic_actions/primitives/pick_up.py
#	embodichain/lab/sim/atomic_actions/primitives/place.py
#	embodichain/lab/sim/atomic_actions/primitives/press.py
#	embodichain/lab/sim/atomic_actions/runtime.py
#	embodichain/lab/sim/atomic_actions/state.py
#	embodichain/lab/sim/planners/base_planner.py
#	embodichain/lab/sim/planners/curobo/curobo_planner.py
#	embodichain/lab/sim/planners/curobo/curobo_yaml.py
#	embodichain/lab/sim/planners/motion_generator.py
#	embodichain/lab/sim/skills/__init__.py
#	embodichain/lab/sim/skills/calls.py
#	embodichain/lab/sim/skills/compiler.py
#	embodichain/lab/sim/skills/integration.py
#	embodichain/lab/sim/skills/parallel_runtime.py
#	embodichain/lab/sim/skills/profiles.py
#	embodichain/lab/sim/skills/runtime.py
#	embodichain/lab/sim/skills/scene.py
#	embodichain_tasks/configs/gym/expert_program/repeated_pick_place.json
#	embodichain_tasks/configs/gym/open_drawer/cobot_magic_3cam.json
#	embodichain_tasks/embodichain_tasks/multi_segments/cube_pick_place.py
#	embodichain_tasks/embodichain_tasks/tableware/open_drawer.py
#	scripts/benchmark/atomic_action/press_benchmark.py
#	scripts/tools/expert_program_rollout_report.py
#	scripts/tutorials/atomic_action/assemble.py
#	scripts/tutorials/atomic_action/coordinated_pickment.py
#	scripts/tutorials/atomic_action/coordinated_placement.py
#	scripts/tutorials/atomic_action/dynamic_obstacle_recovery.py
#	scripts/tutorials/atomic_action/hand_over.py
#	scripts/tutorials/atomic_action/move_end_effector.py
#	scripts/tutorials/atomic_action/move_held_object.py
#	scripts/tutorials/atomic_action/move_joints.py
#	scripts/tutorials/atomic_action/moving_target_recovery.py
#	scripts/tutorials/atomic_action/pickup.py
#	scripts/tutorials/atomic_action/place.py
#	scripts/tutorials/atomic_action/press.py
#	tests/agents/mllm/test_expert_program.py
#	tests/benchmark/expert_program/test_demo_success_open_drawer_sim.py
#	tests/gym/envs/expert_program/test_bridge.py
#	tests/gym/envs/expert_program/test_compiler.py
#	tests/gym/envs/expert_program/test_completion_metadata.py
#	tests/gym/envs/expert_program/test_decoder.py
#	tests/gym/envs/expert_program/test_environment.py
#	tests/gym/envs/expert_program/test_loader.py
#	tests/gym/envs/expert_program/test_parallel_compiler.py
#	tests/gym/envs/expert_program/test_parallel_schema.py
#	tests/gym/envs/expert_program/test_simulation.py
#	tests/gym/envs/expert_program/test_simulation_environment.py
#	tests/gym/envs/expert_program/test_simulation_policies.py
#	tests/gym/envs/expert_program/test_task_vertical_slices.py
#	tests/gym/envs/tasks/test_multi_segments_cube_pick_place.py
#	tests/gym/envs/test_demo.py
#	tests/gym/envs/test_embodied_env_expert_program.py
#	tests/gym/utils/test_gym_utils.py
#	tests/lab/scripts/test_run_env.py
#	tests/scripts/tools/test_expert_program_rollout_report.py
#	tests/sim/atomic_actions/test_actions.py
#	tests/sim/atomic_actions/test_affordance.py
#	tests/sim/atomic_actions/test_control.py
#	tests/sim/atomic_actions/test_core.py
#	tests/sim/atomic_actions/test_endpoint_runtime_e2e.py
#	tests/sim/atomic_actions/test_engine.py
#	tests/sim/atomic_actions/test_engine_per_env.py
#	tests/sim/atomic_actions/test_runner.py
#	tests/sim/atomic_actions/test_trajectory_ops.py
#	tests/sim/planners/test_curobo_planner.py
#	tests/sim/planners/test_motion_generator_batched.py
#	tests/sim/skills/test_calls.py
#	tests/sim/skills/test_compiler.py
#	tests/sim/skills/test_curobo_semantic_runtime_dynamic_recovery_gpu.py
#	tests/sim/skills/test_effects.py
#	tests/sim/skills/test_evidence.py
#	tests/sim/skills/test_integration.py
#	tests/sim/skills/test_parallel_runtime.py
#	tests/sim/skills/test_profiles.py
#	tests/sim/skills/test_runtime.py
#	tests/sim/skills/test_scene.py
#	tests/test_expert_program_package_data.py
…feat/workflow-reacquisition
# Conflicts:
#	agent_context/topics/atomic-actions/atomic-actions.md
#	docs/design/declarative_expert_program_plan.md
#	docs/source/api_reference/embodichain/embodichain.lab.sim.atomic_actions.rst
#	docs/source/overview/sim/atomic_actions/index.md
#	embodichain/lab/gym/envs/expert_program/catalog.py
#	embodichain/lab/gym/envs/expert_program/simulation_environment.py
#	embodichain/lab/sim/atomic_actions/execution.py
#	embodichain/lab/sim/atomic_actions/invocation.py
#	embodichain/lab/sim/skills/compiler.py
#	embodichain/lab/sim/skills/runtime.py
#	embodichain_tasks/embodichain_tasks/multi_segments/cube_pick_place.py
#	embodichain_tasks/embodichain_tasks/tableware/__init__.py
#	tests/gym/envs/expert_program/test_simulation_environment.py
#	tests/gym/envs/tasks/test_multi_segments_cube_pick_place.py
#	tests/gym/envs/tasks/test_open_drawer.py
#	tests/sim/atomic_actions/test_engine_per_env.py
#	tests/sim/skills/test_compiler.py
#	tests/sim/skills/test_profiles.py
#	tests/sim/skills/test_runtime.py
…on-bindings
# Conflicts:
#	embodichain/lab/gym/envs/expert_program/__init__.py
#	embodichain/lab/gym/envs/expert_program/catalog.py
#	embodichain/lab/gym/envs/expert_program/simulation.py
#	embodichain/lab/sim/skills/__init__.py
#	embodichain/lab/sim/skills/compiler.py
#	tests/gym/envs/expert_program/test_simulation.py
…parallel-safety
# Conflicts:
#	embodichain/lab/gym/envs/expert_program/__init__.py
#	embodichain/lab/sim/planners/base_planner.py
#	embodichain/lab/sim/planners/curobo/curobo_planner.py
#	tests/gym/envs/expert_program/test_catalog.py
#	tests/gym/envs/expert_program/test_simulation_environment.py
…l-recovery-gates
# Conflicts:
#	docs/design/declarative_expert_program_plan.md
#	docs/design/expert_program_rollout_report.md
#	docs/source/api_reference/embodichain/embodichain.lab.gym.envs.expert_program.rst
#	docs/source/overview/sim/atomic_actions/expert_programs.md
#	embodichain_tasks/embodichain_tasks/multi_segments/cube_pick_place.py
#	scripts/tools/expert_program_rollout_report.py
#	tests/gym/envs/tasks/test_multi_segments_cube_pick_place.py
#	tests/scripts/tools/test_expert_program_rollout_report.py
Base automatically changed from feat/production-parallel-safety to mainAugust 25, 2026 12:31
# Conflicts:
#	docs/design/declarative_expert_program_plan.md
#	docs/design/expert_program_rollout_report.md
#	docs/source/api_reference/embodichain/embodichain.lab.gym.envs.expert_program.rst
#	docs/source/api_reference/public_api.rst
#	embodichain/lab/gym/envs/expert_program/__init__.py
#	embodichain/lab/gym/envs/expert_program/catalog.py
#	embodichain/lab/gym/envs/expert_program/environment.py
#	embodichain/lab/gym/envs/expert_program/extensions.py
#	embodichain/lab/gym/envs/expert_program/simulation.py
#	embodichain/lab/sim/atomic_actions/execution.py
#	embodichain/lab/sim/planners/base_planner.py
#	embodichain/lab/sim/planners/curobo/curobo_planner.py
#	embodichain/lab/sim/skills/runtime.py
#	embodichain_tasks/configs/expert_program/hand_over.yaml
#	embodichain_tasks/configs/gym/expert_program/hand_over.json
#	embodichain_tasks/embodichain_tasks/expert_program/hand_over.py
#	embodichain_tasks/embodichain_tasks/expert_program/open_drawer.py
#	embodichain_tasks/embodichain_tasks/expert_program/repeated_pick_place.py
#	tests/gym/envs/expert_program/test_catalog.py
#	tests/gym/envs/expert_program/test_extensions.py
#	tests/gym/envs/expert_program/test_simulation_environment.py
#	tests/gym/envs/expert_program/test_task_hand_over.py
#	tests/scripts/tools/test_expert_program_rollout_report.py
#	tests/sim/atomic_actions/test_engine_per_env.py
#	tests/sim/skills/test_runtime.py
@yuecideng
yuecideng merged commit 8b3c069 into mainAug 25, 2026
3 of 5 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsImprovements or additions to documentationgymrobot learning env and its related featurestaskA 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.

1 participant

@yuecideng