feat(skills): expose per-expectation effect outcomes - #477
Conversation
19953c2 to
59e09e5
Compare
Greptile SummaryThis PR adds immutable per-expectation effect outcomes and changes composite monitoring to maintain hysteresis independently for each expectation while deriving aggregate success and failure from the current observation.
Confidence Score: 4/5The implementation appears safe to merge from a runtime perspective, with the non-blocking omission that its newly exported public API is not documented in this layer. The per-expectation reductions and hysteresis paths have focused tests and no concrete behavioral failure remains, but users lack public documentation for the newly exported decision contract. Files Needing Attention: embodichain/lab/sim/skills/effects.py and embodichain/lab/sim/skills/init.py
|
| Filename | Overview |
|---|---|
| embodichain/lab/sim/skills/effects.py | Adds immutable per-expectation outcomes and independent hysteresis, but the newly public API is not documented in this PR. |
| embodichain/lab/sim/skills/init.py | Re-exports EffectExpectationDecision as part of the public skills API. |
| tests/sim/skills/test_effects.py | Adds focused coverage for mask ownership, inverse evidence, per-expectation hysteresis, and prevention of cross-tick success stitching. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Evidence observation] --> B[Classify clauses by expectation]
B --> C[Update row-local hysteresis counters]
C --> D[Build satisfied mask]
C --> E[Build contradicted mask]
C --> F[Build inverse-satisfied mask]
D --> G[AND all satisfied masks]
E --> H[OR all contradicted masks]
G --> I[EffectMonitorDecision]
H --> I
D --> J[Per-expectation decisions]
E --> J
F --> J
J --> I
Prompt To Fix All With AI
### Issue 1
embodichain/lab/sim/skills/effects.py:1513-1514
**Document per-expectation outcomes**
`EffectExpectationDecision` and `EffectMonitorDecision.expectation_decisions` are newly exported public APIs, but this layer does not document their mask semantics or aggregate relationship, making the new contract undiscoverable through the public documentation.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(skills): expose per-expectation eff..." | Re-trigger Greptile
| class EffectExpectationDecision: | ||
| """Per-row outcome for one physical state expectation. |
There was a problem hiding this comment.
Document per-expectation outcomes
EffectExpectationDecision and EffectMonitorDecision.expectation_decisions are newly exported public APIs, but this layer does not document their mask semantics or aggregate relationship, making the new contract undiscoverable through the public documentation.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/skills/effects.py
Line: 1513-1514
Comment:
**Document per-expectation outcomes**
`EffectExpectationDecision` and `EffectMonitorDecision.expectation_decisions` are newly exported public APIs, but this layer does not document their mask semantics or aggregate relationship, making the new contract undiscoverable through the public documentation.
**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!
Description
Stack
feat/declarative-hand-over-taskExpose immutable, row-local outcomes for every physical effect expectation. The composite monitor now maintains hysteresis independently per expectation and reports satisfied, contradicted, and fully inverse-satisfied masks from one observation, while preserving aggregate success/failure masks as exact reductions.
This gives later failure reconciliation enough evidence to distinguish a single contradictory clause from complete inverse evidence. It also aligns the cube and drawer test robot fixtures with the existing
get_qpos(target=...)simulation contract so every layer in this stack is independently testable.Refs #471
Refs #474
Type of change
Screenshots
Not applicable.
Validation
pytest -q tests/sim/skills/test_effects.py tests/gym/envs/tasks/test_open_drawer.py tests/gym/envs/tasks/test_multi_segments_cube_pick_place.py— 43 passed, 1 deselectedChecklist