Skip to content

Put every node through every pipeline, not only limits - #837

Merged
Rafael-SOWNet merged 1 commit into
masterfrom
crash-sweep
Aug 9, 2026
Merged

Put every node through every pipeline, not only limits#837
Rafael-SOWNet merged 1 commit into
masterfrom
crash-sweep

Conversation

@Rafael-SOWNet

Copy link
Copy Markdown
Collaborator

Follows #836. No fix in here — everything already passes. This is a floor under the next node.

Why

The limit crash of #829 was found because somebody happened to take a limit of a floor. Nothing made limits special: a node reaches a dozen pipelines, AddingNode.cs lists them, and anything missed there is missed silently — the node that breaks is exactly the one nobody wrote a test for. Seven node types crashed that way while the suite stayed green.

So this generalises LimitTerminatesOnEveryNodeTest: 45 node types enumerated by reflection, each put through

Stringize, Latexise, ToString, InnerSimplified, Evaled, Simplify, Expand, Factorize, Differentiate, Integrate, Substitute, Vars, Nodes, Complexity, Solve.

What it asserts, and what it does not

Only what every pipeline owes a caller: return, in finite time, either an answer or one of the library's own exceptions.

  • Not that the answer is right — the per-node tests are for that.
  • Not that there is one — an unevaluated node is a legitimate answer.
  • A NotSupportedException is allowed too, since some shapes document a refusal.

Non-termination fails via a 30-second timeout per pipeline. A stack overflow cannot be caught, so its signal remains the run aborting — which is how #829 announced itself.

Not vacuous

Checked against a deliberately throwing pipeline: the failure is reported with the pipeline named, which is what makes it useful when it fires:

CANARY threw System.InvalidOperationException: canary

Tests: 6049 passing, 0 failed, 14 skipped; F# 130.

The limit crash of #829 was found because somebody took a limit of a floor. Nothing
made limits special: a node reaches a dozen pipelines, AddingNode.cs lists them,
and anything missed there is missed silently, because the node that breaks is
exactly the one nobody wrote a test for. Seven node types crashed that way and the
suite stayed green.

So this generalises LimitTerminatesOnEveryNodeTest: the node types are enumerated
by reflection -- 45 of them -- and each is put through Stringize, Latexise,
ToString, InnerSimplified, Evaled, Simplify, Expand, Factorize, Differentiate,
Integrate, Substitute, Vars, Nodes, Complexity and Solve.

What is asserted is only what every pipeline owes a caller: return, in finite time,
either an answer or one of the library's own exceptions. Not that the answer is
right -- the per-node tests are for that -- and not that there is one, since an
unevaluated node is a legitimate answer.

Everything passes today, so this adds no fix. It is a floor under the next node.

Checked against a deliberately throwing pipeline to make sure it is not vacuous:
the failure is reported with the pipeline named, which is what makes it useful when
it does fire.

Tests: 6049 passing, 0 failed, 14 skipped; F# 130.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Rafael-SOWNet
Rafael-SOWNet merged commit 6c1d495 into master Aug 9, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant