Skip to content

Commit 0f7a445

Browse files
authored
fix(providers): correct Z3 mismatch diagnostic (#748)
1 parent 414271d commit 0f7a445

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

src/jacobian/provider_runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def known_provider_runtime(
677677
license_id="MIT",
678678
diagnostic=(
679679
"Z3 is installed but does not match the pinned "
680-
f"{Z3_SOLVER_VERSION} graph-search profile."
680+
f"{Z3_SOLVER_VERSION} SMT solver profile."
681681
),
682682
)
683683
return runtime

tests/unit/contracts/test_provider_runtime.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,25 @@ def test_python_provider_readiness_checks_required_attributes(
286286
assert raised.value.code is ProviderRuntimeErrorCode.READINESS_FAILED
287287

288288

289+
def test_z3_version_mismatch_reports_smt_solver_profile(
290+
monkeypatch: pytest.MonkeyPatch,
291+
) -> None:
292+
mismatched = _runtime(provider="jacobian.z3", version="0.0.0")
293+
monkeypatch.setattr(
294+
provider_runtime,
295+
"python_distribution_provider_runtime",
296+
lambda *_args, **_kwargs: mismatched,
297+
)
298+
299+
runtime = provider_runtime.known_provider_runtime("jacobian.z3")
300+
301+
assert runtime.availability is CapabilityProviderAvailability.UNAVAILABLE
302+
assert runtime.diagnostic == (
303+
"Z3 is installed but does not match the pinned "
304+
f"{provider_runtime.Z3_SOLVER_VERSION} SMT solver profile."
305+
)
306+
307+
289308
def test_disappeared_executable_is_unavailable(tmp_path: Path) -> None:
290309
runtime = _runtime(
291310
digest_kind=CapabilityProviderDigestKind.EXECUTABLE,

0 commit comments

Comments
 (0)