Skip to content

feat(skills): add physical-effect workflows and recovery - #480

Merged
yuecideng merged 37 commits into
mainfrom
feat/workflow-reacquisition
Aug 25, 2026
Merged

feat(skills): add physical-effect workflows and recovery#480
yuecideng merged 37 commits into
mainfrom
feat/workflow-reacquisition

Conversation

@yuecideng

@yuecidengyuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Consolidation

Consolidates #505 and #477 through #479 into this layer. Scope: physical handover, effect outcomes, terminal failure reconciliation, phase gates, and bounded reacquisition.
Add preset-owned, bounded workflow recovery inside the canonical SkillRuntime. Recovery starts only after the atomic-action layer emits RECOVERY_REQUIRED: rows that still physically retain the relation retry the original semantic call, while rows that lost it execute a real Pick and then retry.

Attempt budgets are per row, recovery cohorts retain the shared call barrier, every recovery call is freshly observed and grounded, and immutable traces distinguish retained retry, re-acquisition, and post-reacquisition retry. No pose, velocity, constraint, attachment, or symbolic state is fabricated to force success.

Refs #471
Refs #474

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Not applicable.

Validation

  • pytest -q tests/sim/skills/test_runtime.py tests/sim/skills/test_profiles.py tests/sim/skills/test_integration.py tests/sim/skills/test_compiler.py tests/gym/envs/expert_program/test_catalog.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/gym/envs/tasks/test_hand_over.py — 265 passed, 2 deselected
  • Black 26.3.1 check on changed Python files

Checklist

  • Changed Python files pass Black 26.3.1.
  • The design plan documents the workflow-recovery policy and boundary.
  • Tests cover retained relation retry, real re-acquisition, budgets, barriers, and traces.
  • 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/workflow-reacquisition branch from 2a7edb0 to e205b9aCompareAugust 11, 2026 16:09
@yuecidengyuecideng added atomic action atomic action related functionality enhancement New feature or request labels Aug 11, 2026
@yuecideng
yuecideng marked this pull request as ready for review August 11, 2026 16:11
@greptile-apps

greptile-appsBot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds physical-effect reconciliation and bounded workflow recovery to the semantic skill runtime, together with a unified dual-arm handover workflow.

  • Adds row-local retained-relation retries and real Pick-based reacquisition.
  • Adds phase-effect gates, held-object guards, and terminal failure reconciliation.
  • Adds the HandOver-v1 Expert Program task, simulation bindings, configuration, documentation, and focused tests.

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/sim/skills/runtime.pyAdds the row-local workflow recovery state machine, shared barriers, real reacquisition, retry scheduling, and immutable recovery traces.
embodichain/lab/sim/atomic_actions/execution.pyAdds correlated phase gates, held-object guards, failure-policy masks, terminal reconciliation, and their session lifecycle.
embodichain/lab/sim/atomic_actions/runner.pyIntegrates physical gate and guard polling into execution while preserving controller safe-stop behavior.
embodichain/lab/sim/skills/compiler.pyLowers semantic effects, physical checks, recovery descriptors, and unified handover calls into executable invocations.
embodichain/lab/sim/skills/effects.pyExtends effect monitoring with typed physical outcomes used for retry and invalidation decisions.
embodichain/lab/sim/atomic_actions/primitives/hand_over.pyReworks handover into a unified pickup, transfer, receiver acquisition, placement, and release action.
embodichain_tasks/embodichain_tasks/expert_program/hand_over.pyAdds the registered dual-UR5 handover task and its scene, profile, evidence, planning, and success integration.
embodichain_tasks/configs/gym/expert_program/hand_over.jsonDefines the runnable simulation scene and environment configuration for the new handover task.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Execute semantic call] --> B{Physical effect verified?}
B -->|Yes| C[Commit verified task state]
B -->|No| D[Reconcile terminal evidence]
D --> E{Recovery required and budget available?}
E -->|No| F[Record terminal failure]
E -->|Yes| G{Source relation retained?}
G -->|Yes| H[Retry original semantic call]
G -->|No| I[Execute real Pick reacquisition]
I --> H
H --> A
C --> J[Advance shared call barrier]
Loading

Reviews (6): Last reviewed commit: "wip" | Re-trigger Greptile

@yuecideng
yuecideng changed the base branch from feat/physical-effect-phase-gates to feat/expert-program-registration-runtime-catalogAugust 11, 2026 17:48
@yuecidengyuecideng changed the title feat(skills): add bounded workflow reacquisitionfeat(skills): add physical-effect workflows and recoveryAug 11, 2026
@skywhite1024
skywhite1024force-pushed the feat/workflow-reacquisition branch from e205b9a to 9c5d12fCompareAugust 21, 2026 09:35
@skywhite1024
skywhite1024force-pushed the feat/workflow-reacquisition branch from 9c5d12f to e205b9aCompareAugust 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
Base automatically changed from feat/expert-program-registration-runtime-catalog to mainAugust 25, 2026 06:24
@yuecideng
yuecideng merged commit 7de3cb6 into mainAug 25, 2026
2 checks passed
@yuecideng
yuecideng deleted the feat/workflow-reacquisition branch August 25, 2026 08:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atomic actionatomic action related functionalityenhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@yuecideng