Skip to content

feat(atomic-actions): add verified effect-aware runtime - #495

Open
yuecideng wants to merge 3 commits into
feat/semantic-skill-compilerfrom
feat/atomic-action-verified-runtime
Open

feat(atomic-actions): add verified effect-aware runtime#495
yuecideng wants to merge 3 commits into
feat/semantic-skill-compilerfrom
feat/atomic-action-verified-runtime

Conversation

@yuecideng

@yuecideng yuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Consolidation

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 OperateArticulation primitive.

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

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

Screenshots

Not applicable.

Validation

  • Focused coverage: tests/sim/atomic_actions, including articulation effects and per-environment execution
  • 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 atomic action atomic action related functionality 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

This PR completes the typed verified-action runtime with row-local physical-effect verification, stable task-state identities, plan-attempt diagnostics, and a new OperateArticulation primitive.

  • Adds articulation affordances, goals, observed and verified joint state, effect-aware plans, and recovery displacement calculation.
  • Propagates stable task-state keys through Pick, Place, HandOver, and coordinated manipulation.
  • Expands per-environment execution, effect-verification, articulation, and state-transition coverage.

Confidence Score: 3/5

The 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

Important Files Changed

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
Loading

Fix All in Codex Fix All in Claude Code

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

Comment on lines +404 to +412
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}."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Codex Fix in Claude Code

Comment on lines +440 to +444
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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.

Fix in Codex Fix in Claude Code

Comment on lines 261 to +264
"ObjectSemantics",
"OPEN_COMMAND",
"ObservationProvider",
"ObservedArticulationJointState",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Fix in Codex Fix in Claude Code

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@yuecideng
yuecideng changed the base branch from feat/semantic-effect-monitors to feat/semantic-skill-compiler August 11, 2026 17:47
@yuecideng yuecideng changed the title feat(atomic-actions): complete verified action runtime feat(atomic-actions): add verified effect-aware runtime Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atomic action atomic action related functionality enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants