Skip to content

compat + SolveStats: admit DirectTrajOpt 0.10 / NT 0.9, wire real iteration counts - #18

Merged
aarontrowbridge merged 4 commits into
mainfrom
fix/dto-0.10-compat
Aug 21, 2026
Merged

compat + SolveStats: admit DirectTrajOpt 0.10 / NT 0.9, wire real iteration counts#18
aarontrowbridge merged 4 commits into
mainfrom
fix/dto-0.10-compat

Conversation

@aarontrowbridge

@aarontrowbridge aarontrowbridge commented Aug 21, 2026

Copy link
Copy Markdown
Member

Fixes #19

Why

DTO 0.10.0 and NT 0.9.3 registered this morning; this package's DirectTrajOpt = "0.9" / NamedTrajectories = "0.8" floors made DTO's own Benchmark and Convergence CI suites unsatisfiable the moment 0.10.0 hit General (both pin this package by rev).

What

  1. Compat widening: DTO 0.9, 0.10; NT 0.8, 0.9. No benchmark-facing API changed.
  2. SolveStats wiring: DTO 0.10's solve! returns SolveStats (previously nothing). benchmark_solve! was hard-coding iterations = -1 with a 'solve! returns nothing; sentinel' comment — the solver's real counts were being discarded. Now: iterations from stats.iterations, solver_status from the MOI termination status, with the old post-solve heuristic kept as the pre-0.10 fallback.

Verification

Full suite 306/306 against DTO 0.10 (developed in the test env). New assertion: iterations >= 0 (the sentinel path would fail it).

After merge

Tag v0.2.1 — DirectTrajOpt's benchmark/Project.toml and benchmark/convergence/Project.toml pin this repo by rev; I'll bump both pins to the tag on the DTO side (PR harmoniqs/DirectTrajOpt.jl#139 branch).

DTO 0.10.0 and NT 0.9.3 registered this morning; the 0.9/0.8 floors
made DTO's own benchmark/convergence CI suites unsatisfiable the moment
0.10.0 hit General. No API surface used by the benchmarks changed
(SolveStats is additive; the Δt-weighting change is DTO-internal
behaviour experienced on update regardless).
…ration counts

DTO 0.10.0 and NT 0.9.3 registered 2026-08-21; the 0.9/0.8 compat floors
made DTO's own benchmark/convergence CI unsatisfiable the moment 0.10.0
hit General (the benchmark envs pin this package by rev).

Beyond compat: DTO 0.10's solve! now returns a SolveStats (previously
nothing). benchmark_solve! was hard-coding iterations = -1 with a
'solve! returns nothing; sentinel' comment — real solver counts were
being discarded. Wire them through: iterations from stats.iterations,
solver_status from the MOI termination status (post-solve heuristic
kept as the fallback for pre-0.10). Full suite 306/306 against DTO
0.10.
The registry only recently gained DirectTrajOpt 0.10.0 (the original
registration PR sat unmerged: AutoMerge requires breaking release notes
to say 'breaking'). Guard the SolveStats branch with isdefined so the
harness works whether the resolver picks 0.9.8 or 0.10.0 — the isa
check alone throws UndefVarError on pre-0.10.

Verified both ways: Pkg.test() 306/306 against registry DTO 0.10.0
(SolveStats path live) and the guard keeps 0.9.8 resolvable.
@aarontrowbridge
aarontrowbridge merged commit 03bc8fe into main Aug 21, 2026
4 checks passed
@aarontrowbridge
aarontrowbridge deleted the fix/dto-0.10-compat branch August 21, 2026 14:50
aarontrowbridge added a commit to harmoniqs/DirectTrajOpt.jl that referenced this pull request Aug 21, 2026
…Stats)

The rev-pinned c38418c pin (compat DirectTrajOpt = 0.9 only) made both
benchmark CI suites unsatisfiable the moment DTO 0.10.0 hit General —
on this very PR, since its Project.toml declares 0.10. v0.2.1 widens
compat to 0.9/0.10 and wires the SolveStats return into
benchmark_solve!'s iteration counts (harmoniqs/HarmoniqsBenchmarks.jl#18).
aarontrowbridge added a commit to harmoniqs/DirectTrajOpt.jl that referenced this pull request Aug 21, 2026
…tor (#139)

* fix(integrators): restore the multi-state BilinearIntegrator constructor

The c9fdeb7 integrator refactor dropped the historical xs::AbstractVector{Symbol}
constructor, leaving every stacked-state caller — concretely Piccolo's exported
VariationalKetIntegrator/VariationalUnitaryIntegrator (Piccolo #300) — with a
MethodError on construction.

Additive restore following the codebase's existing multi-name convention
(get_nonlinear_constraints already dispatches on x_names; Piccolissimo's
exponential family carries it):

- struct gains x_names::Vector{Symbol}; x_name::Symbol stays as the primary
  (first) name, so existing field access keeps working
- BilinearIntegrator(G, xs, u, traj) constructor; the single-name form
  delegates via [x]
- evaluate!/eval_jacobian/eval_hessian_of_lagrangian gather the stacked
  state across all names (component ranges hoisted out of the ForwardDiff
  closures)
- get_nonlinear_constraints checks x_names before x_name so an integrator
  carrying both fields sums the whole stack
- test: split-component trajectory vs single-component reference — identical
  residuals/Jacobians/Hessians on coinciding flat data + branch coverage

Fixes #138. Unblocks Piccolo #300 (variational integrator tests ride 2.0.3).

* benchmark: pin HarmoniqsBenchmarks to v0.2.1 (DTO 0.10 compat + SolveStats)

The rev-pinned c38418c pin (compat DirectTrajOpt = 0.9 only) made both
benchmark CI suites unsatisfiable the moment DTO 0.10.0 hit General —
on this very PR, since its Project.toml declares 0.10. v0.2.1 widens
compat to 0.9/0.10 and wires the SolveStats return into
benchmark_solve!'s iteration counts (harmoniqs/HarmoniqsBenchmarks.jl#18).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: DTO 0.10 compat + SolveStats wiring for benchmark_solve!

1 participant