{"record":{"id":"7f73ffc45d61b509","repo":"unslothai/unsloth","slug":"pinned-release-pin-release-tag-but-installer-pro","errorCode":null,"errorMessage":"pinned release {pin_release_tag} but installer produced {new_tag}","messagePattern":"pinned release (.+?) but installer produced (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"studio/backend/utils/llama_cpp_update.py","lineNumber":678,"sourceCode":"        try:\n            latest_published_release(repo, force_refresh = True)\n        except Exception as exc:  # pragma: no cover - network defensive\n            logger.debug(\"llama update: post-install freshness refresh failed\", error = str(exc))\n        new_marker = read_install_marker(_find_binary())\n        new_tag = (new_marker or {}).get(\"release_tag\") or (new_marker or {}).get(\"tag\")\n        new_backend = marker_backend(new_marker)\n        new_backend_request = marker_backend_request(new_marker)\n\n        new_repo = (new_marker or {}).get(\"published_repo\")\n        if pin_release_tag and backend_request is not None:\n            if new_repo != repo or new_tag != pin_release_tag:\n                raise RuntimeError(\n                    \"backend switch must preserve \"\n                    f\"{repo}@{pin_release_tag}, but installer produced \"\n                    f\"{new_repo or 'an unknown repository'}@{new_tag or 'an unknown release'}\"\n                )\n        elif pin_release_tag and new_tag and new_repo == repo and new_tag != pin_release_tag:\n            raise RuntimeError(f\"pinned release {pin_release_tag} but installer produced {new_tag}\")\n\n        if backend_request is not None:\n            if new_backend is None:\n                raise RuntimeError(\n                    f\"requested {backend_request} but the installed backend is unknown\"\n                )\n            if new_backend_request != backend_request:\n                raise RuntimeError(\n                    f\"requested {backend_request} but the installer recorded \"\n                    f\"{new_backend_request or 'an unknown selection'}\"\n                )\n            if backend_request != \"auto\" and new_backend != backend_request:\n                raise RuntimeError(\n                    f\"requested {backend_request} but the installer produced \"\n                    f\"{new_backend or 'an unknown backend'}\"\n                )\n\n        logger.info(\"llama update: success\", to_tag = new_tag, backend = new_backend)","sourceCodeStart":660,"sourceCodeEnd":696,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/utils/llama_cpp_update.py#L660-L696","documentation":"Narrower sibling of the repo-preservation check: it fires only when no backend_request was supplied (a plain update, not a switch), a release tag was pinned, the installer did record a tag, and the repo is unchanged — but the installed tag differs from the pin. I.e. the install succeeded yet landed on the wrong release of the right repository.","triggerScenarios":"run_update(pin_release_tag='b1234') without backend_request, where read_install_marker returns the same published_repo but a different tag — e.g. the pinned tag had no artifact for the platform and the installer fell back to the closest release, or the pin was overridden by a 'latest' policy.","commonSituations":"Platform-specific asset missing for the pinned release (macOS arm64 vs x86 asset naming); user pinned an old tag while auto-update logic prefers latest; concurrent runs where one pinned and the other updated freely.","solutions":["Confirm the pinned tag publishes an artifact for your OS/arch and re-run","If you intended to track latest, drop the pin_release_tag argument","Re-pin to the tag actually installed if that release is acceptable","Clear the managed install and re-run with the pin so no stale marker confuses the check"],"exampleFix":"# before\nrun_update(pin_release_tag='b1234')\n# RuntimeError: pinned release b1234 but installer produced b4900\n\n# after\nrun_update(pin_release_tag='b4900')  # or omit the pin to track latest","handlingStrategy":"validation","validationCode":"from utils.llama_cpp_update import latest_published_release\n\ndef tag_exists(repo: str, tag: str) -> bool:\n    try:\n        return tag == getattr(latest_published_release(repo, force_refresh=True), 'tag', None)\n    except Exception:\n        return False  # do not block on network; rely on the post-check","typeGuard":null,"tryCatchPattern":"try:\n    run_update(pin_release_tag=tag)\nexcept RuntimeError as exc:\n    if 'pinned release' in str(exc):\n        run_update(pin_release_tag=parse_installed_tag(exc))  # accept reality or re-pin\n    else:\n        raise","preventionTips":["Prefer tracking latest (omit the pin) unless reproducibility demands a tag","Verify the tag has artifacts for your platform before pinning"],"tags":["llama-cpp","runtime-installer","release-pin","version-mismatch"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}