test: add known-issue predicates for #4278 and #4280 to property tests - #4281
Open
TaiSakuma wants to merge 1 commit into
Open
test: add known-issue predicates for #4278 and #4280 to property tests#4281TaiSakuma wants to merge 1 commit into
TaiSakuma wants to merge 1 commit into
Conversation
to property tests The 2026-07-31 nightly failed ak.flatten(axis=None) on union[timedelta64[as], timedelta64[m]]: NumPy rejects a unit-conversion factor of 2**56 or more, so temporal leaves of one family whose units span such a factor cannot merge (scikit-hep#4278). Verifying that predicate surfaced a second, value-decided case: a value outside the finest unit's int64 range overflows at the cast even when the factor is in bounds (scikit-hep#4280). has_issue_4278 judges the unit span from the form; has_issue_4280 scans the stored values. One sentence in has_issue_4261's docstring is corrected: probing disproved its claim that np.result_type fails on extreme unit pairs that merge. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4281 |
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.
The Property Tests nightly run of 2026-07-31 (log) failed on
tests/properties/operations/test_flatten.py::test_properties:ak.flatten(axis=None)on1 * union[timedelta64[as], timedelta64[m]]raisesOverflowError: Integer overflow getting a common metadata divisor for NumPy datetime metadata [as] and [m].Two issues came out of the finding, and each gets its own predicate. #4278 is decided by the units at the form level: NumPy rejects a conversion factor between two temporal units once the factor reaches
2**56, so leaves of one family whose units span such a factor cannot promote. #4280 is decided by the stored values and cannot be told from the form: with the factor in bounds, a value outside the finest unit's int64 range overflows at the cast (found while verifying the #4278 predicate). Both are distinct from the cross-family merge failures of #4261, whosehas_issue_4261trigger deliberately models families, not units.Changes, in
tests/properties/operations/:known_issues.py: new predicatehas_issue_4278— a record or union whose temporal leaves of one family span an overflowing conversion factor. The helper_overflowing_unit_spancomputes the exact factor between the extreme base units present from an attosecond table against NumPy's bound of2**56; datetime calendar units count at their average lengths (2629746 s per month, 31556952 s per year), timedelta calendar units do not convert and stay withhas_issue_4261's family grouping, and a unit multiplier (as indatetime64[10s]) is ignored, as NumPy's factor check ignores it.known_issues.py: new predicatehas_issue_4280— a record or union with a temporal value of magnitude above(2**63 - 1) // f,fbeing the factor to the family's finest unit present.NaTis exempt, datetime calendar units are excluded (their value conversion wraps silently instead of raising), and the check reads every value in each temporal leaf's buffer, an over-match.known_issues.py: one correction inhas_issue_4261's docstring — itsnp.result_typeparenthetical claimed extreme unit pairs merge, whichak.ravelraisesOverflowErrorwhen temporal leaves need an overflowing unit conversion #4278's probing disproved; the corrected text names the actual divergence (np.result_typepromotes datetimes with timedeltas, which the merge rejects withTypeError) and points unit-span failures tohas_issue_4278.test_flatten.py: both predicates join theaxis=Noneclause of_would_raise_from_known_issue.test_all.pyneeds no wiring: its_reduciblerefuses every union, so the affected draws never reachak.all.Verification:
has_issue_4278against the exact-factor prediction (55 linear timedelta pairs and 78 datetime pairs including the calendar units, on union and record layouts in both orders), 312 compare the three predicates' disjunction against the observed outcome (skip exactly whenak.flatten(axis=None)raises, for all 78 pairs of the 13 units per kind on unions in both orders), 26 coverhas_issue_4280's value boundaries ((2**63 - 1) // fand one past it for two unit pairs, negative symmetry,NaT, same-unit, record and nested layouts, calendar wraparound), and 23 cover the falsifying layouts and structural variants.@reproduce_failure, hypothesis 6.164.0 as in the CI run) reproduces theOverflowErroron the unmodified tests and raisesDidNotReproducewithhas_issue_4278wired in; the locally found value-overflow example replays as filtered byhas_issue_4280the same way.tests/properties/operationspasses at the default profile. A nightly-profile run (10,000 examples) then surfaced a further, unrelated defect — a regular list of plain leaves under a union breaks the interleaving broadcast (the machinery ofak.broadcast_arraysfails for a flat array and a regular list of variable-length lists #4262, whose trigger matches only variable-length-list content) — deferred to a follow-up; its stored example keeps a local replay failing until then.Issues #4278 and #4280 stay open; each predicate is deleted in the pull request that fixes its issue.
🤖 Generated with Claude Code