Skip to content

feat(expert-program): add pre-simulation runtime catalog - #504

Merged
yuecideng merged 29 commits into
mainfrom
feat/expert-program-registration-runtime-catalog
Aug 25, 2026
Merged

feat(expert-program): add pre-simulation runtime catalog#504
yuecideng merged 29 commits into
mainfrom
feat/expert-program-registration-runtime-catalog

Conversation

@yuecideng

@yuecidengyuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Consolidation

Consolidates #502 and #503 into this layer. Scope: pre-simulation catalogs, semantic action presets, and registration-owned runtime extensions.
Add registration-owned standard runtime extension declarations and factories for transports, endpoint adapters, effects, policies, registered calls, and parallel safety. The catalog fingerprints the complete provider surface and creates fresh runtime instances under a serialized lifecycle.

This replaces environment attribute scanning with one explicit integration owner and keeps provider compatibility identical between preflight and live assembly.

Refs #471
Refs #474

Type of change

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

Screenshots

Not applicable.

Validation

  • Focused coverage: tests/gym/envs/expert_program/test_extensions.py, catalog, bridge, simulation-environment, and parallel-runtime tests
  • Final affected-suite regression on the stack tip: 1215 passed, 2 skipped, 8 deselected
  • Changed Python files pass Black 26.3.1; the Sphinx build and rollout-report drift check pass at the stack tip

Checklist

  • Changed Python files pass Black 26.3.1.
  • Corresponding public/design documentation is included in this stack.
  • Tests cover the affected 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.
@yuecidengyuecideng added gym robot learning env and its related features enhancement New feature or request 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

The PR introduces a registration-owned pre-simulation catalog so provider compatibility, runtime extensions, policy presets, transports, and parallel-safety declarations can be validated consistently before live assembly.

  • Adds immutable, fingerprinted integration catalogs and fresh runtime factories.
  • Moves action-option ownership into typed schema-v2 policy presets.
  • Connects registered transports, endpoint adapters, hold behavior, and parallel-safety validation to Expert Program runtime assembly.
  • Updates the reference tasks, tutorials, documentation, and focused tests for the new contracts.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

FilenameOverview
embodichain/lab/gym/envs/expert_program/catalog.pyAdds the immutable integration catalog, fingerprint validation, live drift checks, and registration-owned runtime factories.
embodichain/lab/gym/envs/expert_program/extensions.pyDefines versioned endpoint, transport, and parallel-safety declarations with recursive immutability validation.
embodichain/lab/gym/envs/expert_program/environment.pyMakes runtime assembly consume registration-owned components and verifies transport and endpoint compatibility before freezing dispatch.
embodichain/lab/gym/envs/expert_program/bridge.pyIntegrates registered command transports and hold behavior into sequential and parallel demonstration execution.
embodichain/lab/gym/envs/expert_program/simulation_environment.pyConnects simulation registrations to provider validation, fresh runtime assembly, segment policies, and parallel-safety creation.
embodichain/lab/sim/skills/compiler.pyMakes selected policy presets the authoritative action-option source while retaining compiler-owned dynamic target lowering.
embodichain/lab/sim/skills/integration.pyValidates schema-v2 policy templates against semantic target descriptors and reserves compiler-owned option fields.
embodichain/lab/sim/skills/parallel_runtime.pyApplies safety validation to synchronized merged command frames and preserves cancellation and safe-hold handling.
embodichain_tasks/embodichain_tasks/expert_program/open_drawer.pyMigrates the Open Drawer task to registration-owned declarations and preset-owned Slide options.
embodichain_tasks/embodichain_tasks/expert_program/repeated_pick_place.pyMigrates repeated pick-and-place to the pre-simulation registration and catalog assembly path.

Sequence Diagram

sequenceDiagram
participant Task as Task registration
participant Catalog as Integration catalog
participant Preflight as Provider-free preflight
participant Factory as Runtime factory
participant Runtime as Live Expert Program runtime
Task->>Catalog: Declare scene, profile, presets, adapters, transports, safety factory
Catalog->>Catalog: Validate immutability and compute fingerprint
Catalog->>Preflight: Supply provider-free manifests and extension surface
Preflight-->>Catalog: Confirm semantic and parallel compatibility
Factory->>Catalog: Revalidate fingerprint and live endpoint coverage
Catalog->>Factory: Create fresh providers and safety validator
Factory->>Runtime: Assemble compiler, engine, encoder, bridge, and policies
Runtime->>Runtime: Freeze transport routing before command dispatch
Loading

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

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

