Skip to content

Robustify solver, add warm-start API, and update docs (v0.11.2)#23

Merged
bnaras merged 6 commits intomainfrom
conespec_fix
Feb 25, 2026
Merged

Robustify solver, add warm-start API, and update docs (v0.11.2)#23
bnaras merged 6 commits intomainfrom
conespec_fix

Conversation

@bnaras
Copy link
Copy Markdown
Collaborator

@bnaras bnaras commented Feb 25, 2026

Summary

  • Robustify Rust solver interface (v0.11.9001): type coercion, error handling, CscMatrix validation, regex ordering
  • Switch R-side errors to cli (v0.11.9002): all stop() calls replaced with cli::cli_abort() with markup
  • Persistent solver API for warm starts (v0.11.9003): clarabel_solver(), solver_solve(), solver_update(), solver_is_update_allowed()
  • Add examples, warm-start vignette, and updated docs (v0.11.2): function examples, warm-start vignette, pkgdown site refresh, NEWS.md
  • Housekeeping: exclude .claude/ and CLAUDE.md from R build, allow empty cone specs

Test plan

  • Verify all 93 existing tests pass via Rscript tests/tinytest.R
  • Verify R CMD check passes
  • Test warm-start workflow: create solver, solve, update data, re-solve
  • Verify pkgdown site renders correctly

🤖 Generated with Claude Code

bnaras and others added 6 commits February 12, 2026 16:20
- Replace silent `_ => ()` cone type mismatches with proper error returns
- Accept both Integer and Real for integer-expecting cones (z, l, q, ep, s)
- Accept both Real and Integer for power cones
- Add CscMatrix check_format() validation for P and A matrices
- Replace .expect() panics with ok_or_else error propagation for GenPowerCone
- Reorder regex checks: ^gp before ^p for clarity
- Error on unknown cone types instead of warning-and-ignore
- Remove commented-out debug code
- Bump version to 0.11.9001

All 93 existing tests pass unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace all stop() calls with cli::cli_abort() for structured errors
- Use cli markup: {.arg}, {.val}, {.fn}, {.cls} for formatting
- Use cli pluralization ({?is/are}) for multi-item errors
- Improve error specificity: clarabel_control now names offending params
- Improve cone validation: separate errors for unknown vs repeated cones
- Add cli to Imports in DESCRIPTION
- Leave savvy-generated 000-wrappers.R stop() untouched

All 93 existing tests pass unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor lib.rs into reusable helpers (build_P_matrix, build_A_matrix,
parse_cones, extract_solution) and add ClarabelSolver struct with
new/solve/update_data/is_update_allowed methods via savvy external
pointers. Add R-level convenience wrappers: clarabel_solver(),
solver_solve(), solver_update(), solver_is_update_allowed(). All 93
existing tests pass unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bnaras bnaras merged commit 4e6866c into main Feb 25, 2026
5 checks passed
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.

1 participant