Simplify declarative skill foundation code - #523
Merged
Conversation
Greptile SummaryThe PR consolidates repeated atomic-action binding declarations and reuses profile rejection diagnostics for resource matching without changing the represented contracts.
Confidence Score: 5/5The PR appears safe to merge because the refactor preserves the represented binding contracts and resource-selection conditions. The shared builders reproduce the prior endpoint, capability, routing, command, and disjointness declarations, while the consolidated matcher rejects resources under the same conditions as the removed implementation.
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/atomic_actions/primitives/_binding_contracts.py | Introduces normalized builders that preserve the existing motion and manipulation slot structures. |
| embodichain/lab/sim/skills/profiles.py | Reuses the diagnostic rejection implementation for candidate filtering while retaining the former matching checks. |
| embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.py | Replaces two inline manipulation slots with equivalent shared-builder calls while preserving cross-slot disjointness. |
| embodichain/lab/sim/atomic_actions/primitives/hand_over.py | Replaces source and destination declarations with equivalent shared manipulation slots. |
| embodichain/lab/sim/atomic_actions/primitives/pick_up.py | Replaces the inline primary manipulation contract without changing its capabilities or required commands. |
| docs/design/declarative_expert_program_plan.md | Updates implementation status and remaining adoption work to reflect the Phase 1 foundation now on main. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Built-in atomic action] --> B{Required resource slot}
B -->|Motion only| C[make_motion_slot]
B -->|Motion and grasp| D[make_manipulation_slot]
C --> E[SkillBindingContract]
D --> E
E --> F[BoundRobotSkillProfile]
F --> G[_rejection_reasons]
G -->|No reasons| H[Candidate assignment]
G -->|Reasons present| I[Reject resource and report diagnostics]
Reviews (1): Last reviewed commit: "Merge branch 'main' into refactor/simpli..." | Re-trigger Greptile
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
This PR simplifies the declarative skill foundation introduced in #487 without changing public APIs or binding behavior.
The refactor removes repeated endpoint, routing, command, and disjointness declarations while keeping each skill's capability and command requirements explicit.
Dependencies: None. PR #487 and PR #519 are already in
main.Refs #474
Type of change
Screenshots
Not applicable.
Validation
black --check --diff --color ./— 666 files unchangedpytest -q tests/sim/skills/test_profiles.py tests/sim/atomic_actions/test_core.py tests/sim/atomic_actions/test_actions.py— 123 passedChecklist