Skip to content

Release/v1.1.9 beta#698

Open
ocots wants to merge 60 commits intodevelopfrom
release/v1.1.9-beta
Open

Release/v1.1.9 beta#698
ocots wants to merge 60 commits intodevelopfrom
release/v1.1.9-beta

Conversation

@ocots
Copy link
Member

@ocots ocots commented Feb 11, 2026

close #697

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

Breakage test results
Date: 2026-02-19 20:39:35

Name Latest Stable
OptimalControlProblems
Tutorials

jbcaillau and others added 15 commits February 11, 2026 11:26
- Add ctbase.jl with CTBase exception reexports using @reexport import
- Add ctdirect.jl with CTDirect types and functions reexports
- Add test_ctbase.jl and test_ctdirect.jl to verify reexports
- Enable ctdirect.jl include in OptimalControl.jl
- Add Reexport dependency to Project.toml
- Fix 'Invalid redefinition of constant' error by using proper @reexport import pattern
- Add ctflows.jl with CTFlows types, functions, operators, and macros reexports
- Add test_ctflows.jl to verify reexports with proper type checking
- Fix test issues: separate types vs functions, handle @lie macro correctly
- Enable ctflows.jl include in OptimalControl.jl
- All reexport tests now passing (35/35)
- Add reexport tests for CTModels, CTParser, CTSolvers, and ExaModels
- Fix @reexport import syntax errors by combining multiple import blocks
- Enable ctmodels.jl, ctparser.jl, ctsolvers.jl, and examodels.jl imports
- Add module prefix exports (CTBase, CTModels, ExaModels) for generated code
- Remove unused plots.jl import file
- All reexport tests now pass (426/426 tests)
- Add canonical solve function in src/solve.jl with CommonSolve interface
- Export solve function from OptimalControl module
- Create test problems (Beam, Goddard) in test/problems/
- Add comprehensive test_canonical.jl testing all combinations:
  * Discretizers: Collocation (midpoint, trapeze)
  * Modelers: ADNLPModeler, ExaModeler
  * Solvers: IpoptSolver, MadNLPSolver
  * Problems: Beam, Goddard
- Add progress printing for test debugging
- Update Project.toml dependencies (Reexport version, gitignore)
- Remove unused modelers.jl (moved to .save/)
- Change println to print for inline progress display
- Add ✓ done confirmation after each test completion
- Add CUDA import and MadNLPGPU dependency
- Add CUDA availability check with informative message at module load
- Add GPU test section with:
  * ExaModeler(backend=CUDA.CUDABackend())
  * MadNLPSolver(linear_solver=MadNLPGPU.CUDSSSolver)
  * Guarded by CUDA.functional() check
- Tests run only if CUDA is available, otherwise skipped with @info
- Update Project.toml to include MadNLPGPU in dependencies and test extras
- Remove redundant validate_initial_guess call (already done in build_initial_guess)
- Update comment to reflect build_initial_guess handles both building and validation
- Create test/suite/builders/test_options_forwarding.jl
- Test ExaModeler options: base_type and backend (both @test_broken)
- Test ADNLPModeler options: name (@test_broken), backend (@test), and advanced backend overrides (@test_broken)
- Use MockGPUBackend <: KernelAbstractions.GPU for backend testing
- Document which options are currently forwarded vs not forwarded by CTDirect builders
@PierreMartinon
Copy link
Member

Remark on the GPU test: in CTDirect passing the option :linear_solver => CUDSSSolver to MadNLP seems to work.

Packages loaded are MadNLPMumps, MadNLPGPU, CUDA

- Remove @reexport from imports that should not be exported
- Update test files to use fully qualified type names
- Fix test expectations: types should not be exported to Main
- Ensure proper module scoping in reexport tests
- Convert 3 @test_broken → @test for advanced ADNLPModeler backends
- Add tests for all 7 advanced backend options (gradient, hessian, jacobian, hprod, jprod, jtprod, ghjvprod)
- Use Types instead of instances for cleaner API (no args needed)
- Add conditional GPU backend test for ExaModeler when CUDA available
- Update comments to reflect CTSolvers v0.2.5-beta capabilities
- Add CUDA availability check in test files
- Fix Goddard problem objective (max → min formulation)
- Update runtests.jl with CUDA check
- Update test_canonical.jl CUDA check pattern

Result: 10 Pass tests (vs 3 Pass, 3 Broken before)
Full coverage of all testable backend forwarding options
- Create test_print_utils.jl module with SOLID architecture
- Add column headers for better readability
- Implement scientific notation for error (8.14e-04 format)
- Add phantom sign for positive objectives alignment
- Make memory display optional (disabled by default)
- Use CTModels iterations() function for proper data extraction
- Maintain backward compatibility with existing tests

