feat(conformance): python emit-compile-run #1039#1099
Conversation
Adds 5 Python fixtures (hello_world, recursive factorial, arithmetic, control flow, transported concept citation comment) under implementations/python/conformance/fixtures, plus a CI slow lane that runs real LiftKit → BindKit → LowerKit, invokes py_compile then python3, and asserts behavior equivalence to the original source. Refusal paths verified: target-compile-failure and target-behavior-divergence both emit CompositionRefusalMemento with the expected failure_kind. Extended Python lift/realize support for leaf-only returns, `pass` as concept:skip, ternary conditionals, and call callee slots — surfaced naturally by the fixtures. 43 python realize tests pass, 39 python lift tests pass, 2 cargo slow-lane conformance tests pass. Pre-existing bug-zoo TypeScript red on local default lane is sandbox-environmental (tsx unavailable), task #70 not introduced by this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
WalkthroughThis PR extends the Python lift and realize subsystems to support pass statements, ternary expressions, and explicit call handling, introduces five conformance fixtures demonstrating basic language constructs, and adds comprehensive Python and Rust test suites validating the lift→emit→compile→run pipeline end-to-end via fixture-driven expected outputs. ChangesPython Conformance Testing
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…emanticTag ruling Adds the 2026-05-17 post-#1039 + post-PlatformSemanticTag-ruling snapshot. Per-kit emit-compile-run conformance shipped across Python (PR #1099), Java (PR #1100), and C (PR #1101). PlatformSemanticTag schema ruling locked at docs/plans/2026-05-16-platform-semantic-tag-schema-ruling.md. Stream A Stages 2-5 implementation work surface enumerated and unblocked for dispatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 519cd52c24
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if isinstance(node, ast.Pass): | ||
| return _operator_shape_result("concept:skip", []) |
There was a problem hiding this comment.
Preserve leaf return after pass statements
Treating ast.Pass as concept:skip here changes control-flow shaping for blocks like def f(x): pass; return x: _shape_block_with_bindings keeps operator-shaped statements and drops later leaf-only returns when any operator is present, so this function now lifts as just skip and realizes to an implicit None return instead of returning x. This is a behavioral regression introduced by making pass an operator without also preserving a trailing leaf return in mixed blocks.
Useful? React with 👍 / 👎.
Closes the Python side of #1039. 5 fixtures (hello_world, recursive factorial, arithmetic, control flow, transported concept citation comment). CI slow lane runs LiftKit → BindKit → LowerKit → py_compile → python3 + behavior assertion. Refusal paths for target-compile-failure + target-behavior-divergence both verified.
43 python realize tests pass, 39 python lift tests pass, 2 cargo slow-lane conformance tests pass.
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Tests
New Features