Skip to content

feat(wir): validate canonical interop contracts - #127

Merged
Teakowa merged 2 commits into
mainfrom
issue-123-canonical-wir
Aug 29, 2026
Merged

feat(wir): validate canonical interop contracts#127
Teakowa merged 2 commits into
mainfrom
issue-123-canonical-wir

Conversation

@e54-bot

@e54-bot e54-bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate AssignMember targets as canonical memberAccess values, including native indexed member forms
  • add canonical-WIR coverage for indexed variable operations and nested Break/Continue/Skip/Skip If
  • document the Workshop-owned contract and return dictionary/switch lowering gaps to opy-rs

Issue

Fixes #123

Verification

  • cargo fmt --all --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace --all-targets
  • cargo run -p workshop-rs --bin workshop-catalog-gen -- check
  • git diff --check

All local gates passed. Hosted checks are not claimed until GitHub reports their final status.

Boundary

No OPY-specific WIR nodes or semantics were added. The dictionary literal and nested/multiple switch-shape lowering decisions remain owned by opy-rs; native Workshop indexed/member and control-flow primitives are now directly validated in workshop-rs.

@Teakowa Teakowa 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.

crates/workshop-rs/src/validate.rs:is_member_assignment_target: the new valueInArray(memberAccess(...), index) branch accepts a target shape that AssignMember does not emit as a native member lvalue. AssignMember serializes the target through generic value emission, while parsed receiver.member[index] is already the 3-arg memberAccess shape covered by this PR. Restrict the accepted target to canonical memberAccess shapes, or add explicit valid native-lvalue emission plus round-trip evidence for the valueInArray form if it is intentionally part of the contract.

@Teakowa
Teakowa merged commit 7a5b18f into main Aug 29, 2026
4 checks passed
@Teakowa
Teakowa deleted the issue-123-canonical-wir branch August 29, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate canonical Workshop WIR contracts required by remaining OPY interoperability gaps

2 participants