fix(HF-135): enforce array dimensions and spill boundaries - #1774
Tobiadefami wants to merge 1 commit into
Conversation
|
@Tobiadefami thanks for the pull request. No CLA step needed here — our records show you signed the Contributor License Agreement on 2026-07-31. That signature came from our previous signing form and has been carried over, so there is nothing for you to re-sign. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7820d3c. Configure here.
Guard predicted array dimensions before mapping cells and check actual dimensions before VSTACK, HSTACK, TRANSPOSE and inline-array concatenation allocate oversized results. Return #VALUE! when maxRows or maxColumns is exceeded, including for intermediate arrays. Reuse the existing SEQUENCE dimension guards and preserve whole-row/column reference behavior. Also return #SPILL! when valid result dimensions extend beyond the sheet edge from the formula's position. With maxRows set to 4, SEQUENCE(4) in A2 needs A2:A5 and now returns #SPILL!; the same formula still fits at A1. Document both boundary checks.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | ea75425 | Commit Preview URL Branch Preview URL |
Sep 15 2026, 06:02 PM |
7820d3c to
ea75425
Compare
Performance comparison of head (ea75425) vs base (c920375) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1774 +/- ##
===========================================
+ Coverage 97.32% 97.34% +0.01%
===========================================
Files 195 195
Lines 15739 15758 +19
Branches 3390 3470 +80
===========================================
+ Hits 15318 15339 +21
+ Misses 421 411 -10
- Partials 0 8 +8
🚀 New features to boost your workflow:
|

Guard predicted array dimensions before mapping cells and check actual dimensions before VSTACK, HSTACK, TRANSPOSE and inline-array concatenation allocate oversized results. Return #VALUE! when maxRows or maxColumns is exceeded, including for intermediate arrays. Reuse the existing SEQUENCE dimension guards and preserve whole-row/column reference behavior.
Also return #SPILL! when valid result dimensions extend beyond the sheet edge from the formula's position. With maxRows set to 4, SEQUENCE(4) in A2 needs A2:A5 and now returns #SPILL!; the same formula still fits at A1.
Document both boundary checks.
Context
How did you test your changes?
Types of changes
Related issues:
Checklist:
Note
Medium Risk
Touches core array sizing, dependency-graph spill logic, and formula evaluation paths; behavior changes for oversized or edge-spilling formulas may affect existing sheets that previously allowed invalid arrays.
Overview
Enforces
maxRowsandmaxColumnsfor array results end-to-end: predicted spill sizes are capped inArraySizePredictor, runtime allocation is guarded forVSTACK,HSTACK,TRANSPOSE,SEQUENCE, and inline{…}literals, all returning#VALUE!(Value too large.) when a dimension exceeds config—including intermediate arrays (e.g. oversizedVSTACKinsideSUMcannot be hidden behind a scalar wrapper).When dimensions are valid but the spill rectangle would extend past the sheet from the formula cell,
DependencyGraph.isThereSpaceForArraynow treats over-limit ranges like insufficient space, yielding#SPILL!(No space for array result.). Whole-row/column references still use infinite dimensions at predict time.Documentation and CHANGELOG describe the two checks (config limits vs. placement).
Reviewed by Cursor Bugbot for commit ea75425. Bugbot is set up for automated code reviews on this repo. Configure here.