Skip to content

feat(skills): expose per-expectation effect outcomes - #477

Closed
yuecideng wants to merge 1 commit into
feat/declarative-hand-over-taskfrom
feat/semantic-effect-outcome-matrix
Closed

feat(skills): expose per-expectation effect outcomes#477
yuecideng wants to merge 1 commit into
feat/declarative-hand-over-taskfrom
feat/semantic-effect-outcome-matrix

Conversation

@yuecideng

@yuecideng yuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Expose 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

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

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 deselected
  • Black 26.3.1 check on changed Python files

Checklist

@yuecideng
yuecideng force-pushed the feat/semantic-effect-outcome-matrix branch from 19953c2 to 59e09e5 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

This 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.

  • Exports EffectExpectationDecision with satisfied, contradicted, and inverse-satisfied masks.
  • Tracks success, contradiction, and complete inverse evidence per expectation and environment.
  • Adds transfer-monitor coverage and updates simulation fixtures to accept get_qpos(target=...).

Confidence Score: 4/5

The 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

Important Files Changed

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
Loading

Fix All in Codex Fix All in Claude Code

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

Comment on lines +1513 to +1514
class EffectExpectationDecision:
"""Per-row outcome for one physical state expectation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Fix in Codex Fix in Claude Code

@yuecideng

Copy link
Copy Markdown
Contributor Author

Folded into #480 during stacked-PR consolidation. Its commits remain included in #480; the remote branch is retained for traceability.

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