Add DASSL-style ires backtracking with physical rejection retries (idid = -4)#53
Draft
Copilot wants to merge 2 commits into
Draft
Add DASSL-style ires backtracking with physical rejection retries (idid = -4)#53Copilot wants to merge 2 commits into
ires backtracking with physical rejection retries (idid = -4)#53Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/0c392331-c325-4a42-940e-98728335aca2 Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Agent-Logs-Url: https://github.com/ivan-pi/stiff3/sessions/0c392331-c325-4a42-940e-98728335aca2 Co-authored-by: ivan-pi <21085643+ivan-pi@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
ivan-pi
May 12, 2026 20:29
View session
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.
This change introduces DASSL-like callback semantics so
funcan reject physically inadmissible trial steps without hard-stopping integration.ires = -1now triggers step rollback + halving retry, whileires < -1remains an interrupt path (idid = -2).Solver contract and status model
rhs_subcallback contract in code/docs:ires = 0→ normalires = -1→ reject trial step and retry with smaller stepires < -1→ interrupt integrationidid = -4for rejection-limit termination (too many physical rejections).Core integration flow (
stiff3_core)nphys) and retry loop.ires = -1, solver now restores pre-attempt state (y,f,df), halvesh, resetsicon, increments rejection stats, and retries.nphys > 10, solver exits withidid = -4using restored safe state.Stage solver propagation (
sirk3)ires-aware (ires=0before call).iresso caller (stiff3_core) applies-1retry vs<-1interrupt semantics.Tests
ires=-1had been used as a hard interrupt signal (now uses<-1for interrupt).ode_phys_rejectcoverage for:ires=-1rejections (idid=0)ires=-1(idid=-4)Documentation
iresbehavior andidid=-4.