Make solver adapter APIs preparation-aware - #1166
Draft
termoshtt wants to merge 5 commits into
Draft
Conversation
# Conflicts: # rust/ommx/doc/release_note/3.0.md
termoshtt
changed the base branch from
main
to
codex/instance-output-objective
August 20, 2026 06:11
# 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on
Summary
SolverAdapter.solve()andSamplerAdapter.sample()non-mutating convenience APIs that copy the input, apply the adapter's recommended preparation policy forINPUT_CLASS, and delegate to new preparation-freesolve_strict()/sample_strict()APIs.OutputObjectivethrough the Python SDK, generated stubs, and API reference so transformed solver inputs still produce source-semantic objective values and sense.User impact
Most callers can pass an unprepared Instance directly to
solve()orsample()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 tosolve_strict()orsample_strict().