Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

CI: keep the host-default README guard scoped to Studio docs (#9623)

Apozef9274f67ab45
diff --git a/tests/sh/test_install_host_defaults.sh b/tests/sh/test_install_host_defaults.sh
index 62f4c076cc1..55997697721 100755
--- a/tests/sh/test_install_host_defaults.sh
+++ b/tests/sh/test_install_host_defaults.sh
@@ -36,6 +36,29 @@ assert_not_contains() {
fi
}
+studio_commands() {
+ printf '%s\n' "$1" \
+ | awk '/^[[:space:]]*(\$[[:space:]]*)?unsloth[[:space:]]+studio([[:space:]]|$)/'
+}
+
+assert_studio_wildcard_host_state() {
+ _label="$1"; _haystack="$2"; _expected="$3"
+ _commands=$(studio_commands "$_haystack")
+ if printf '%s\n' "$_commands" \
+ | grep -Eq '(^|[[:space:]])(-H|--host)(=|[[:space:]]+)0\.0\.0\.0([[:space:]]|$)'; then
+ _actual="present"
+ else
+ _actual="absent"
+ fi
+ if [ "$_actual" = "$_expected" ]; then
+ echo " PASS: $_label"
+ PASS=$((PASS + 1))
+ else
+ echo " FAIL: $_label (expected wildcard host $_expected, found $_actual)"
+ FAIL=$((FAIL + 1))
+ fi
+}
+
echo ""
echo "=== install.sh launcher template ==="
@@ -88,19 +111,20 @@ assert_not_contains \
echo ""
echo "=== README.md Launch section ==="
-# The primary Launch example must not include -H 0.0.0.0; the LAN/cloud
-# note is an opt-in line outside it. Stop at the next heading of any level:
+# The primary Launch example must not include -H 0.0.0.0. Stop at the next heading:
# '#### Update' was later deleted, silently extending the section to the file end.
_readme_launch=$(awk '/^#### Launch$/{found=1; print; next} found && /^#{1,6} /{exit} found{print}' "$README")
+# The opt-in belongs anywhere in the Studio quickstart, including a sibling subsection.
+_readme_studio=$(awk '/^### Unsloth Studio \(web UI\)$/{found=1; print; next} found && /^#{1,3} /{exit} found{print}' "$README")
assert_contains \
"README: Launch section exists" \
"$_readme_launch" "unsloth studio"
-assert_not_contains \
- "README: Launch section primary command has no -H 0.0.0.0" \
- "$_readme_launch" "studio -H 0.0.0.0"
-assert_contains \
- "README: Launch section documents -H 0.0.0.0 opt-in" \
- "$_readme_launch" "0.0.0.0"
+assert_studio_wildcard_host_state \
+ "README: Launch section primary command has no wildcard host" \
+ "$_readme_launch" "absent"
+assert_studio_wildcard_host_state \
+ "README: Studio quickstart documents a wildcard-host opt-in" \
+ "$_readme_studio" "present"
echo ""
echo "=== Results ==="