Skip to content

feat(skills): add physical-effect workflows and recovery - #480

Open
yuecideng wants to merge 7 commits into
feat/expert-program-registration-runtime-catalogfrom
feat/workflow-reacquisition
Open

feat(skills): add physical-effect workflows and recovery#480
yuecideng wants to merge 7 commits into
feat/expert-program-registration-runtime-catalogfrom
feat/workflow-reacquisition

Conversation

@yuecideng

@yuecideng yuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Consolidation

Consolidates #505 and #477 through #479 into this layer. Scope: physical handover, effect outcomes, terminal failure reconciliation, phase gates, and bounded reacquisition.
Add preset-owned, bounded workflow recovery inside the canonical SkillRuntime. Recovery starts only after the atomic-action layer emits RECOVERY_REQUIRED: rows that still physically retain the relation retry the original semantic call, while rows that lost it execute a real Pick and then retry.

Attempt budgets are per row, recovery cohorts retain the shared call barrier, every recovery call is freshly observed and grounded, and immutable traces distinguish retained retry, re-acquisition, and post-reacquisition retry. No pose, velocity, constraint, attachment, or symbolic state is fabricated to force success.

Refs #471
Refs #474

Type of change

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

Screenshots

Not applicable.

Validation

  • pytest -q tests/sim/skills/test_runtime.py tests/sim/skills/test_profiles.py tests/sim/skills/test_integration.py tests/sim/skills/test_compiler.py tests/gym/envs/expert_program/test_catalog.py tests/gym/envs/expert_program/test_simulation_environment.py tests/gym/envs/tasks/test_multi_segments_cube_pick_place.py tests/gym/envs/tasks/test_open_drawer.py tests/gym/envs/tasks/test_hand_over.py — 265 passed, 2 deselected
  • Black 26.3.1 check on changed Python files

Checklist

  • Changed Python files pass Black 26.3.1.
  • The design plan documents the workflow-recovery policy and boundary.
  • Tests cover retained relation retry, real re-acquisition, budgets, barriers, and traces.
  • No dependency update is required.

@yuecideng
yuecideng force-pushed the feat/workflow-reacquisition branch from 2a7edb0 to e205b9a Compare August 11, 2026 16:09
@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:11
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds preset-owned, per-row bounded workflow recovery to the canonical semantic skill runtime.

  • Introduces a versioned workflow-recovery policy and enables bounded recovery for the cube pick/place and handover profiles.
  • Partitions failed rows between direct retained-relation retries and real Pick-based re-acquisition before retrying the original call.
  • Preserves the shared semantic-call barrier while recording immutable recovery traces and row-local outcomes.
  • Propagates the new policy through profile snapshots, integration linking, and Gym cadence alignment.

Confidence Score: 5/5

The PR appears safe to merge; no concrete blocking or independently actionable non-blocking defects remain.

The recovery paths preserve row-scoped outcomes, bounded attempt accounting, verified-state-based re-acquisition decisions, and the shared semantic-call barrier across success, failure, and cancellation.

Important Files Changed

Filename Overview
embodichain/lab/sim/skills/runtime.py Adds row-local recovery barriers, real re-acquisition calls, bounded retry scheduling, cancellation handling, and immutable workflow-recovery traces.
embodichain/lab/sim/skills/profiles.py Adds immutable WorkflowRecoveryPolicy and advances SkillPolicyPreset to schema version 3 with snapshot-safe policy ownership.
embodichain/lab/sim/skills/integration.py Preserves workflow-recovery policy when deriving safe presets with required dynamic-collision behavior.
embodichain/lab/gym/envs/expert_program/catalog.py Preserves workflow-recovery configuration while aligning registered profiles to Gym timing.
embodichain/lab/gym/envs/expert_program/simulation_environment.py Carries workflow-recovery policy through runtime profile cadence alignment.
embodichain_tasks/embodichain_tasks/multi_segments/cube_pick_place.py Enables two bounded workflow-recovery attempts for the cube pick/place safe preset.
embodichain_tasks/embodichain_tasks/tableware/hand_over.py Enables two bounded workflow-recovery attempts for the handover safe preset.
tests/sim/skills/test_runtime.py Adds extensive coverage for retained retries, real re-acquisition, mixed cohorts, budgets, cancellation, barriers, and recovery traces.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Original semantic call] --> B{Terminal result}
    B -->|Completed| C[Join shared call barrier]
    B -->|Failed without RECOVERY_REQUIRED| D[Record permanent row failure]
    B -->|RECOVERY_REQUIRED| E{Verified source relation retained?}
    E -->|Yes| F[Retry original semantic call]
    E -->|No| G[Execute real Pick with source resource]
    G -->|Pick succeeds| H[Retry original semantic call]
    G -->|Pick fails| I{Attempt budget remains?}
    F -->|Retry succeeds| C
    H -->|Retry succeeds| C
    F -->|Recovery required again| I
    H -->|Recovery required again| I
    I -->|Yes| E
    I -->|No| D
    C --> J[Advance original workflow once all rows resolve]
Loading

Reviews (1): Last reviewed commit: "feat(skills): add bounded workflow reacq..." | Re-trigger Greptile

@yuecideng
yuecideng changed the base branch from feat/physical-effect-phase-gates to feat/expert-program-registration-runtime-catalog August 11, 2026 17:48
@yuecideng yuecideng changed the title feat(skills): add bounded workflow reacquisition feat(skills): add physical-effect workflows and recovery 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.

1 participant