Adds a registration-owned “standard runtime extensions” surface for Expert Program simulation integration, replacing ad-hoc environment scanning/overrides with explicit, fingerprinted declarations and factory-created runtime instances.

Changes:

  • Introduces provider-free extension declarations (endpoint adapters, runtime transports, parallel safety factory) and validates their immutability + exact coverage.
  • Threads ExecutionRunnerCfg/timeouts and preset-controlled coordinator cadence through the parallel runtime and Gym bridge/runtime assembly.
  • Expands integration tests to assert fingerprint drift detection, frozen encoder behavior, and parallel-safety factory lifecycle/serialization.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
tests/sim/skills/test_parallel_runtime.pyAdds assertions for runner-config-driven timeouts, completion-hold behavior, and minimum-cycle cadence in parallel runtime.
tests/gym/envs/expert_program/test_simulation_environment.pyExtends simulation environment tests for registration ownership, drift detection, custom endpoint/transport wiring, and safety validator lifecycle.
tests/gym/envs/expert_program/test_extensions.pyNew: tests for standard extension declaration building, immutability rules, and fingerprint sensitivity (e.g., transport order).
tests/gym/envs/expert_program/test_catalog.pyAdds catalog validation for standard extension declarations, parallel safety requirements, and registration immutability constraints.
tests/gym/envs/expert_program/test_bridge.pyTests encoder composition order, declared type enforcement, encoder freezing, and runner-cfg snapshotting into lazy parallel runtime creation.
embodichain/lab/sim/skills/parallel_runtime.pyPlumbs ExecutionRunnerCfg into ParallelSkillRuntime for timeouts, minimum-cycle cadence, and completion-hold policy.
embodichain/lab/gym/envs/expert_program/simulation_environment.pyRemoves helper-side extension override seams; makes the factory consume extensions exclusively from SimulationExpertProgramRegistration.
embodichain/lab/gym/envs/expert_program/extensions.pyNew: implements typed, provider-free extension declarations and deep immutability validation for fingerprint safety.
embodichain/lab/gym/envs/expert_program/environment.pyEnforces registration-owned extension ownership, freezes transport registration, validates live drift vs catalog, and assembles parallel safety validators from factory capability.
embodichain/lab/gym/envs/expert_program/catalog.pyExtends catalog fingerprinting/validation to include extension declarations and adds validation for “standard” call catalog/effect monitors/tracking metrics.
embodichain/lab/gym/envs/expert_program/bridge.pyTightens transport encoder contracts via class-level declarations, adds deterministic transport composition order, and supports freezing registrations.
embodichain/lab/gym/envs/expert_program/init.pyRe-exports new extension declaration types as part of the Expert Program Gym API surface.
docs/source/overview/sim/atomic_actions/robot_skill_profiles.mdUpdates docs to reflect registration-owned adapters/transports and immutability/declaration requirements.
docs/source/overview/sim/atomic_actions/expert_programs.mdUpdates task integration guidance to pass a SimulationExpertProgramRegistration and explains standard-path extension ownership/limits.
docs/design/declarative_expert_program_plan.mdDesign doc update describing the registration-owned standard runtime extension model and lifecycle guarantees.

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

Comment on lines +195 to +196
if hasattr(declaration, storage_name):
state_names.add(storage_name)
command_encoder=command_encoder,
command_sink=command_sink,
accepted_command_observer=accepted_command_observer,
runner_cfg=selected_runner_cfg,
raise ValueError(
f"Preset {preset_id!r} semantic call {semantic_id!r} selects "
f"non-built-in effect monitor {key!r}; the standard "
"simulation registration supports only {builtin_key!r}."
@yuecideng
yuecideng changed the base branch from feat/semantic-action-option-presets to refactor/typed-tracking-contractAugust 11, 2026 17:48
@yuecidengyuecideng changed the title feat(expert-program): own standard runtime extensionsfeat(expert-program): add pre-simulation runtime catalogAug 11, 2026
@skywhite1024
skywhite1024force-pushed the feat/expert-program-registration-runtime-catalog branch from f167a2a to 33c56c0CompareAugust 21, 2026 09:35
@skywhite1024
skywhite1024force-pushed the feat/expert-program-registration-runtime-catalog branch from 33c56c0 to f167a2aCompareAugust 21, 2026 11:31
Base automatically changed from refactor/typed-tracking-contract to mainAugust 24, 2026 16:09
…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
@yuecideng
yuecideng merged commit 1d22312 into mainAug 25, 2026
2 checks passed
@yuecideng
yuecideng deleted the feat/expert-program-registration-runtime-catalog branch August 25, 2026 06:24
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or requestgymrobot learning env and its related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yuecideng