feat(sim): add semantic runtime effects and parallelism - #496
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the canonical semantic-skill runtime layer (effects + evidence collection + runtime traces) and introduces a strict, versioned parallel-execution contract that compiles down to the existing atomic-action engine. This extends the simulation “skills” facade with first-class articulation semantics, effect-monitor configuration via policy presets, and deterministic metadata/tracing for downstream program/runtime layers.
Changes:
- Extend the scene/registry model to publish canonical articulation joint observations and evidence addresses.
- Add effect-monitor + evidence-source plumbing into robot skill profiles/presets and semantic integration validation.
- Introduce deterministic parallel timing/state-merge contracts plus extensive test coverage (including a GPU cuRobo dynamic-collision recovery gate).
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/sim/skills/test_scene.py | Adds joint-observation registration/snapshot behavior tests and simulation alias semantics coverage. |
| tests/sim/skills/test_runtime.py | New end-to-end tests for SkillRuntime behavior, tracing/metadata, row masking, and parallel factory interactions. |
| tests/sim/skills/test_profiles.py | Validates endpoint effect-source snapshotting and preset effect-monitor behavior. |
| tests/sim/skills/test_parallel.py | New tests for parallel alignment, claim conflicts, timing validation, and deterministic barrier/state merging. |
| tests/sim/skills/test_integration.py | Adds binding-time validation for safe preset dynamic-collision requirements and preset reachability semantics. |
| tests/sim/skills/test_evidence.py | New tests for evidence providers/collector registry, query building, and articulation evidence provider behavior. |
| tests/sim/skills/test_effects.py | New tests for effect contracts, monitor refs/registries, and composite monitor behavior. |
| tests/sim/skills/test_curobo_semantic_runtime_dynamic_recovery_gpu.py | GPU/cuRobo integration test ensuring replanning on dynamic collision-world updates. |
| tests/sim/skills/test_compiler.py | Extends compiler tests for effect monitor selection/validation and dynamic collision policy propagation. |
| tests/sim/skills/test_calls.py | Adds deterministic, JSON-safe semantic-call metadata serialization test. |
| tests/sim/skills/test_articulation_semantics.py | New tests for OperateArticulation call semantics, grounding, and typed articulation effects. |
| embodichain/lab/sim/skills/scene.py | Adds articulation joint evidence address + joint-state providers and integrates joint observations into scene versioning. |
| embodichain/lab/sim/skills/profiles.py | Adds endpoint effect-sources, task-state key plumbing, and preset-owned effect-monitor selections. |
| embodichain/lab/sim/skills/parallel.py | New deterministic parallel execution contracts (claims, timing grid, effect merge, barrier resolution). |
| embodichain/lab/sim/skills/integration.py | Adds OperateArticulation call linking and safe dynamic-collision policy preflight validation. |
| embodichain/lab/sim/skills/calls.py | Adds call metadata serialization and introduces OperateArticulation semantic call type. |
| embodichain/lab/sim/skills/init.py | Exposes new runtime/effects/evidence/parallel APIs through package exports. |
| docs/source/overview/sim/atomic_actions/robot_skill_profiles.md | Documents safe preset dynamic-collision rules and preset-driven effect monitor selection. |
| docs/source/api_reference/embodichain/embodichain.lab.sim.skills.rst | Expands API reference to include semantic runtime, effects/evidence, and parallel execution types. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if not torch.equal( | ||
| current_position, previous_position | ||
| ) or not torch.equal( | ||
| current_validity, | ||
| previous_validity, | ||
| ): | ||
| changed = True | ||
| break | ||
| self._store_joint_baseline(states) | ||
| return changed |
Greptile SummaryThis PR adds semantic skill execution through the atomic-action engine, including physical-effect verification, articulation operations, tracing and retries, and a fail-closed parallel runtime.
Confidence Score: 5/5The PR appears safe to merge because no concrete changed-code failure remained after checking the runtime, effect-verification, articulation, and parallel-execution contracts. The new paths consistently fail closed, preserve row-local verification boundaries, and align with the underlying atomic-action and transport contracts; the investigated edge cases were either explicitly constrained by those contracts or lacked a reachable incorrect outcome.
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/skills/runtime.py | Adds the canonical semantic runtime, row-local execution lifecycle, effect verification, retry handling, and structured traces; no publishable defect was established. |
| embodichain/lab/sim/skills/compiler.py | Extends semantic analysis and grounding with articulation operations, symbolic-write contracts, and versioned effect monitors. |
| embodichain/lab/sim/skills/effects.py | Defines typed semantic effects and composite monitor behavior with batched evidence validation and attempt-local hysteresis. |
| embodichain/lab/sim/skills/evidence.py | Adds versioned evidence queries, providers, collection validation, and simulation adapters for physical postconditions. |
| embodichain/lab/sim/skills/parallel_runtime.py | Adds fail-closed parallel execution, shared-clock coordination, barrier handling, command merging, and verified state consolidation. |
| embodichain/lab/sim/skills/parallel.py | Adds strict resource, timing, command-alignment, state-conflict, and barrier primitives for parallel workflows. |
| embodichain/lab/sim/skills/calls.py | Adds the typed OperateArticulation semantic call and deterministic metadata serialization. |
| embodichain/lab/sim/skills/integration.py | Extends semantic binding and validation for effect-monitor and dynamic-collision contracts. |
| embodichain/lab/sim/skills/profiles.py | Adds immutable preset-level effect-monitor selection and validation. |
| embodichain/lab/sim/skills/scene.py | Adds articulation affordance and joint-evidence scene contracts used by semantic grounding and verification. |
Sequence Diagram
sequenceDiagram
participant Caller
participant Runtime as SkillRuntime
participant Compiler as SemanticSkillCompiler
participant Runner as Atomic ExecutionRunner
participant Evidence as EvidenceCollector
participant Monitor as EffectMonitor
Caller->>Runtime: submit semantic workflow
Runtime->>Compiler: analyze and ground call
Compiler-->>Runtime: invocation + effect specification
Runtime->>Runner: execute invocation
Runner-->>Runtime: pending physical effect
Runtime->>Evidence: collect fresh backend evidence
Evidence-->>Runtime: typed evidence batches
Runtime->>Monitor: evaluate postcondition
Monitor-->>Runner: verified / unresolved / failed
alt verified
Runner-->>Runtime: commit row-local TaskState effects
else retryable failure
Runtime->>Compiler: re-ground from fresh scene state
end
opt parallel workflow
Runtime->>Runtime: align lane commands and resolve barrier
Runtime-->>Caller: fail closed without safety validator
end
Reviews (1): Last reviewed commit: "feat(sim): add semantic runtime effects ..." | Re-trigger Greptile
Description
Stack
feat/atomic-action-verified-runtimeAdd the canonical
SkillRuntime, physical evidence adapters, composite effect monitors, and versioned parallel schema/runtime. Semantic calls compile and execute through the existing atomic-action engine with row-local state, effects, retry, and traces.Parallel execution remains fail closed: resource analysis and shared-clock coordination are implemented, but production concurrency still requires an authoritative physical safety validator.
Refs #471
Refs #474
Type of change
Screenshots
Not applicable.
Validation
tests/sim/skills, including effects, evidence, runtime, parallel compiler/runtime, and conditional cuRobo recovery coverageChecklist