feat(atomic-actions): add verified effect-aware runtime - #495
Conversation
Greptile SummaryThis PR completes the typed verified-action runtime with row-local physical-effect verification, stable task-state identities, plan-attempt diagnostics, and a new
Confidence Score: 3/5The PR should not merge until OperateArticulation receives live joint observations from the standard simulation path and can correct target overshoot. The new articulation action currently fails planning with the built-in scene provider, and its recovery calculation turns overshoot into a no-op that can only exhaust verification retries. Files Needing Attention: embodichain/lab/sim/atomic_actions/primitives/operate_articulation.py, embodichain/lab/sim/atomic_actions/sim_adapter.py, embodichain/lab/sim/atomic_actions/init.py
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/atomic_actions/primitives/operate_articulation.py | Adds the articulation primitive and recovery math, but standard simulation snapshots cannot satisfy its live-state requirement and overshoot recovery emits no corrective motion. |
| embodichain/lab/sim/atomic_actions/execution.py | Adds explicit physical-effect boundaries, row-local verification/recovery transitions, and immutable plan-attempt diagnostics with strong mixed-environment coverage. |
| embodichain/lab/sim/atomic_actions/state.py | Adds owned observed and verified articulation state while retaining defensive snapshot and per-environment mask semantics. |
| embodichain/lab/sim/atomic_actions/effects.py | Extends StateDelta with masked articulation-joint updates and preserves row-local verified-state merges. |
| embodichain/lab/sim/atomic_actions/runtime.py | Introduces stable task-state-key inference and propagates one validated symbolic key across each resource slot. |
| embodichain/lab/sim/atomic_actions/affordance.py | Adds validated articulation operation geometry, named targets, and immutable snapshots for handle-relative grounding. |
| embodichain/lab/sim/atomic_actions/init.py | Exports the new verified-action and articulation APIs, but the public API expansion lacks the required documentation update. |
Sequence Diagram
sequenceDiagram
participant Runner as ExecutionRunner
participant Session as ExecutionSession
participant Scene as SceneProvider
participant Action as OperateArticulation
participant Verifier as EffectVerifier
Runner->>Scene: capture SceneSnapshot
Runner->>Session: tick(context)
Session->>Action: plan(request, context)
Action->>Scene: get articulation joint state
Action->>Action: compute remaining displacement
Action-->>Session: ActionPlan + verification requirement
Session-->>Runner: command frames
Runner->>Verifier: verify physical articulation effect
Verifier-->>Session: correlated verification result
Session->>Session: commit verified row-local StateDelta
Prompt To Fix All With AI
### Issue 1
embodichain/lab/sim/atomic_actions/primitives/operate_articulation.py:404-412
**Standard scene snapshots lack joint state**
When `OperateArticulation` is planned through the built-in `RigidObjectSceneProvider`, the snapshot contains entity poses but no articulation-joint observations, so this lookup raises `ValueError` and the action cannot execute through the standard simulation adapter.
### Issue 2
embodichain/lab/sim/atomic_actions/primitives/operate_articulation.py:440-444
**Overshoot recovery becomes a no-op**
When physics or tracking error moves the articulation past its target, the remaining fraction is negative but is clamped to zero, so recovery requests no corrective handle motion and verification retries eventually exhaust instead of returning the joint to its target.
### Issue 3
embodichain/lab/sim/atomic_actions/__init__.py:261-264
**Public runtime APIs lack documentation**
The package now publicly exports the articulation operation and related verification, diagnostics, and state APIs without documenting their construction, observation-provider requirements, effect lifecycle, or recovery semantics, contrary to the repository requirement to document public API changes.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(atomic-actions): complete verified ..." | Re-trigger Greptile
| observed = context.scene.get_articulation_joint_state( | ||
| goal.articulation_id, | ||
| goal.joint_id, | ||
| ) | ||
| address = (goal.articulation_id, goal.joint_id) | ||
| if observed is None: | ||
| raise ValueError( | ||
| "OperateArticulation recovery-safe planning requires a live " | ||
| f"ObservedArticulationJointState for {address!r}." |
There was a problem hiding this comment.
Standard scene snapshots lack joint state
When OperateArticulation is planned through the built-in RigidObjectSceneProvider, the snapshot contains entity poses but no articulation-joint observations, so this lookup raises ValueError and the action cannot execute through the standard simulation adapter.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/atomic_actions/primitives/operate_articulation.py
Line: 404-412
Comment:
**Standard scene snapshots lack joint state**
When `OperateArticulation` is planned through the built-in `RigidObjectSceneProvider`, the snapshot contains entity poses but no articulation-joint observations, so this lookup raises `ValueError` and the action cannot execute through the standard simulation adapter.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| fraction = torch.zeros_like(total) | ||
| fraction[nonzero_stroke] = ( | ||
| (target - current)[nonzero_stroke] / total[nonzero_stroke] | ||
| ).clamp(0.0, 1.0) | ||
| return fraction[:, 0] * goal.target_displacement |
There was a problem hiding this comment.
Overshoot recovery becomes a no-op
When physics or tracking error moves the articulation past its target, the remaining fraction is negative but is clamped to zero, so recovery requests no corrective handle motion and verification retries eventually exhaust instead of returning the joint to its target.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/atomic_actions/primitives/operate_articulation.py
Line: 440-444
Comment:
**Overshoot recovery becomes a no-op**
When physics or tracking error moves the articulation past its target, the remaining fraction is negative but is clamped to zero, so recovery requests no corrective handle motion and verification retries eventually exhaust instead of returning the joint to its target.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| "ObjectSemantics", | ||
| "OPEN_COMMAND", | ||
| "ObservationProvider", | ||
| "ObservedArticulationJointState", |
There was a problem hiding this comment.
Public runtime APIs lack documentation
The package now publicly exports the articulation operation and related verification, diagnostics, and state APIs without documenting their construction, observation-provider requirements, effect lifecycle, or recovery semantics, contrary to the repository requirement to document public API changes.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/atomic_actions/__init__.py
Line: 261-264
Comment:
**Public runtime APIs lack documentation**
The package now publicly exports the articulation operation and related verification, diagnostics, and state APIs without documenting their construction, observation-provider requirements, effect lifecycle, or recovery semantics, contrary to the repository requirement to document public API changes.
**Context Used:** AGENTS.md ([source](https://github.com/dexforce/embodichain/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Description
Stack
feat/semantic-skill-compilerConsolidation
Consolidates #493 and #494 into this layer. Scope: row-local lifecycle, physical-effect monitors, and the verified atomic-action runtime.
Complete the typed verified-action runtime with physical effect requirements, stable held-object and articulation state, effect-aware plans, and the reusable
OperateArticulationprimitive.Pick, Place, coordinated manipulation, HandOver, and articulation operations now expose explicit terminal effect boundaries and row-local state deltas. Verification observes real physics; it never creates synthetic attachments or teleports task objects.
Refs #471
Refs #474
Type of change
Screenshots
Not applicable.
Validation
tests/sim/atomic_actions, including articulation effects and per-environment executionChecklist