Skip to content

Anchor the host-defaults assertions and take the file off the skip list - #7774

Merged
danielhanchen merged 3 commits into
mainfrom
fix-install-host-defaults-anchors
Aug 3, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
fix-install-host-defaults-anchors

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

tests/sh/test_install_host_defaults.sh has been on the skip list since #7431 and failing for longer, with a recorded reason that names one of three drifts. None of the three is a regression: install.sh, install.ps1 and the README all still behave the way the test intends. Every failure is in how the test carves out the text it greps.

The three failures

assertion cause
install.sh: interactive block prompts user (read) tail -50 of a 4533-line file starts at 4484; read -r _reply is at 4472. Outgrew the window in #6258.
install.ps1: interactive block prompts user (Read-Host) tail -25 of a 3141-line file starts at 3117; Read-Host is at 3108. Broke in #5190, the day after the test landed.
README: Launch section primary command has no -H 0.0.0.0 The extractor stopped at #### Update, a heading later deleted, so "the Launch section" became the rest of the file and picked up the -H 0.0.0.0 from the remote-access section 137 lines below.

Both installers are now anchored on the block's own In interactive terminals comment, so the two windows stay symmetric and survive appends. The README extractor stops at the next heading of any name.

To be explicit about the README one, since it reads alarming: the documented launch command is unsloth studio -p 8888. The -H 0.0.0.0 the test tripped on is in the deliberate #### Remote access section, which already says to use it only on a trusted network. There is no regression and nothing to change in the docs.

Two assertions that could not have failed

Worth calling out separately, because they were passing rather than failing:

  • studio/setup.sh: launch hint has no '-H 0.0.0.0' sliced tail -30, which covers lines 2339 onward. The launch hint is at 2332. The check had drifted off its target entirely.
  • install.sh: interactive block prompts user (read) greps for the substring read, which also matches readable and _can_read_tty in the same block. Deleting the prompt left it green.

Both are now pinned to what they mean to protect. Each of the six assertions was mutation-tested and fails when its target is removed:

mutation result
leak studio -H 0.0.0.0 into the install.sh window red
leak it into the install.ps1 window red
leak it into the setup.sh launch hint red
leak it into the README Launch section red
delete the install.sh prompt red
delete the install.ps1 prompt red

Off the skip list

The file passes 10/10, so it comes off the skip list in tests/run_all.sh, .github/workflows/studio-backend-ci.yml and tests/studio/test_ci_shell_suite_coverage.py. Those three have to change together, since the coverage test fails if the two runners disagree or a skip is undocumented.

tests/run_all.sh now reports 30 passed, 0 failed with no skip line, and test_ci_shell_suite_coverage.py passes 29.

test_install_host_defaults.sh has been quarantined since #7431 and failing for
longer, with a recorded reason that covers one of three drifts. None of them is
a regression: install.sh, install.ps1 and the README all still behave as the
test intends. Every failure comes from how the test carves out the text it
greps.

Both installers were sliced with a fixed tail. install.sh grew past its 50-line
window in #6258 and install.ps1 past its 25-line window in #7be1085, the day
after the test landed, so the prompt each assertion looks for sat just above the
window. Both now start at the block's own 'In interactive terminals' comment.

The README extractor stopped at a '#### Update' heading that was later deleted,
so its Launch section silently became the rest of the file and picked up the
-H 0.0.0.0 from the remote-access section 137 lines below. It now stops at the
next heading of any name.

Two assertions could not have failed. setup.sh's launch hint sits at line 2332
while tail -30 covered 2339 onward, so the negative check no longer looked at
the hint at all, and 'read' as a needle also matches 'readable' and
'_can_read_tty', so the prompt check passed with the prompt deleted. Both are
pinned to what they mean to protect; each of the six assertions now fails when
its target is removed.

With the extraction fixed the file passes 10/10, so it comes off the skip list
in run_all.sh, studio-backend-ci.yml and test_ci_shell_suite_coverage.py, which
have to change together.
The setup.sh launch-hint extraction was the only one of the four with no
positive assertion over it. The other three each pin something that must be
present, so a broken extraction fails loudly; this one had a lone
assert_not_contains, and a negative check over an empty window passes. Renaming
the printf label empties it, and the test then stays green with 0.0.0.0
hard-coded in the hint, which is the failure this PR exists to remove.

The README extractor's comment promised the next heading of any name while the
pattern only matched an h4, so demoting the following heading would widen the
window again.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: f41b14c047

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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 4413b37f33

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

@danielhanchen
danielhanchen merged commit fb8a992 into main Aug 3, 2026
19 of 22 checks passed
@danielhanchen
danielhanchen deleted the fix-install-host-defaults-anchors branch August 3, 2026 09:42
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