unsloth/tests/studio/install
DoubleMathew 77c8d80a85
Fix Linux prebuilt installs for branch-based llama.cpp releases (#5493)
* allow validation of custom releases to pass

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* require exact source provenance for branch direct linux releases

Mirror validated_checksums_for_bundle so incomplete checksum metadata
on a branch/pull/commit release fails closed with a clear error instead
of silently degrading to the legacy master-as-tag source hydration path
that this PR is meant to eliminate. Guard fires when source_commit,
the exact source archive hash, or a derivable source repo URL is
missing from the approved metadata.

Also set plan.llama_tag to approved_checksums.upstream_tag so the
ensure_converter_scripts fallback and the install fingerprint target
the concrete upstream tag (e.g. b9174) rather than the moving branch
label inferred from asset names (master). Legacy b#### releases are
unaffected: synthetic checksums already set upstream_tag to
bundle.upstream_tag, so the swap is a no-op on that path.

Add parametrized negative regression coverage for the three ways
exact provenance can be incomplete (missing source_commit, missing
exact source archive entry, missing source_repo) and update the
existing branch happy-path test to expect b9174.

* revert llama_tag swap to preserve install identity

Keep plan.llama_tag as bundle.upstream_tag (the branch label inferred
from asset names, e.g. master) rather than overriding it with the
approved metadata upstream tag (b9174). The override broke install
identity in two ways:

1. expected_install_fingerprint hashes upstream_tag = llama_tag, so
   the same release would produce a different fingerprint depending on
   which version of this code resolved it, causing spurious reinstalls
   when users upgrade or roll back.
2. UNSLOTH_PREBUILT_INFO.json reports the value as the user-visible
   record of which release was installed; tools and logs should see
   the requested branch label, not the compatibility tag.

The approved metadata still records upstream_tag = b9174 internally
for source archive lookup; the new assertion makes that explicit.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>
2026-05-17 07:16:55 -07:00
..
smoke_test_llama_prebuilt.py Add installer test coverage for prebuilt llama.cpp changes (#4756) 2026-04-01 06:06:29 -07:00
smoke_test_parallel_studio_home.py tests/studio/install: parallel UNSLOTH_STUDIO_HOME smoke test (#5306) 2026-05-07 02:26:58 -07:00
test_install_llama_prebuilt_logic.py Fix Linux prebuilt installs for branch-based llama.cpp releases (#5493) 2026-05-17 07:16:55 -07:00
test_llama_pr_force_and_source.py tests: raise pwsh/bash subprocess timeout from 10s to 60s (#5463) 2026-05-15 14:18:04 -07:00
test_pr4562_bugfixes.py Update test_pr4562_bugfixes.py for simplified install policy (#4817) 2026-04-03 04:06:14 -07:00
test_rocm_support.py Add Studio PR-time CI: pin enforcement, frontend, backend, wheel smoke (#5298) 2026-05-06 04:41:57 -07:00
test_selection_logic.py Studio: download paired cudart bundle on Windows CUDA installs (#5322) 2026-05-11 05:42:05 -07:00