Uh oh!
There was an error while loading. Please reload this page.
feat(expert-program): add pre-simulation runtime catalog - #504
Conversation
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.
Greptile SummaryThe 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.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| embodichain/lab/gym/envs/expert_program/catalog.py | Adds the immutable integration catalog, fingerprint validation, live drift checks, and registration-owned runtime factories. |
| embodichain/lab/gym/envs/expert_program/extensions.py | Defines versioned endpoint, transport, and parallel-safety declarations with recursive immutability validation. |
| embodichain/lab/gym/envs/expert_program/environment.py | Makes runtime assembly consume registration-owned components and verifies transport and endpoint compatibility before freezing dispatch. |
| embodichain/lab/gym/envs/expert_program/bridge.py | Integrates registered command transports and hold behavior into sequential and parallel demonstration execution. |
| embodichain/lab/gym/envs/expert_program/simulation_environment.py | Connects simulation registrations to provider validation, fresh runtime assembly, segment policies, and parallel-safety creation. |
| embodichain/lab/sim/skills/compiler.py | Makes selected policy presets the authoritative action-option source while retaining compiler-owned dynamic target lowering. |
| embodichain/lab/sim/skills/integration.py | Validates schema-v2 policy templates against semantic target descriptors and reserves compiler-owned option fields. |
| embodichain/lab/sim/skills/parallel_runtime.py | Applies safety validation to synchronized merged command frames and preserves cancellation and safe-hold handling. |
| embodichain_tasks/embodichain_tasks/expert_program/open_drawer.py | Migrates the Open Drawer task to registration-owned declarations and preset-owned Slide options. |
| embodichain_tasks/embodichain_tasks/expert_program/repeated_pick_place.py | Migrates 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
Reviews (6): Last reviewed commit: "wip" | Re-trigger Greptile
There was a problem hiding this comment.
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
| File | Description |
|---|---|
| tests/sim/skills/test_parallel_runtime.py | Adds assertions for runner-config-driven timeouts, completion-hold behavior, and minimum-cycle cadence in parallel runtime. |
| tests/gym/envs/expert_program/test_simulation_environment.py | Extends simulation environment tests for registration ownership, drift detection, custom endpoint/transport wiring, and safety validator lifecycle. |
| tests/gym/envs/expert_program/test_extensions.py | New: tests for standard extension declaration building, immutability rules, and fingerprint sensitivity (e.g., transport order). |
| tests/gym/envs/expert_program/test_catalog.py | Adds catalog validation for standard extension declarations, parallel safety requirements, and registration immutability constraints. |
| tests/gym/envs/expert_program/test_bridge.py | Tests encoder composition order, declared type enforcement, encoder freezing, and runner-cfg snapshotting into lazy parallel runtime creation. |
| embodichain/lab/sim/skills/parallel_runtime.py | Plumbs ExecutionRunnerCfg into ParallelSkillRuntime for timeouts, minimum-cycle cadence, and completion-hold policy. |
| embodichain/lab/gym/envs/expert_program/simulation_environment.py | Removes helper-side extension override seams; makes the factory consume extensions exclusively from SimulationExpertProgramRegistration. |
| embodichain/lab/gym/envs/expert_program/extensions.py | New: implements typed, provider-free extension declarations and deep immutability validation for fingerprint safety. |
| embodichain/lab/gym/envs/expert_program/environment.py | Enforces 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.py | Extends 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.py | Tightens transport encoder contracts via class-level declarations, adds deterministic transport composition order, and supports freezing registrations. |
| embodichain/lab/gym/envs/expert_program/init.py | Re-exports new extension declaration types as part of the Expert Program Gym API surface. |
| docs/source/overview/sim/atomic_actions/robot_skill_profiles.md | Updates docs to reflect registration-owned adapters/transports and immutability/declaration requirements. |
| docs/source/overview/sim/atomic_actions/expert_programs.md | Updates task integration guidance to pass a SimulationExpertProgramRegistration and explains standard-path extension ownership/limits. |
| docs/design/declarative_expert_program_plan.md | Design 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.
| 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}." |
f167a2a to
33c56c0Compare33c56c0 to
f167a2aCompare…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
Uh oh!
There was an error while loading. Please reload this page.
Description
Stack
refactor/typed-tracking-contractConsolidation
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
Screenshots
Not applicable.
Validation
tests/gym/envs/expert_program/test_extensions.py, catalog, bridge, simulation-environment, and parallel-runtime testsChecklist