Repository navigation
fix: expand in eq so RuleBased matches Apostol (4x⁵−1)/(x⁵+x+1)² (#107) - #149
Draft
ChrisRackauckas-Claude wants to merge 5 commits into
Draft
ChrisRackauckas-Claude wants to merge 5 commits into
ChrisRackauckas-Claude wants to merge 5 commits into
Conversation
Plain simplify left x*(1+5x^4) factored, so rule 1_1_1_7_7 never matched the Apostol integrand in issue JuliaSymbolics#107. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/ib-su/SymbolicIntegration.jl/jobs/107-cursor/log.txt on amdci2.julia.csail.mit.edu
…ymbolics#107) Update the difficult baseline entry and add an eq/integrate regression in test_rule2.jl. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/ib-su/SymbolicIntegration.jl/jobs/107-cursor/log.txt on amdci2.julia.csail.mit.edu
…is fixed Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/ib-su/SymbolicIntegration.jl/jobs/107-cursor/log.txt on amdci2.julia.csail.mit.edu
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
==========================================
- Coverage 50.98% 50.75% -0.24%
==========================================
Files 23 23
Lines 4309 4262 -47
==========================================
- Hits 2197 2163 -34
+ Misses 2112 2099 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Try plain simplify first; expand only when needed. Treat Int gcd overflow from expand as not-equal so Hebisch #2 stays unevaluated instead of throwing. Also avoids worst-case expand cost. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/ib-su/SymbolicIntegration.jl/jobs/107-cursor/log.txt on amdci2.julia.csail.mit.edu
Also drop retrospective JuliaSymbolics#107 wording from baseline comments and clarify the 1_1_1_7_7 conjunct regression test. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.10.01-14929f9 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/agent-jobs/ib-su/SymbolicIntegration.jl/jobs/107-cursor/log.txt on amdci2.julia.csail.mit.edu
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.
Summary
Rule
1_1_1_7_7failed to match∫(4x⁵−1)/(x⁵+x+1)² dxbecause the shared predicateeqcompared withsimplify(a-b)only. The full rule conjunct (not the smallereq(x*(1+5x⁴), x+5x⁵), which already succeeded on main) stayed non-zero without expansion, so the engine returned the integrand unevaluated.eqnow tries plain simplify first, thensimplify(a-b; expand=true)only when needed, and treatsDivideError/OverflowErrorfrom the expand path as “not equal” so callers do not throw. The rule then fires and yields−x/(1+x+x⁵). Triage diagnosis confirmed; independent review’s blocking Hebisch #2 regression is guarded.Verification
typosclean on touched files. Difficult gate: no RuleBased regressions. Independent review corpus (~2,700 integrals): 4 better, none worse on solved/unsolved; Hebisch #2 exception fixed by the guard.What was NOT verified
pre/1.13 CI lane for baseline entry 142.Reviewer pushback
(0,0)alone records the outcome.Closes #107
Please ignore this draft until reviewed by @ChrisRackauckas.
Harness: Cursor Agent CLI 2026.10.01-14929f9; model: auto; transcript: /home/crackauc/sandbox/agent-jobs/ib-su/SymbolicIntegration.jl/jobs/107-cursor/log.txt on amdci2.julia.csail.mit.edu
Risk assessment
eqis used widely across RuleBased rule predicates (not a public API change). Expand is now conditional and exception-guarded; Hebisch Fix complex root integration - restore arctangent terms #2 no longer throws. Downstream packages could notice newly solved forms ([RuleBased] regression on (4x⁵ − 1)/(x⁵+x+1)² since PR #53 #107, Rubi 1.2.2.2 side effects from review).Pkg.test()passed (227 pass, 1 broken); independent review corpus comparisonOrchestrated and reviewed from Claude Code (model: claude-opus-5-5[1m]), issue-backlog lane ib-su: https://claude.ai/code/session_012Dbjay5j3orvRFDeF3gebh
Risk assessment
RuleBasedMethodintegration results.eqis an internal predicate. It is not exported; the only exports areAbstractIntegrationMethod,RischMethod,RuleBasedMethod,integrateandreload_rules. But many rule conditions call it, so rules that failed to match before can now match. Downstream users could see newly solved integrals or a different but equivalent antiderivative where an expand-backedeqnow returnstrue. Integrals whose expanded simplify throwsDivideError/OverflowErrornow count as "not equal" and come back unevaluated instead of throwing. Therethrow()keeps every other exception type visible. Nothing in the public API changes, so this is not a SemVer-major change; it is a behavior improvement. Eacheqcall that fails the plain check now runs a secondsimplify(...; expand=true), which is a possible cost on the rule-matching hot path. CI timings on the difficult lanes look in line with main, but nobody benchmarked this directly.94c4831, the wholeCIworkflow passes: the 27 easy/difficult/qa jobs across Julia 1.10, 1, and pre on ubuntu, macOS and Windows. Spell Check and Documentationbuildalso pass. Two checks fail, both in theSymbolicIntegrationMaximasublibrary workflow:Julia 1 - qa - ubuntu-latestandJulia 1.10 - qa - ubuntu-latest. Both fail withempty intersection between SymbolicIntegrationMaxima@0.3.0 and project compatibility 0.2. That workflow fails the same way, in the same two jobs, on main's tip4e27faa(run 36311276372), and it has been red since278475d(Release SymbolicIntegrationMaxima v0.3.0). The failures are pre-existing, and the PR touches none of those files, so they are not a regression. The difficult runner prints no "regressions vs baseline" line on any lane. The "improvements" lines on head ([6], [129], [132], [133] RB; [3], [26], [27], [49], [55] Risch) match main's 1.10 ubuntu run exactly. Entry 142 goes from RB=2 to RB=0, which tightens the baseline and still passes on every lane, includingpre. No tests were weakened. Two testsets were added, both inside theeasygroup: one for [RuleBased] regression on (4x⁵ − 1)/(x⁵+x+1)² since PR #53 #107 (eqon the full conjunct, plus the integral solving and verifying) and a no-throw test for Hebisch Fix complex root integration - restore arctangent terms #2. The no-throw test uses try/catch with athrewflag and then asserts!threw, which is an actual assertion, not a swallowed error. Non-public internals: none new.SymbolicUtils.unwrap_constwas already in use, andsimplify(...; expand=true)is SymbolicUtils' public, documented keyword. Not disclosed or out of date in the description:predifficult lanes pass.test/rundifficulttests.jl("zero Risch regressions once the RuleBased baseline matches current engine behaviour") garbles the bisect note.difficult_baseline.jlstill has a slightly retrospective line ("0 regressions once entry 142 is at (0, 0)").simplify_divis a catch-and-return-false; the overflow itself is left unfixed and nothing has been filed upstream.rundifficulttests.jl.simplify_divoverflow upstream.🤖 Risk assessment posted by an AI agent (fleet master) — harness: Devin CLI (Mac) / fusion-claude-opus-5-5-high-sidekick-swe-2-medium; dispatched by Devin CLI 3000.11.3 (Mac) fleet-master caretaker, model Fusion (claude-opus-5-5 medium + swe-2 medium)
Conversation: local transcript ~/.local/share/devin/cli/transcripts/speckle-whale.json (Chris's Mac)