Repository navigation
test: non-regression for constants in @def expressions; ADNLPModels 0.8.15 (#481) - #1062
Merged
Merged
Conversation
….8.15 (#481) test/suite/problems/test_constant_components.jl: a constant in a boundary constraint that involves the variable (x(0) - [-1, v], [-one(v), v]) and a constant component of the dynamics ([x₂(t), u(t), 0] and 1.0) solve with :adnlp (and :exa for the dynamics), with the objective of the workaround that always worked (-1 + 0v, 0 * u(t)); the constant component integrates as such. The bug lives at the boundary @def x ADNLPModels x solve, so the test is here, not upstream. The compat floor of ADNLPModels moves to 0.8.15, the first release with the fix (0.8.13 and 0.8.14 still had it for the dynamics). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ocots
marked this pull request as ready for review
November 14, 2026 18:43
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.
Written by Claude (Claude Code) at the request of ocots.
Closes #481. Tracked in #1052 (row of #968). Stacked on #1061 (base
982-org-templates). Conventions: ct-conventions v0.13.0 (TST), ct-agents v0.5.0.Why
#481 is fixed upstream (ADNLPModels 0.8.14 for a constant in a boundary constraint, 0.8.15 for a constant component of the dynamics), and #971 updated the docs, but nothing in
test/guarded it: only the probedocs/probes/abstract_syntax_constants_ad.jl, which CI does not run. The bug lives at the boundary@def× ADNLPModels ×solve, which no single package owns, so the regression test belongs here (as planned in the comment of 2026-10-11 on #968, "How each fix is validated").What
test/suite/problems/test_constant_components.jl, every case compared with the same problem written with the workaround that always worked:x(0) - [-1, v] == [0, 0]andx(0) - [-one(v), v] == [0, 0]vs[-1 + 0v, v], with:adnlp: same objective (rtol = 1e-6) and same variable;ẋ(t) == [x₂(t), u(t), 0]and[…, 1.0]vs[…, 0 * u(t)], with:adnlpand:exa: same objective,≈ 6(double integrator);x₃(1)is2and3, the constant integrated as such.[compat]: ADNLPModels0.8→0.8.15inProject.tomlanddocs/Project.toml, the first release with both fixes;0.8still allowed 0.8.13 and 0.8.14.Checked locally
test/suite/problems/test_constant_components.jlandtest/suite/meta: 31/31 passed (ADNLPModels 0.8.15 resolved).Pkg.resolve()with the new compat: OK.🤖 Generated with Claude Code