refactor(atomic-actions): add typed tracking contracts - #501
Open
yuecideng wants to merge 1 commit into
Open
Conversation
This was referenced Aug 11, 2026
yuecideng
marked this pull request as ready for review
August 11, 2026 16:46
Greptile SummaryThe PR replaces implicit trajectory-error feedback with immutable typed tracking contracts shared by direct atomic actions and semantic skill runtimes.
Confidence Score: 5/5The 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.
|
| 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]
Reviews (1): Last reviewed commit: "refactor(atomic-actions): add typed trac..." | Re-trigger Greptile
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stack
feat/expert-program-rollout-validationReplace implicit trajectory-error callbacks with typed tracking observations, metric bands, in-flight/terminal policies, and immutable tracking results.
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
Screenshots
Not applicable.
Validation
tests/sim/atomic_actions/test_tracking.py,test_engine_per_env.py,test_runner.py, and semantic runtime/profile testsChecklist