Skip to content

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

Merged
Etherll merged 3 commits into
unslothai:mainfrom
Apoze:fix/readme-host-default-test-scope
Aug 24, 2026
Merged

Etherll merged 3 commits into
unslothai:mainfrom
Apoze:fix/readme-host-default-test-scope

Conversation

@Apoze

@Apoze Apoze commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep the default launch assertion scoped to the exact Launch subsection.
  • Check the explicit LAN opt-in across the surrounding Unsloth Studio (web UI) quickstart.

Motivation

The README now documents -H 0.0.0.0 under the sibling Remote HTTPS & LAN Access subsection. The existing test stops at the first heading after Launch, so it fails even though the default remains loopback-only and the opt-in command is still documented. Scoping the two assertions separately preserves both safety guarantees without depending on subsection layout.

Tests

  • bash tests/sh/test_install_host_defaults.sh (11 passed)
  • bash -n tests/sh/test_install_host_defaults.sh
  • 141 shell-suite coverage and workflow-trigger tests
  • git diff --check

@Apoze
Apoze requested a review from danielhanchen as a code owner August 24, 2026 12:08
@Apoze

Apoze commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: fd605581f9

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01ef85f67b

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/sh/test_install_host_defaults.sh Resolved
Comment thread tests/sh/test_install_host_defaults.sh Resolved

@Etherll Etherll left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM !

@Etherll
Etherll merged commit f9274f6 into unslothai:main Aug 24, 2026
10 checks passed
@danielhanchen

Copy link
Copy Markdown
Member

Thanks for chasing this down quickly, and your read on the README is right: the opt-in belongs under #### Remote HTTPS & LAN Access, and the guard's assumption about where it lived was the thing that was wrong, not the README.

Where I would push back is on keeping heading slices at all. This PR replaces one slice with two:

awk '/^#### Launch$/{found=1; print; next} found && /^#{1,6} /{exit} found{print}'
awk '/^### Unsloth Studio \(web UI\)$/{found=1; print; next} found && /^#{1,3} /{exit} found{print}'

Both are still keyed on exact heading text, so a rename takes the file red without anything about the host default having changed. Measured on this tree, renaming #### Launch to #### Start the server, #### Remote HTTPS & LAN Access to #### Networking and ### Unsloth Studio (web UI) to ### Studio, and changing nothing else:

FAIL: README: Launch section exists (expected to find 'unsloth studio')
FAIL: README: Studio quickstart documents a wildcard-host opt-in (expected wildcard host present, found absent)
2 failed

That is the same failure mode a third time. The first was #### Update being deleted, which silently ran the section to end of file; the second is this one. Recent README history is a run of direct Update README.md pushes (10c198755, 70a348bab, aea0e186d, d321b4b91, 3914575a8), so the heading structure is edited directly and often. It is not a stable index.

One other thing worth knowing about the new studio_commands helper, since it also lands in #9654: it anchors the command at the start of the line.

/^[[:space:]]*(\$[[:space:]]*)?unsloth[[:space:]]+studio([[:space:]]|$)/

so UNSLOTH_STUDIO_PASSWORD='x' unsloth studio --host=0.0.0.0 is not seen as a command at all. #9654 already fixes exactly that, so this is only a note on the ordering.

I have opened #9655, which parses the README's fenced code blocks and takes the first studio command in document order as the primary one, consulting no heading anywhere. It passes under rename, reorder, merge, split, a #### to ##### demotion, and backtick fences retyped as tildes, all against the real README rather than a synthetic one, and it fails when the primary command gains a wildcard bind or when the opt-in documentation is removed. It also derives the -H / --host spellings from the typer.Option that declares them, which closes studio -p 8888 -H 0.0.0.0 on the four installer assertions as well.

Proposing we close this in favour of #9655. The diagnosis here was the right one and I have carried it over.

rhsCZ pushed a commit to rhsCZ/unsloth that referenced this pull request Aug 24, 2026
Picks up unslothai#9623, which rescopes the host-default README guard to the Studio
quickstart. That was the remaining red check here. No conflicts.
danielhanchen added a commit that referenced this pull request Aug 24, 2026
…it is missing (#9654)

`Overlay rail shadow gutter, other engines` has failed on every studio-ui-smoke
run since #9246 added it, and passed on #9246 itself. The difference is the
frontend-dist cache.

The harness serves its own vite via `npm run dev` in studio/frontend. That job
never installs the frontend dev dependencies: it installs Studio, and setup.sh
installs them only when it has to build the frontend. The frontend-dist cache
exists precisely to stop that build, and the restore action asserts the
installer reported the frontend up to date. So on a cache miss setup.sh builds,
node_modules exists and the step passes; on a hit there is no node_modules,
`npm run dev` exits 127 with `sh: 1: vite: not found`, and the step fails.
#9246's own run missed the cache. Every run since has hit it.

The harness is right and its use in studio-frontend-ci.yml is right, where
`npm ci` has already run. Only the new step's assumption was wrong: what that
shard has already paid for is the WebKit and Firefox install, not a frontend
toolchain.

So the shard installs the dependencies itself, conditional on the binary rather
than unconditional, because on the cold-cache path setup.sh has already put them
there and `npm ci` would delete and refetch them. The step then checks the binary
actually arrived, since a silent install would surface later as a Playwright
timeout rather than as a missing toolchain.

start_vite now refuses up front with the cause and the remedy. "vite exited with
code 127" reads as a vite crash; the toolchain was never installed, and the two
must not look the same. This is what made the failure look like flake: identical
job, identical commit, green or red depending on a cache key.

While here, the wildcard-host detector added in #9623 only matched a command at
the start of a line, so `UNSLOTH_STUDIO_PASSWORD=... unsloth studio -H 0.0.0.0`
in the Launch section passed the guard. It now matches the command anywhere on
the line. Twelve fixtures pin what the detector must catch and must not, because
every negative assertion in that file passes when the detector sees nothing: a
detector that quietly stops matching turns the whole file green while guarding
nothing.
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.

3 participants