Fix CI runner crashes: cycle detection, SymbolicUtils ≥ 4.27 floor, macOS arm64#105
Merged
ChrisRackauckas merged 3 commits intoMay 6, 2026
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
==========================================
+ Coverage 13.91% 20.98% +7.07%
==========================================
Files 22 22
Lines 4291 4293 +2
==========================================
+ Hits 597 901 +304
+ Misses 3694 3392 -302 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4846bac to
1c466de
Compare
`macos-latest` is now Apple Silicon, so `setup-julia@v3` errors out on `arch: x64` before the test step. Let `setup-julia` auto-pick per OS. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
`apply_rule`'s `result === problem` short-circuit only catches single-step identity loops. Multi-rule cycles (e.g. one rule rewrites `∫(2+x)/(x+x²)dx` to `∫(2+x)/((1+x)·x)dx` and a second rewrites it back) make `repeated_prewalk` recurse forever and eventually overflow the stack deep enough to fault Julia's type inference, killing the test process via SIGABRT before any try/catch can recover. Thread a `visited::Set` through the linear rewrite chain; if we re-visit an integral on the same chain, return it unevaluated so the caller can classify it as `[ fail ]` and the run continues. Sibling subtrees in the post-rewrite tree are independent sub-problems, so they start with a fresh `visited`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
v4.27 is the first release containing the `poly_to_gcd_form` concrete- eltype fix (JuliaSymbolics/SymbolicUtils.jl#906). Without it, `simplify(diff; expand=true)` inside the difficult-test verifier throws `MethodError(MP.Term{T,M} where T, …)` on several Apostol rationals, e.g. `(2-x+2x²-x³+x⁴)/((-1+x)·(2+x²)²)` and `1/(-1+x²)²`. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
86cabed to
3a7118f
Compare
3a7118f to
de8404a
Compare
de8404a to
b754cb9
Compare
5 tasks
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.
Fixes the things that prevent the difficult-test job from producing a meaningful per-integral signal. Does not touch the test gate —
count(x -> x != 0, …) == 0stays as the strict bar, so CI will still red-fail on integrals the engine doesn't yet solve. Those are genuine engine work items to address separately; this PR just stops the runner from aborting before they can be observed.What's in scope
1.
ci: drop hard-coded x64 arch so macOS arm64 runners workGitHub's
macos-latestis now Apple Silicon, sosetup-julia@v3errored out onarch: x64before the test step ever ran. Drop thearchmatrix axis and letsetup-juliaauto-detect per OS.2.
fix(rule_based): break multi-rule rewrite cycles in repeated_prewalkSome Apostol rationals (e.g.
(2+x)/(x+x²),1/(x·(1+x²)²)) sent the rule-based engine into a 2-step rewrite cycle: rule A rewrites∫fto∫g, rule B rewrites∫gback to∫f.apply_rule's existingresult === problemguard only catches single-step identity loops, sorepeated_prewalkrecursed forever and eventually overflowed the stack deep enough to fault Julia's type inference ofRuleRewriteErroritself —signal (6.-6): Aborted, no recovery possible from any user-leveltry/catch. Thread avisited::Setthrough the linear rewrite chain; on a re-visit, return the integral unevaluated (which the suite then classifies as a normal[ fail ]). Sibling subtrees start with a fresh set.3.
build: require SymbolicUtils ≥ 4.27v4.27 is the first release containing the
poly_to_gcd_formconcrete-eltype fix (JuliaSymbolics/SymbolicUtils.jl#906). Without it,simplify(diff; expand=true)inside the difficult-test verifier throwsMethodError(MP.Term{T,M} where T, …)on several Apostol rationals (e.g.(2-x+2x²-x³+x⁴)/((-1+x)·(2+x²)²),1/(-1+x²)²), masking the underlying integration result with a verifier crash.What's not in scope
count(x -> x != 0, …) == 0is preserved as-is.So CI on this PR is expected to be red until the engine learns to solve the remaining Apostol cases — and that red is informative now, not a SIGABRT.
Local validation (Julia 1.10.11, ubuntu, this branch)
With all three fixes in:
Compared to
mainagainst the same SymbolicUtils v4.27.0: SIGABRT partway through Apostol when the cycle bug overflows the stack. So 'completes the suite + 122/354 fails' is strictly more informative than the current 'aborts mid-suite with no scoreboard'.Test plan
[except]events). The strict bar still fails on the unsolved integrals — that's the intended state.(2+x)/(x+x²),1/(x·(1+x²)²)) terminate cleanly instead of hanging/SIGABRTing.Draft PR — please ignore until reviewed by @ChrisRackauckas.