Skip to content

refactor(atomic-actions): generalize runtime endpoints - #488

Merged
yuecideng merged 8 commits into
mainfrom
feat/atomic-action-pr2c-runtime-endpoints
Aug 20, 2026
Merged

refactor(atomic-actions): generalize runtime endpoints#488
yuecideng merged 8 commits into
mainfrom
feat/atomic-action-pr2c-runtime-endpoints

Conversation

@yuecideng

@yuecidengyuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Make generic profile endpoints executable end to end. Bindings are keyed by semantic slots and endpoint IDs; typed runtime targets and payloads flow through command frames, routers, transports, acknowledgements, cancellation, and transport-owned safe holds.

This intentionally removes the temporary arm/tool-shaped routing seam. Joint-position, full-body, and custom endpoint tests all use the same authorization and lifecycle contracts.

Integration

Rebased onto main after #517 and #487 were squash-merged. Conflict resolution preserves #517's num_envs interfaces, engine-local registry, and unified HeldObjectState exclusivity semantics while applying this layer's generic endpoint and transport runtime.

Refs #471
Refs #474

Type of change

  • Breaking change (the temporary arm/tool runtime binding API is removed)

Screenshots

Not applicable.

Validation

  • Affected regression: 510 passed, 5 skipped, 4 deselected
  • Black 26.3.1: all 670 Python files unchanged
  • Changed Python files: Apache headers 61/61, future annotations 61/61, and public-module exports pass
  • Sphinx HTML build: successful (warnings are pre-existing/non-fatal)
  • Full repository suite is delegated to the new GitHub CI run for this updated head

Checklist

  • Code passes Black 26.3.1.
  • Corresponding public/design documentation is included in this layer.
  • Tests cover the affected behavior.
  • No dependency update is required.

@yuecidengyuecideng added atomic action atomic action related functionality refactor breaking labels Aug 11, 2026
@yuecideng
yuecideng marked this pull request as ready for review August 11, 2026 16:46
CopilotAI lite review requested due to automatic review settings August 11, 2026 16:46
@greptile-apps

greptile-appsBot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

Generic endpoint bindings and typed command frames now flow through planning, execution, routing, acknowledgement, cancellation, and safe-hold handling.

  • Replaces temporary arm/tool routing with semantic slot and endpoint bindings.
  • Adds transport-neutral runtime targets, payloads, frames, and mixed-transport routing.
  • Updates built-in actions, planners, profiles, documentation, examples, and tests for the generalized runtime.

Confidence Score: 4/5

The PR does not yet appear safe to merge because a mixed-transport frame can partially begin execution before a later transport reports failure.

The outstanding router issue remains at the current head: transport groups are dispatched sequentially, while rejection is aggregated only after earlier transports may have accepted and acted; runner recovery occurs afterward and cannot restore frame-level atomicity.

Files Needing Attention: embodichain/lab/sim/atomic_actions/transports.py

Important Files Changed

FilenameOverview
embodichain/lab/sim/atomic_actions/transports.pyIntroduces typed endpoint transport routing and acknowledgement aggregation, but multi-transport sends remain sequential and can partially execute before a later failure.
embodichain/lab/sim/atomic_actions/runner.pyExtends execution lifecycle handling to generic command frames and performs target-scoped cancel-then-hold recovery after dispatch failures.
embodichain/lab/sim/atomic_actions/runtime_commands.pyDefines immutable runtime targets, payloads, endpoint commands, synchronized frames, and timed command sequences.
embodichain/lab/sim/atomic_actions/bindings.pyGeneralizes action bindings around semantic slot and endpoint identities with typed runtime targets.
embodichain/lab/sim/atomic_actions/engine.pyAdds engine-owned generic binding and invocation construction paths while preserving profile and direct-control-part resolution.

Sequence Diagram

sequenceDiagram
participant Runner
participant Router
participant TransportA
participant TransportB
Runner->>Router: send(frame)
Router->>TransportA: send(subframe A)
TransportA-->>Router: accepted
Router->>TransportB: send(subframe B)
TransportB-->>Router: rejected / timed out
Router-->>Runner: aggregate failure
Runner->>Router: cancel(all armed targets)
Runner->>Router: hold(all armed targets)
Loading

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

Comment threadembodichain/lab/sim/atomic_actions/transports.py

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refactors the atomic-actions runtime to execute transport-neutral endpoint command frames end-to-end (bindings → planning → session → runner → transport router), removing the temporary arm/tool-shaped binding seam and making runtime targets/payloads first-class.

Changes:

  • Replaces role-based ActionBinding usage with engine-owned endpoint bindings via SkillBindingContract + engine.bind_control_parts(...).
  • Introduces/threads transport-neutral runtime command carriers (RuntimeCommandFrame, TimedCommandSequence) through planning and execution, including safe-stop behavior via endpoint targets.
  • Updates built-in primitives, tests, tutorials, benchmarks, and docs to the new binding + runtime command model.

Reviewed changes

Copilot reviewed 69 out of 69 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
tests/sim/planners/test_curobo_planner.pyUpdates planner tests to use engine.bind_control_parts() bindings.
tests/sim/atomic_actions/test_sim_adapter.pyAdapts sim adapter tests to endpoint command frames/targets and transport semantics.
tests/sim/atomic_actions/test_runtime_commands.pyAdds value-object tests for transport-neutral runtime commands.
tests/sim/atomic_actions/test_runner.pyUpdates runner tests for endpoint frames, target-scoped hold/cancel, and revision staging.
tests/sim/atomic_actions/test_motion_strategy_e2e.pyAdjusts e2e assertions to use per-plan joint trajectory + command sequence.
tests/sim/atomic_actions/test_engine.pyUpdates engine tests for direct endpoint binding and joint-trajectory-only compilation.
tests/sim/atomic_actions/test_curobo_motion_strategy_e2e.pyUpdates curobo e2e to new binding and plan output structure.
tests/sim/atomic_actions/test_control.pyMigrates command override and binding resolution tests to endpoint-scoped overrides.
scripts/tutorials/atomic_action/press.pyMigrates tutorial to bind_control_parts() and per-skill bindings.
scripts/tutorials/atomic_action/place.pyMigrates tutorial to bind_control_parts() and endpoint mappings.
scripts/tutorials/atomic_action/pickup.pyMigrates tutorial invocation binding to endpoint binding helper.
scripts/tutorials/atomic_action/moving_target_recovery.pyUpdates recovery tutorial to new binding API.
scripts/tutorials/atomic_action/move_joints.pyUpdates tutorial to endpoint binding helper for joint motion.
scripts/tutorials/atomic_action/move_held_object.pyUpdates tutorial to per-skill endpoint bindings.
scripts/tutorials/atomic_action/move_end_effector.pyUpdates tutorial to endpoint binding helper.
scripts/tutorials/atomic_action/hand_over.pyUpdates tutorial to endpoint bindings for source/destination slots.
scripts/tutorials/atomic_action/dynamic_obstacle_recovery.pySwitches EEF path computation from trajectory to command sequence; updates binding.
scripts/tutorials/atomic_action/coordinated_placement.pyUpdates coordinated placement tutorial to new bindings and trajectory retrieval.
scripts/tutorials/atomic_action/coordinated_pickment.pyUpdates coordinated pickment tutorial to new endpoint binding.
scripts/tutorials/atomic_action/assemble.pyUpdates assemble tutorial to per-skill endpoint bindings.
scripts/benchmark/atomic_action/press_benchmark.pyMigrates benchmark to endpoint bindings per invocation sequence.
scripts/benchmark/atomic_action/place_benchmark.pyMigrates benchmark to endpoint binding helper.
scripts/benchmark/atomic_action/pickup_benchmark.pyMigrates benchmark to endpoint binding helper.
scripts/benchmark/atomic_action/move_joints_benchmark.pyUpdates benchmark helpers to accept engine and build endpoint binding once.
scripts/benchmark/atomic_action/move_held_object_benchmark.pyMigrates benchmark to endpoint bindings for each skill.
scripts/benchmark/atomic_action/move_end_effector_benchmark.pyMigrates benchmark to endpoint binding helper.
examples/sim/planners/curobo_planner.pyUpdates example to bind endpoints via engine helper.
embodichain/lab/sim/skills/profiles.pyRefactors profile endpoint resolution to produce typed runtime targets and binding endpoints.
embodichain/lab/sim/atomic_actions/sim_adapter.pyImplements joint-position endpoint transport behavior over RuntimeCommandFrame.
embodichain/lab/sim/atomic_actions/runtime.pyReworks planning services to build/validate endpoint bindings and apply endpoint-scoped overrides.
embodichain/lab/sim/atomic_actions/runner.pyUpdates runner to dispatch endpoint frames, target-scoped hold/cancel, and staged revision install.
embodichain/lab/sim/atomic_actions/requirements.pyRemoves ActionBindingRoute lowering seam from endpoint requirements/contracts.
embodichain/lab/sim/atomic_actions/primitives/press.pyMigrates primitive to endpoint binding accessors/targets.
embodichain/lab/sim/atomic_actions/primitives/place.pyMigrates primitive to endpoint binding accessors/targets.
embodichain/lab/sim/atomic_actions/primitives/pick_up.pyMigrates primitive to endpoint binding accessors/targets and target-based DOF handling.
embodichain/lab/sim/atomic_actions/primitives/move_joints.pyMigrates primitive to endpoint binding accessors/targets.
embodichain/lab/sim/atomic_actions/primitives/move_held_object.pyMigrates primitive to endpoint binding accessors/targets.
embodichain/lab/sim/atomic_actions/primitives/move_end_effector.pyMigrates primitive to endpoint binding accessors/targets.
embodichain/lab/sim/atomic_actions/primitives/hand_over.pyMigrates primitive to endpoint binding accessors/targets for source/destination.
embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.pyMigrates primitive to endpoint binding accessors/targets for placing/support.
embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.pyMigrates primitive to endpoint binding accessors/targets for left/right roles.
embodichain/lab/sim/atomic_actions/plans.pyMakes ActionPlan.commands authoritative (command sequences), adds feedback mode + optional joint trajectory retention.
embodichain/lab/sim/atomic_actions/invocation.pyUpdates resolved request binding type and snapshots engine-owned endpoint bindings.
embodichain/lab/sim/atomic_actions/engine.pyAdds bind_control_parts() and constrains compile() to joint-trajectory-backed plans.
embodichain/lab/sim/atomic_actions/control.pyReworks invocation command overrides to be endpoint-scoped and flattenable.
embodichain/lab/sim/atomic_actions/init.pyUpdates public exports to new endpoint binding/command/transport types.
embodichain_tasks/embodichain_tasks/tableware/stack_blocks_two.pyMigrates task planning to per-skill endpoint bindings.
embodichain_tasks/embodichain_tasks/tableware/blocks_ranking_rgb.pyMigrates task planning to per-skill endpoint bindings.
embodichain_tasks/embodichain_tasks/multi_segments/cube_pick_place.pyMigrates multi-segment planning to per-skill endpoint bindings.
docs/source/tutorial/atomic_actions.rstUpdates tutorial docs for new binding contract, router usage, and revised runtime carriers.
docs/source/overview/sim/atomic_actions/robot_skill_profiles.mdUpdates profile docs to remove lowering routes and describe typed runtime targets/bindings.
docs/source/api_reference/embodichain/embodichain.lab.sim.atomic_actions.rstUpdates API reference exports for new endpoint runtime types and router/transport.
docs/design/declarative_expert_program_plan.mdUpdates design doc to reflect PR2C runtime endpoint model and artifacts.
agent_context/MAP.yamlUpdates agent context index keywords for new runtime endpoint types.
.agents/skills/add-atomic-action/SKILL.mdUpdates scaffolding guidance to the new endpoint binding + runtime command model.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +398 to +402
if not isinstance(invocation, ActionInvocation):
raise TypeError("invocation must be an ActionInvocation.")
if self._status is not RunnerStatus.RUNNING:
raise RuntimeError("Only a running execution runner can be revised.")
prepared = self._session._prepare_revision(invocation)
Base automatically changed from feat/atomic-action-pr2b-robot-skill-profile to mainAugust 18, 2026 10:57
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/atomic-action-pr2c-runtime-endpoints branch from 1683b86 to 389e702CompareAugust 18, 2026 11:00
…2c-runtime-endpoints
# Conflicts:
#	docs/design/declarative_expert_program_plan.md
#	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/skills/profiles.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/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/place.py
#	scripts/tutorials/atomic_action/press.py
Remove fallback control periods from motion policies and the atomic action engine. Require planners and custom actions to provide validated timing, propagate explicit interpolation cadence through planning contexts, and update built-ins, tasks, benchmarks, tutorials, docs, and tests.
BREAKING CHANGE: planner results with positions must include dt and duration, custom atomic actions must return TimedTrajectory, and fallback_control_dt is removed.
…pr2c-runtime-endpoints
# Conflicts:
#	agent_context/topics/atomic-actions/atomic-actions.md
#	docs/source/overview/sim/atomic_actions/builtin_actions.md
#	docs/source/overview/sim/atomic_actions/index.md
#	docs/source/tutorial/atomic_actions.rst
#	embodichain/lab/sim/atomic_actions/execution.py
#	scripts/tutorials/atomic_action/dynamic_obstacle_recovery.py
#	tests/sim/atomic_actions/test_core.py
#	tests/sim/atomic_actions/test_engine.py
#	tests/sim/atomic_actions/test_runner.py
…2c-runtime-endpoints
# Conflicts:
#	agent_context/topics/atomic-actions/atomic-actions.md
#	agent_context/topics/motion-planning/motion-planning.md
#	docs/design/declarative_expert_program_plan.md
#	docs/source/overview/sim/atomic_actions/builtin_actions.md
#	docs/source/overview/sim/atomic_actions/index.md
#	docs/source/overview/sim/planners/motion_generator.md
#	docs/source/tutorial/atomic_actions.rst
#	docs/source/tutorial/motion_gen.rst
#	embodichain/lab/sim/atomic_actions/core.py
#	embodichain/lab/sim/atomic_actions/execution.py
#	embodichain/lab/sim/atomic_actions/policies.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/planners/base_planner.py
#	embodichain/lab/sim/planners/motion_generator.py
#	embodichain/lab/sim/planners/neural_planner.py
#	embodichain/lab/sim/planners/utils.py
#	scripts/benchmark/atomic_action/press_benchmark.py
#	scripts/benchmark/motion_generation/planners/ik_interpolate.py
#	scripts/tutorials/atomic_action/control_dt.py
#	scripts/tutorials/atomic_action/dynamic_obstacle_recovery.py
#	scripts/tutorials/atomic_action/press.py
#	tests/benchmark/motion_generation/test_motion_generation_benchmark.py
#	tests/sim/atomic_actions/test_actions.py
#	tests/sim/atomic_actions/test_core.py
#	tests/sim/atomic_actions/test_engine.py
#	tests/sim/atomic_actions/test_runner.py
#	tests/sim/planners/test_motion_generator_batched.py
#	tests/sim/planners/test_plan_state_batched.py
@yuecideng
yuecideng merged commit e8b9688 into mainAug 20, 2026
5 checks passed
@yuecideng
yuecideng deleted the feat/atomic-action-pr2c-runtime-endpoints branch August 20, 2026 02:41
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atomic actionatomic action related functionalitybreakingrefactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yuecideng