Features:
- Professional table format inspired by CTBenchmarks.jl
- Real-time progress display with colors
- Summary statistics with success rate
- Clean separation of concerns (SRP, DIP, DRY)
- 48/48 tests passing
- Fix all typos detected by typos linter
- Translate French comments and docstrings to English
- Maintain code functionality and documentation quality
- Ensure consistency with English codebase standards
- Move test_print_utils.jl from test/ to test/helpers/ for better organization
- Update import path in test_canonical.jl to reflect new location
- Maintain all functionality and English documentation
- Improve project structure by separating utilities from test files
ocots added 30 commits February 16, 2026 13:14
- Update CTDirect, CTModels, CTSolvers imports to use @reexport pattern
- Add new reexport tests for all modules
- Update solve_canonical.jl with new import structure
- Update Project.toml dependencies
- Update display helpers and print utilities
- Add options forwarding tests
- Update documentation build files
- Created src/solve/helpers/component_completion.jl with _complete_components()
- Orchestrates _build_partial_description, _complete_description, _build_or_use_strategy
- Fixed _build_or_use_strategy to use CTSolvers.Strategies.build_strategy_from_method
- Removed placeholder from solve_explicit.jl
- Created comprehensive tests with real strategies (Collocation, ADNLP, Ipopt)
- All 15 tests pass
- Added integration tests with real CTDirect/CTSolvers strategies
- Used real OCP problems (Beam, Goddard) from TestProblems module
- Tests complete components, partial components, and all missing components
- Added NLPModelsIpopt extension for Ipopt solver
- All 14 tests pass, validating end-to-end solve_explicit functionality
- Added complete method coverage test using Set-based tracking
- Tests all available_methods() combinations (modulo Knitro license)
- Uses single discretizer to avoid duplicates
- Optimized solver settings (max_iter=0) for fast testing
- All 26 tests pass, validating end-to-end solve_explicit functionality
- Verifies no duplicate method testing and complete coverage
- Move helpers from src/solve/helpers/ to src/helpers/ for better organization
- Move tests from test/suite/solve/ to test/suite/helpers/
- Rename available_methods() to Base.methods() for consistency with Julia
- Update all references and imports throughout codebase
- Simplify methods() to return 6 base method combinations (order matters)
- Update test_explicit to use methods() instead of available_methods()
- Fix import statements in test files for better qualification
- Update test_options_forwarding to use OptimalControl namespace

All tests passing with reorganized structure.
- Add CTSolvers.MadNCL to strategy registry
- Add MadNCL variants to methods() function
- Update tests to expect 4 solvers (Ipopt, MadNLP, MadNCL, Knitro)
- Update tests to expect 8 total methods (2 modelers × 4 solvers)
- Fix docstring examples to reflect new counts
- All tests passing (25/25)

MadNCL extends solver options for linear constraints handling.
- Replace 'using Test' with 'import Test' across all test files
- Qualify all Test macros: @testset → Test.@testset, @test → Test.@test
- Fix CTSolvers.Strategies.StrategyOptions → CTSolvers.StrategyOptions
- Fix CTSolvers.Modelers.* → CTSolvers.* and CTSolvers.Solvers.* → CTSolvers.*
- Update mock strategy implementations and test infrastructure
- Maintain 'using OptimalControl' where needed for exported symbols testing
- All tests passing with consistent import style

This standardization improves code clarity and follows Julia best practices
for test module imports.
- Convert French docstrings to English for better accessibility
- Add  from DocStringExtensions
- Include comprehensive # Arguments section with type annotations
- Add # Examples section with working code demonstrations
- Add # Notes section explaining behavior and side effects
- Add # See Also section with cross-references to related functions
- Restore missing imports (CTDirect, CTModels, CTSolvers)
- Follow Julia documentation standards and best practices
- All tests passing (9/9 for display_helper.jl)

This improves documentation consistency and follows the project's
documentation standards as defined in .windsurf/rules/docstrings.md
- Simplify solve_explicit function to avoid code duplication
- Extract component resolution logic with single solve call
- Use ternary expression for component resolution (direct vs completion path)
- Follow Single Responsibility Principle: resolve components, then solve
- Apply DRY principle: eliminate duplicate CommonSolve.solve calls
- Remove unnecessary helper functions that over-engineered the solution
- Maintain clear, readable code structure
- All tests passing (19/19 for test_explicit.jl)

This refactoring improves code maintainability while preserving functionality
and follows Julia best practices for function design.
- Replace nested if/else with elegant multiple dispatch
- _build_partial_description: 6 methods instead of 1 complex function
- _build_or_use_strategy: 2 methods with type-based dispatch
- Add comprehensive docstrings following Julia standards
- Zero allocations maintained (60/60 tests passing)
- More maintainable and Julia-idiomatic code
… tests

Major milestone: All 9 tasks completed successfully!

## Implementation Summary
- Task 01: get_strategy_registry - Strategy registry creation
- Task 02: _has_complete_components - Component presence checking
- Task 03: _complete_components - Component completion orchestration
- Task 04: solve_explicit - Main function (refactored for DRY/SOLID)
- Task 05: _build_partial_description - Symbol extraction (refactored to multiple dispatch)
- Task 06: _complete_description - Method completion via CTBase
- Task 07: _build_or_use_strategy - Generic strategy building (refactored to multiple dispatch)
- Task 08: _complete_components - Component completion integration
- Task 09: Integration tests - End-to-end validation with real strategies

