HF-131 (5/7): no error reports a cell that did not produce it - #1765
HF-131 (5/7): no error reports a cell that did not produce it#1765marcin-kordas-hoc wants to merge 3 commits into
Conversation
An error read out of a neighbouring cell is not produced by the cell that read it. This closes the remaining rootless-origin cases the choke-point redesign's propagated-skip needed but did not itself provide identities for: - A parsing error is attributed to 'parser' (ParsingErrorVertex.getCellValue). - An error value typed directly into a cell is attributed to 'user input' (CellContentParser's CellContent.Error constructor). - An error literal written into a formula (e.g. =#VALUE!+1) is attributed to 'literal' (FormulaParser's ErrorLiteral alternative). - A #SPILL! error reports the cell that failed to spill, not no address at all: setNoSpace() attaches itself as root, since it already has 'this' in hand. getScalarValue's range-to-scalar coercion class was measured, not assumed: the requesting cell is genuinely the one that made the invalid request, so 'no address' there is honest, not a bug, and is left unchanged. known-limitations.md gains one bullet: the six buildErrorWithRawInputAst sites in FormulaParser.ts (malformed references) stay unattributed rather than mislabeled, pending a future task. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Task linked: HF-131 Verbose and actionable formula error messages |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
hyperformula-docs | 46dbeef | Commit Preview URL Branch Preview URL |
Sep 11 2026, 05:35 AM |
Performance comparison of head (46dbeef) vs base (c50d0c7) |
|
Ran a closed-loop comparison of this stack's origin/address behavior against real Excel via One thing surfaced that isn't a bug, but is worth a product call: the CRUD-produced Should a CRUD-removed reference get an |
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 1b996d3. Configure here.
|
|
||
| ### Fixed | ||
|
|
||
| - A parsing error, an error value typed directly into a cell, and an error literal written into a formula are now attributed to `parser`, `user input`, or `literal` respectively, instead of being silently unattributed or (for a parsing error) reporting no address at all. `#SPILL!` errors now report the cell that failed to spill instead of no address. [#131](https://github.com/handsontable/hyperformula/issues/131) |
There was a problem hiding this comment.
Changelog uses issue not PR
Low Severity
The new Unreleased Fixed bullet ends with an issues link for #131 instead of a pull request link of the form [#NNNN](https://github.com/handsontable/hyperformula/pull/NNNN). An issue-only reference is not a substitute for the required PR link.
Triggered by learned rule: CHANGELOG bullets need a PR link
Reviewed by Cursor Bugbot for commit 1b996d3. Configure here.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/hf-131-origin-function #1765 +/- ##
==============================================================
Coverage ? 97.38%
==============================================================
Files ? 195
Lines ? 15828
Branches ? 3491
==============================================================
Hits ? 15414
Misses ? 406
Partials ? 8
🚀 New features to boost your workflow:
|


What and why
Stacked on #1764. Closes the remaining cases where an error could report a cell that did not
produce it — the general case (propagation through a function/operator) is already covered by
#1764's choke points; this handles the rest:
originFunction: 'parser'(ParsingErrorVertex.getCellValue).#REF!, no leading=) reportsoriginFunction: 'user input'.=#REF!) reportsoriginFunction: 'literal'.#SPILL!errors now report the address of the cell that failed to spill, instead of no addressat all —
setNoSpace()now attaches the vertex as root, the same way every other formula resultdoes.
Known, documented limit: the six reference-checking branches in the formula parser that build
a
#REF!/#NAME?error for a malformed reference (e.g. a range spanning more than one sheet)still report no
originFunction— left unattributed rather than mislabeled as a function that onlyread the value. Noted in
docs/guide/known-limitations.md.Verified
npx tsc --noEmit— cleannpx eslint src/— 0 errorspre-existing branch-pinning mismatch as the rest of this stack
reading another cell's error reports that cell's address, not its own reading cell's, through
chains up to 3 hops and across sheets; a parsing error's address is preserved through a reader;
a
#SPILL!fixture now reports the failing cell's address where it previously reported noneStack
5 of 7 — stacked on #1764. Next:
fix/hf-131-issue-444-addresses.🤖 Generated with Claude Code
Note
Low Risk
Targeted metadata on error objects and one SPILL constructor change; no evaluation or public API breakage beyond richer
DetailedCellErrorfields.Overview
Completes HF-131 attribution for errors that are not produced by normal function/operator evaluation: parsing failures, user-typed error values, in-formula error literals, and
#SPILL!when an array cannot spill.Parsing errors from
ParsingErrorVertexnow setoriginFunctiontoparser. Literal error values entered in a cell (no leading=) getuser inputviaCellContentParser. Error literals inside formulas (e.g.=#REF!) getliteralinFormulaParser.#SPILL!fromsetNoSpace()now passes the array formula vertex asCellErrorroot so the failing cell address is reported instead of none.Docs add a known limitation: six parser branches that build
#REF!/#NAME?for malformed references still leaveoriginFunctionunset. CHANGELOG consolidates these fixes under HF-131.Reviewed by Cursor Bugbot for commit 46dbeef. Bugbot is set up for automated code reviews on this repo. Configure here.