Fix main's red CI after #14437, #14455 and #14473 by danielhanchen · Pull Request #14517 · unslothai/unsloth · GitHub
Skip to content

Fix main's red CI after #14437, #14455 and #14473 - #14517

Merged
danielhanchen merged 1 commit into
mainfrom
fix/main-red-ci-14437-14455-14473
Oct 21, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/main-red-ci-14437-14455-14473

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

Five checks fail on main, so the Repo tests (CPU, studio), Repo tests (CPU, rest) and workflow-trigger lint shards are red on every open PR (for example #14472, #14482, #14488, #14490 and #14494). All five reproduce on main 4d7ebf5cea.

Test Introduced by Fault
tests/security/test_lint_risky_loaders.py::test_the_tree_matches_the_baseline #14437 Baseline. Two new dynamic-import sites: import_module in studio/backend/core/rag/embeddings.py, and a third import_from_string in unsloth/models/sentence_transformer.py (_require_word_tokenizer). Both are safe, see below.
tests/studio/test_tauri_branding_contract.py::test_desktop_surfaces_do_not_restore_studio_branding #14473 Product. "Studio" became "Unsloth Studio" in the Markdown import errors and the Tauri webview reject message. The desktop contract allows "Unsloth" there, never "Unsloth Studio". "Unsloth" meets both #14473's rule (no bare "Studio") and this one.
tests/studio/test_usage_examples_model_source_contract.py::test_auto_switch_section_sits_above_the_usage_examples #14455 Test. The redesign moved the usage examples above the monitor link on purpose, and its own api-settings-tab.test.ts pins that.
tests/studio/test_usage_examples_model_source_contract.py::test_monitor_can_unload_the_loaded_model #14455 Test. Unloading moved from a standalone button on the page into the model picker's eject (ApiModelLoadControls). The /unload path itself is unchanged.
tests/studio/test_settings_compact_overflow_contract.py::test_api_monitor_entries_and_expanded_text_can_shrink #14455 Test. Entry rows are now rounded cards (no border-b), and the prompt/reply box's rounded-lg became conditional, so the class literals the test matched are gone. The overflow guards themselves are still in the source.

Fix

  • Risky loaders: two baseline entries with reasons.
    • embeddings.py imports only the three sentence_transformers.models paths written out in a literal tuple, to wrap their import_from_string with the trust gate.
    • _require_word_tokenizer imports only after its caller has refused any tokenizer_class outside sentence_transformers.*, and only dotted identifiers.
  • Branding: "Unsloth Studio" to "Unsloth" in those seven Markdown import errors and the Rust reject message. conversation-markdown-import.test.ts now matches /Unsloth Markdown/.
  • Unsloth Studio: redesigned API page, multi-model support and a Run settings fix #14455 contracts: rewritten to guard what the redesign keeps:
    • the auto-switch section still follows the monitor link, and the usage examples come before both;
    • the page passes unloadActiveModel to the load controls as onUnloadActive, and eject is withheld while busy (modelLoading || unloading, feat(studio): add model picker and reload shortcut to API monitor #11223's rule);
    • the /unload call still reads the internal id from status;
    • entry rows keep w-full min-w-0;
    • the prompt/reply box keeps max-h-72 overflow-auto break-words;
    • the model id keeps min-w-0 break-all.

Verification

  • The four Python files: 78 passed (5 failed on main).
  • studio/frontend/tests/conversation-markdown-import.test.ts: 20 passed.
  • Sabotage, each run against the rewritten tests, each failing exactly one test:
    • removing min-w-0 from the entry row, or break-words from the text box: the overflow test fails;
    • dropping unloading from busy, or passing onEject while busy: the unload test fails;
    • putting the auto-switch section above the monitor link: the order test fails.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T13:41:26.898258Z 8a3cd3d Manual request
🔒 Security Review ⚠️ Failed 2026-10-21T13:38:44.901716Z
We couldn’t complete this review. Comment @codex security review to try again.
8a3cd3d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector

Copy link
Copy Markdown

@danielhanchen
danielhanchen merged commit f4077f8 into main Oct 21, 2026
1 of 48 checks passed
@danielhanchen
danielhanchen deleted the fix/main-red-ci-14437-14455-14473 branch October 21, 2026 13:48
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