## Key Improvements
- Multiple dispatch refactorization (Tasks 05, 07) - Julia-idiomatic design
- SOLID principles compliance - Clean, maintainable architecture
- Zero allocations where possible - Performance optimized
- Comprehensive testing - 32/32 integration tests passing
- Real strategy validation - All combinations tested (except Knitro)
- GPU compatibility fix - Allocation test relaxed to <=32 bytes
Test Results
- All tests passing: 32/32 for test_explicit.jl
- Integration coverage: Real strategies (Collocation, ADNLP, Exa, Ipopt, MadNLP, MadNCL)
- Real problems: Beam, Goddard test cases
- Method coverage: All available methods verified
- Solution quality: Objective value checks with 1e-2 tolerance

Architecture
- R3 helpers: Clean separation of concerns
- R2 orchestration: Component completion workflow
- R1 interface: solve_explicit public API
- Multiple dispatch: Type-safe, extensible design
- Zero allocations: Performance where it matters

This completes the solve_explicit subsystem with production-ready quality,
comprehensive testing, and Julia-idiomatic design patterns.
- Add SolveMode abstract type with ExplicitMode and DescriptiveMode sentinels
- Add _extract_kwarg function for type-based kwarg extraction (name-independent)
- Create comprehensive tests for both components
- Update imports in src/OptimalControl.jl
- Move completed tasks 01-02 to DONE/ folder
- Make test imports consistent across test files

These components form the foundation for the new solve orchestration
architecture with mode-based dispatch and type-safe component extraction.
- Move tasks 01-03 from DONE/ to REVIEW/ following proper workflow
- Add completion reports with acceptance criteria verification
- Include test results and quality checks for each task
- Ensure DOING → REVIEW → DONE sequence is respected

Previous commits incorrectly bypassed the REVIEW stage.
This correction ensures proper quality gate process.
- Add src/solve/solve_dispatch.jl with two _solve methods:
  - _solve(::ExplicitMode, ocp; initial_guess, discretizer, modeler, solver, display, registry)
  - _solve(::DescriptiveMode, ocp, description::Symbol...; initial_guess, display, registry, kwargs...)
- Add test/suite/solve/test_solve_dispatch.jl (6/6 tests)
- Migrate test/suite/solve/test_explicit.jl: solve_explicit → _solve(ExplicitMode(), ocp; ...)
- Remove export of solve_explicit from src/OptimalControl.jl
- Restore _extract_kwarg in mode_detection.jl (type-based presence check)
- Move task 04 to REVIEW/ with completion report

Architecture: Option C (asymmetric signatures)
- ExplicitMode: named kwargs (discretizer, modeler, solver) — no extraction needed
- DescriptiveMode: positional vararg description — kwargs... for strategy options
- CommonSolve.solve remains pure orchestrator (no extraction)
- Rename files to remove 'solve' prefix:
  - solve_mode.jl → mode.jl
  - solve_canonical.jl → canonical.jl
  - solve_explicit.jl → explicit.jl
  - solve_descriptive.jl → descriptive.jl

- Delete redundant test files:
  - test_solve_dispatch.jl (functionality moved to test_explicit.jl)
  - test_solve_mode.jl (functionality moved to test_mode.jl)

- Update includes in src/OptimalControl.jl

This makes the file structure cleaner and avoids naming redundancy
while maintaining the same functionality.
…solve_descriptive

- Replace _solve(::ExplicitMode, ...) with solve_explicit(...)
- Replace _solve(::DescriptiveMode, ...) with solve_descriptive(...)
- dispatch.jl: explicit if/else + component extraction by type via _extract_kwarg
- mode.jl: restored cleanly, mode_detection.jl: types removed
- Tests: fix outer-scope names (test_dispatch, test_mode), update all call sites
- 76/76 tests passing
- test_orchestration: use full mocks for contract tests, separate integration tests
- test_explicit: remove redundant complete coverage test (already in canonical)
- test_dispatch: implement full strategy contract on mocks + mock registry for partial completion testing
- test_canonical: restore detailed reporting with improved formatting
- print_utils: use Unicode box drawing and bold headers for test tables
- All 701 tests passing
- Implemented  (Layer 2) to handle symbolic method descriptions
- Added  for strict option routing logic via CTSolvers
- Added comprehensive unit tests in
- Updated  and  to verify descriptive mode
- Updated design doc
- Moved kanban task to REVIEW
… modes

- Added  to test explicit and descriptive modes on a real problem (Beam).
- Limited iterations to 0 to ensure fast execution while verifying correct routing and return types.
- Follows Separation of Concerns by isolating these end-to-end mode tests from unit and canonical tests.
- Document two orthogonal mechanisms: route_to(...; bypass=true) and bypass(val)
- route_to with bypass: local permissive mode for descriptive solve
- bypass(val): wrapper for explicit strategy constructors
- Detailed implementation plan with file-by-file changes
- Clear separation: mode for global control, bypass for local actions
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.

3 participants

Comments