You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The wrapped Batch regression test checked isinstance(result, StreamProtocol) before installing its row-build guard. CPython 3.11 uses hasattr for runtime protocol checks, so this assertion evaluates arrow_types_declared, and zero-row schema inference materializes the lazy input. CPython 3.12 and 3.13 use static lookup and leave the input cold. The test now constructs the Batch under the guard and omits the redundant protocol assertion. Python typing documentation
Both combined hash accessors correctly refuse to materialize a cold wrapper on all three versions. No digest differed across Python 3.11, 3.12, and 3.13 for inputs in the same state. I compared the pipeline, node, legacy content, and chain content hashes for a source, a wrapped source, a direct Batch, a Join, and a Batch over both cold and warm wrappers. The original test accidentally exercised the warm case on 3.11, where the two combined digests match the warm results on 3.12 and 3.13.
PR #652 at 250a8db2 reproduced the original failure on 3.11. This patch applies cleanly and the test passes on that head.
This is a test-only correction. No changelog fragment is needed. The changelog validator and its tests allow this.
Verification
Targeted identity and changelog tests on Python 3.11, 3.12, and 3.13
Golden hash --check on all three versions
Ruff lint and format checks and basedpyright
Summary by CodeRabbit
Tests
Updated a test to avoid triggering lazy row materialization while checking wrapped batch identity.
No actionable comments were generated in the recent review.
Walkthrough
The test now constructs Batch(2)(wrapped) while _rows_to_table is patched to fail. It removes the StreamProtocol assertion and notes that runtime protocol checks may materialize rows on Python 3.11.
Changes: Lazy batch test
Layer / File(s)
Summary
Batch construction check tests/test_hashing/test_identity_chains.py
The test constructs the batch inside the _rows_to_table failure guard. It removes the StreamProtocol assertion and adds a comment about possible row materialization during Python 3.11 runtime protocol checks.
metamorphic-labs/orcapod-python#633: This PR added the identity-chain test file and the hash accessors whose non-materialization behavior this test checks.
Merge Risk: Minimal · up to c739a
This test-only change keeps the lazy Batch identity test from materializing its input on Python 3.11. It does not change production behavior, and no merge-blocking risk is identified.
Security architecture risk: Minimal · up to c739a
The patch corrects how a test keeps its input lazy. It does not change production behavior or exposure.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "test(hashing): keep wrapped Batch input cold on Python 3.11" matches the change. The PR modifies the hashing regression test so the wrapped Batch stays unmaterialized on Python 3.11 by cons…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "test(hashing): keep wrapped Batch input cold on Python 3.11" matches the change. The PR modifies the hashing regression test so the wrapped Batch stays unmaterialized on Python 3.11 by constructing the Batch while _rows_to_table is patched to fail, and removes the StreamProtocol assertion that triggered materialization. The title is specific, concise, and conveys the primary change.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Reviewing files that changed from the base of the PR and between 08c048a and c739a4e.
Files selected for processing: 1
tests/test_hashing/test_identity_chains.py
Limit details: You’ve used the included review currently available. Your 99 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
Recent review details
Context from checks skipped due to timeout: 1
GitHub Check: CodeRabbit
Additional context used
Code guidelines: 1
CLAUDE.md — auto-discovered
Path-based instructions: 1
Source excerpt: Use [Google style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) Python docstrings everywhere.
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
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.
ITL-1559
The wrapped Batch regression test checked
isinstance(result, StreamProtocol)before installing its row-build guard. CPython 3.11 useshasattrfor runtime protocol checks, so this assertion evaluatesarrow_types_declared, and zero-row schema inference materializes the lazy input. CPython 3.12 and 3.13 use static lookup and leave the input cold. The test now constructs the Batch under the guard and omits the redundant protocol assertion. Python typing documentationBoth combined hash accessors correctly refuse to materialize a cold wrapper on all three versions. No digest differed across Python 3.11, 3.12, and 3.13 for inputs in the same state. I compared the pipeline, node, legacy content, and chain content hashes for a source, a wrapped source, a direct Batch, a Join, and a Batch over both cold and warm wrappers. The original test accidentally exercised the warm case on 3.11, where the two combined digests match the warm results on 3.12 and 3.13.
PR #652 at
250a8db2reproduced the original failure on 3.11. This patch applies cleanly and the test passes on that head.This is a test-only correction. No changelog fragment is needed. The changelog validator and its tests allow this.
Verification
--checkon all three versionsSummary by CodeRabbit