Skip to content

refactor(atomic-actions): add typed tracking contracts - #501

Open
yuecideng wants to merge 1 commit into
feat/expert-program-rollout-validationfrom
refactor/typed-tracking-contract
Open

refactor(atomic-actions): add typed tracking contracts#501
yuecideng wants to merge 1 commit into
feat/expert-program-rollout-validationfrom
refactor/typed-tracking-contract

Conversation

@yuecideng

@yuecideng yuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

The execution session can now diagnose row-local divergence, success, staleness, and retry through a stable public contract shared by direct atomic actions and semantic runtimes.

Refs #471
Refs #474

Type of change

  • Breaking change (tracking callbacks are replaced by typed contracts)

Screenshots

Not applicable.

Validation

  • Focused coverage: tests/sim/atomic_actions/test_tracking.py, test_engine_per_env.py, test_runner.py, and semantic runtime/profile 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 atomic action atomic action related functionality refactor breaking 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 replaces implicit trajectory-error feedback with immutable typed tracking contracts shared by direct atomic actions and semantic skill runtimes.

  • Adds typed feedback sources, channel bindings, projectors, metrics, evaluators, policies, observations, and tracking results.
  • Projects command frames into endpoint-local tracking setpoints and validates tracking contracts during planning.
  • Updates execution to handle in-flight divergence, invalid feedback, terminal settling, consecutive acceptance, and bounded retries.
  • Propagates tracking policies and bindings through atomic-action and semantic-skill compilation/runtime paths.
  • Adds focused coverage for tracking contracts, per-environment execution, profiles, compilation, and runtime behavior.

Confidence Score: 5/5

The PR appears safe to merge; no concrete blocking failure or independently actionable non-blocking issue remains.

The typed tracking contracts are propagated through planning, bindings, semantic compilation, and execution with explicit validation, fail-closed feedback handling, and lifecycle resets across retries and replans.

Important Files Changed

Filename Overview
embodichain/lab/sim/atomic_actions/tracking.py Introduces validated immutable tracking addresses, observations, channel bindings, projectors, metrics, evaluators, policies, registries, and runtime aggregation.
embodichain/lab/sim/atomic_actions/execution.py Replaces joint-specific error handling with typed in-flight and terminal evaluation, fail-closed feedback handling, settling, and retry lifecycle management.
embodichain/lab/sim/atomic_actions/core.py Projects transport-neutral command frames through endpoint-owned tracking channels and rejects plans missing required metric channels.
embodichain/lab/sim/atomic_actions/plans.py Replaces the feedback-mode enum with validated tracking policies and owned timed tracking sequences.
embodichain/lab/sim/atomic_actions/bindings.py Adds immutable endpoint-local tracking-channel bindings with endpoint-address consistency checks.
embodichain/lab/sim/skills/profiles.py Adds tracking policies to semantic presets and typed joint-position tracking bindings to control-part endpoints.
embodichain/lab/sim/skills/compiler.py Preserves semantic profile tracking policies when grounding calls into atomic-action invocations.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Action invocation] --> B[Resolved tracking policy]
    B --> C[Plan command frames]
    C --> D[Project endpoint tracking setpoints]
    D --> E[Execute command frame]
    E --> F[Read typed feedback]
    F --> G[Evaluate configured metrics]
    G -->|In flight accepted| E
    G -->|Diverged| H[Replan or exhaust recovery]
    G -->|Invalid feedback| I[Fail affected rows closed]
    E --> J[Terminal acceptance]
    J -->|Pending| K[Maintain terminal command]
    K --> F
    J -->|Accepted| L[Complete action]
    J -->|Timeout| M[Retry or exhaust action]
Loading

Reviews (1): Last reviewed commit: "refactor(atomic-actions): add typed trac..." | 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.

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

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 breaking refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants