Skip to content

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

Open
yuecideng wants to merge 4 commits into
refactor/typed-tracking-contractfrom
feat/expert-program-registration-runtime-catalog
Open

feat(expert-program): add pre-simulation runtime catalog#504
yuecideng wants to merge 4 commits into
refactor/typed-tracking-contractfrom
feat/expert-program-registration-runtime-catalog

Conversation

@yuecideng

@yuecideng yuecideng 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.

@yuecideng yuecideng 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
Copilot AI lite review requested due to automatic review settings August 11, 2026 16:46
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes task registration the owner of standard Expert Program runtime extensions and verifies that preflight declarations match live assembly.

  • Adds immutable declarations and catalog fingerprints for endpoint adapters, ordered command transports, and parallel-safety factories.
  • Builds fresh runtime assemblies with registered timing, transport, provider, and safety components.
  • Extends parallel safety validation, documentation, and focused tests for registration integrity and lifecycle behavior.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete changed-code defect identified.

Registration declarations, fingerprint checks, live transport-order validation, immutable extension requirements, and fresh safety-validator creation consistently preserve the preflight-to-runtime contract.

Important Files Changed

Filename Overview
embodichain/lab/gym/envs/expert_program/extensions.py Adds strict immutable declarations and cross-validation for endpoint adapters, command transports, and parallel-safety coverage.
embodichain/lab/gym/envs/expert_program/catalog.py Incorporates the complete extension surface into registration fingerprints and creates fresh registration-owned safety validators.
embodichain/lab/gym/envs/expert_program/environment.py Assembles runtime components from registration-owned declarations and checks live transport order against the catalog.
embodichain/lab/gym/envs/expert_program/bridge.py Expands transport contracts with static target and payload declarations and freezes registered command encoders.
embodichain/lab/gym/envs/expert_program/simulation_environment.py Routes standard simulation assembly through the registration and creates live safety validators bound to the factory robot and simulation.
embodichain/lab/sim/skills/parallel_runtime.py Strengthens parallel command validation and dispatch behavior around the authoritative safety gate.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    R[SimulationExpertProgramRegistration] --> D[Provider-free extension declarations]
    D --> C[Integration catalog and fingerprint]
    C --> P[Program preflight]
    R --> F[Simulation runtime factory]
    F --> A[Fresh runtime assembly]
    A --> E[Ordered command encoder]
    A --> S[Fresh parallel safety validator]
    P --> B[AtomicDemoBridge]
    E --> B
    S --> B
    B --> G[Gym environment step boundary]
Loading

Reviews (1): Last reviewed commit: "feat(expert-program): own standard runti..." | Re-trigger Greptile

Copilot AI 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
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.

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-contract August 11, 2026 17:48
@yuecideng yuecideng changed the title feat(expert-program): own standard runtime extensions feat(expert-program): add pre-simulation runtime catalog Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gym robot learning env and its related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants