Skip to content

test: non-regression for constants in @def expressions; ADNLPModels 0.8.15 (#481) - #1062

Merged
ocots merged 1 commit into
mainfrom
481-constant-regression
Nov 14, 2026
Merged

ocots merged 1 commit into
mainfrom
481-constant-regression

Conversation

@ocots

@ocots ocots commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

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 probe docs/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:
    • boundary constraint with the variable: x(0) - [-1, v] == [0, 0] and x(0) - [-one(v), v] == [0, 0] vs [-1 + 0v, v], with :adnlp: same objective (rtol = 1e-6) and same variable;
    • constant component of the dynamics: ẋ(t) == [x₂(t), u(t), 0] and […, 1.0] vs […, 0 * u(t)], with :adnlp and :exa: same objective, ≈ 6 (double integrator); x₃(1) is 2 and 3, the constant integrated as such.
  • [compat]: ADNLPModels 0.8 → 0.8.15 in Project.toml and docs/Project.toml, the first release with both fixes; 0.8 still allowed 0.8.13 and 0.8.14.
  • CHANGELOG under 📦 Dependencies.

Checked locally

test/suite/problems/test_constant_components.jl and test/suite/meta: 31/31 passed (ADNLPModels 0.8.15 resolved). Pkg.resolve() with the new compat: OK.

🤖 Generated with Claude Code

….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 ocots added the ci on main: changes only Before merging: on main, rerun only the jobs the merged files can affect (never on a release PR) label Nov 14, 2026
Base automatically changed from 982-org-templates to main November 14, 2026 18:43
@ocots
ocots marked this pull request as ready for review November 14, 2026 18:43
@ocots
ocots merged commit 9ce0ab4 into main Nov 14, 2026
12 checks passed
@ocots
ocots deleted the 481-constant-regression branch November 14, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci on main: changes only Before merging: on main, rerun only the jobs the merged files can affect (never on a release PR)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Reverse over forward AD issues with ADNLP

1 participant