Skip to content

Staging validation: Studio CI fix bundle (pydantic + llama.cpp + change-password)#141

Open
danielhanchen wants to merge 2 commits into
mainfrom
ci/general-fix-2026-05-23
Open

Staging validation: Studio CI fix bundle (pydantic + llama.cpp + change-password)#141
danielhanchen wants to merge 2 commits into
mainfrom
ci/general-fix-2026-05-23

Conversation

@danielhanchen

Copy link
Copy Markdown
Owner

Staging-fork validation PR for a maintainer-side CI fix bundle. Not for upstream merge — this lands the same diff that would go to unslothai/unsloth main, against the throwaway staging fork, with a minimal workflow set so we can verify on real GitHub-hosted Ubuntu / macOS / Windows runners without touching the main repo's CI budget.

Bundled fixes

  1. Windows --no-torch install: pydantic-core mismatch. Every Studio Windows smoke fails at unsloth studio setup with SystemError: The installed pydantic-core version (2.47.0) is incompatible with the current pydantic version, which requires 2.46.4. uv pip install --no-deps -r no-torch-runtime.txt resolves pydantic and pydantic-core independently from latest. Resolve pydantic WITH deps in a focused pip call so pip pins pydantic-core to the version pydantic's metadata requires; pydantic's transitive deps are torch-free. Drop pydantic from no-torch-runtime.txt and remove the four redundant Patch Studio venv with full typer / pydantic dep trees workarounds.

  2. Linux Studio Update CI: llama.cpp falls back to source build. Upstream b9261+ split each binary's entry code into a paired libllama-<binary>-impl.so shared library. llama-server is NEEDED-linked against libllama-server-impl.so with RUNPATH \$ORIGIN. Without copying the impl libs alongside the binaries, ldd reports them missing, preflight rejects, the installer falls back to source build, and studio-update-smoke annotates setup.sh idempotency regressed. Add libllama-*-impl.so* to the Linux runtime overlay pattern and lock it in TestRuntimePatterns.

  3. Mac Studio UI Chat: change-password submit gated on a stale state. Playwright's submit click was racing the React state update for the current-password field, hitting a disabled ``. Tighten the disable gate to also require `currentPassword.length >= 8` and mirror the same check in the submit handler so Enter / autofill cannot bypass.

Staging-fork CI surface

This branch removes all 26 pre-existing workflows on the staging fork and adds 3 narrow ones:

  • `staging-install-linux.yml` — ubuntu-latest, runs `./install.sh --local --no-torch`, asserts no `prebuilt fallback reason` log line, confirms `libllama-server-impl.so` + `libllama-quantize-impl.so` landed in the install dir, asserts ldd is clean on llama-server / llama-quantize, asserts `pydantic.VERSION` + `pydantic_core.version` are imported without error.
  • `staging-install-windows.yml` — windows-latest, runs `./install.ps1 --local --no-torch`, asserts no `incompatible with the current pydantic version` log line, same pydantic / pydantic_core import smoke.
  • `staging-install-macos.yml` — macos-14, runs `./install.sh --local --no-torch`, same pydantic smoke (sanity that the install.sh fix did not regress macOS).

Each pins `runs-on:` to a single OS, uses `concurrency.cancel-in-progress: true`. Triggered on `push: branches: [ci/general-fix-2026-05-23]` with `paths:` filters scoped to the install scripts and frontend auth form. No GPU-dependent steps; the existing CUDA-spoof harness handles import-time CUDA assertions if any path lands there.

Plan after this turns green

Once these three jobs are green, open the same diff against unslothai/unsloth main as a single consolidated PR and close unslothai#5733, unslothai#5734, unslothai#5738 in favor of it. Then re-base the open maintainer PR backlog so the dependent Windows jobs unblock automatically.

Three independent CI regressions across maintainer PRs:

1. Windows --no-torch install: pydantic + pydantic-core drift to
   incompatible versions under `uv pip install --no-deps -r
   no-torch-runtime.txt`, tripping pydantic's
   _ensure_pydantic_core_version() check on the next import. Resolve
   pydantic WITH deps in a separate pip call so pip picks a
   compatible (pydantic, pydantic-core) pair. pydantic's transitive
   deps are torch-free. Drop pydantic from no-torch-runtime.txt and
   delete the now-redundant `Patch Studio venv with full typer /
   pydantic dep trees` workaround in the four Windows smoke YAMLs.
   (PR unslothai#5733 + unslothai#5734)

2. Linux Studio Update CI: upstream llama.cpp b9261+ split each
   binary's entry code into a paired `libllama-<binary>-impl.so`
   shared library. `llama-server` and `llama-quantize` NEEDED-link
   against `libllama-server-impl.so` / `libllama-quantize-impl.so`
   with RUNPATH `$ORIGIN`, so the prebuilt overlay must copy those
   alongside the binaries. Add `libllama-*-impl.so*` to the Linux
   runtime patterns and lock the pattern in
   test_rocm_support.TestRuntimePatterns.

3. Mac Studio UI Chat test: change-password submit button was clicked
   while disabled because the gate only checked new + confirm
   password length. Gate also on current_password.length >= 8 and
   mirror the gate in the submit handler so Enter / autofill cannot
   bypass it. (PR unslothai#5738)

Staging-fork-only validation workflows (Linux + Windows + macOS)
exercise each fix end-to-end without burning credits on the main
repo. The four pre-existing Studio workflows are removed from the
staging fork so we stay below the 5-concurrent-Windows-runner cap.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses dependency versioning issues by installing pydantic with its dependencies separately to ensure compatibility with pydantic-core across different platforms. It also updates the prebuilt installer to include new llama.cpp shared libraries and enhances password validation in the frontend authentication form. Feedback was provided to refine the error message in the authentication form to better distinguish between bootstrap failures and missing user input for the current password.

Comment on lines +213 to 220
if (currentPassword.length < 8) {
setError(
currentPassword
? "Current password must be at least 8 characters."
: "Unable to initialize setup. Reload the page and try again.",
);
return;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The error message "Unable to initialize setup. Reload the page and try again." is shown when the current password is empty in change-password mode. While this might be appropriate if the bootstrap process failed, it is confusing for a user who simply left the "Current password" field empty when it is visible (!hasBootstrapPassword). Consider providing a more descriptive validation error when the field is user-facing.

      if (currentPassword.length < 8) {
        setError(
          currentPassword
            ? "Current password must be at least 8 characters."
            : hasBootstrapPassword
              ? "Unable to initialize setup. Reload the page and try again."
              : "Current password is required.",
        );
        return;
      }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant