Repository navigation
Test native IR invariants and harden append-fold helper contract - #9370
Merged
youknowone merged 1 commit intoOct 26, 2026
Merged
Conversation
Retain direct IR coverage for constant-pool representations, malformed append-sequence rejection, and vacated instruction-slot metadata reuse. Reject non-unit terminal append depths at the private folding helper. Existing production callers already require depth one; this is defensive contract hardening, not a newly fixed reachable interpreter bug. Preserve the existing helper structure and all pre-existing tests. The three added native tests are unchanged from the Python 3.15 upgrade work. Validation: codegen check and strict Clippy with --tests, a --lib --no-run build, and exactly three bounded native IR tests (one pass, zero ignored each). No Python, parser, VM or lifecycle payload was executed. The symmetric SetAdd guard has no dedicated depth-two assertion. Assisted-by: OpenAI Codex:model version unavailable
Contributor
|
Caution Review failedThe pull request is closed. Finishing Touches
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 |
youknowone
approved these changes
Oct 26, 2026
youknowone
marked this pull request as ready for review
October 26, 2026 01:12
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
youknowdot
added a commit
to youknowdot/RustPython
that referenced
this pull request
Oct 26, 2026
Restore main warning matching and unused opcode override tooling. Keep the exact native IR tests and minimal helper guard from RustPython#9370 while pruning equivalent folding refactors. Remove only the newly added frozendict Rust/Python wrapper, preserving its Python suite and all runtime fixtures. Validated this exact tree with fresh codegen test-target and selected threaded VM library checks and strict Clippy. No test bodies, interpreter runtime or metadata generators executed. Assisted-by: OpenAI Codex:model version unavailable
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.
Summary
ListAppend/SetAdddepths other than one, preserving the existing helper structure.The tests construct IR directly; no Python-source behavior tests were added. The raw frozenset vector and inactive instruction-storage assertions are not observable through Python-level equality. The unchanged negative test includes
ListAppend 2; the symmetricSetAddguard has no dedicated depth-two assertion.Validation
cargo check --locked --offline -p rustpython-codegen --testscargo clippy --locked --offline -p rustpython-codegen --tests -- -D warningscargo test --locked --offline -p rustpython-codegen --lib --no-run --message-format=jsonconstant_append_sequences_fold_for_iteration_and_membership,constant_append_sequences_require_unaliased_matching_constant_elements,redundant_nop_compaction_clears_vacated_instruction_metadata— 3 passed, 0 failed, 0 ignored.Only those three native tests executed under bounded guards; no Python/parser/VM/lifecycle payload execution. Full workspace, C-API and canonical Python suites were not run for this slice.
AI-assisted; disclosed in the commit trailer.