Skip to content

Make solver adapter APIs preparation-aware - #1166

Draft
termoshtt wants to merge 5 commits into
codex/instance-output-objectivefrom
codex/preparation-aware-solver-adapter
Draft

Make solver adapter APIs preparation-aware#1166
termoshtt wants to merge 5 commits into
codex/instance-output-objectivefrom
codex/preparation-aware-solver-adapter

Conversation

@termoshtt

@termoshtt termoshtt commented Aug 19, 2026

Copy link
Copy Markdown
Member

Depends on

  • #1167, which adds the Rust and protobuf output-objective model used by this Python integration.

Summary

  • Make SolverAdapter.solve() and SamplerAdapter.sample() non-mutating convenience APIs that copy the input, apply the adapter's recommended preparation policy for INPUT_CLASS, and delegate to new preparation-free solve_strict() / sample_strict() APIs.
  • Expose the Instance-owned OutputObjective through the Python SDK, generated stubs, and API reference so transformed solver inputs still produce source-semantic objective values and sense.
  • Update HiGHS, PySCIPOpt, Python-MIP, and OpenJij adapters to implement the strict API and preserve their adapter-specific options.
  • Transport backend optimality only when the output objective records that the active-formulation proof remains valid; keep dual transport as a separate conservative rule.
  • Keep Experiment solve and sampling records as the original input plus returned output, without storing the temporary prepared Instance.
  • Update the English and Japanese migration guide, adapter tutorial, capability guide, special-constraint guide, OpenJij examples, and release notes.

User impact

Most callers can pass an unprepared Instance directly to solve() or sample() without having their object mutated. Applications that need custom preparation choices can prepare an explicit working copy and call the strict API. Custom Adapter implementations move their exact-input execution logic to solve_strict() or sample_strict().

@termoshtt termoshtt added rust PR changes the Rust SDK public API python PR changes the Python SDK public API, generated stubs, or adapter public API proto Protobuf schema or generated protobuf contract changes breaking change Accepted work intentionally breaks compatibility labels Aug 19, 2026
@termoshtt
termoshtt changed the base branch from main to codex/instance-output-objective August 20, 2026 06:11
@termoshtt termoshtt removed rust PR changes the Rust SDK public API proto Protobuf schema or generated protobuf contract changes labels Aug 20, 2026
# Conflicts:
#	docs/api/api_reference.json
#	docs/en/release_note/ommx-3.0.md
#	docs/ja/release_note/ommx-3.0.md
#	python/ommx/ommx/_ommx_rust/__init__.pyi
#	python/ommx/src/instance.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Accepted work intentionally breaks compatibility python PR changes the Python SDK public API, generated stubs, or adapter public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant