Repository navigation
studio: explicit Cloudflare tunnel notice and public-exposure warning at startup - #6515
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the startup banner to explicitly report the status of the Cloudflare tunnel (ON, OFF, or FAILED) and warns users about public exposure when the tunnel is active (unless running in secure mode). It also updates the CLI help text and adds corresponding unit tests. The reviewer noted that the run command in unsloth_cli/commands/studio.py bypasses this new logic because its custom startup banner does not call _print_cloudflare_line(), leading to inconsistent behavior and missing warnings.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b33083cc7b
ℹ️ 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".
1fe1d9a to
d52710c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d52710ca47
ℹ️ 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".
d52710c to
7e9f613
Compare
7e9f613 to
d85eadf
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…re on startup The startup banner only printed a line when a tunnel URL was up, so a plain `unsloth studio -H 0.0.0.0` launch silently created a public trycloudflare.com URL with no indication that Studio had become reachable from the internet. The only hint at the tunnel was the CLI help, shown when an invalid command was typed. Make the banner always state the tunnel state for wildcard binds: - ON: the public URL plus a warning that anyone with it can reach Studio from outside the network, and that --no-cloudflare keeps it local-only. - FAILED: requested but did not start (local network only). - OFF: --no-cloudflare was passed (local network only). Secure mode keeps its existing wording (the authenticated tunnel is intended and --no-cloudflare is not valid there). Clarify the --cloudflare help text in both the argparse and typer definitions. Default behavior is unchanged. Also surface the state on the `unsloth studio run` banner, which runs the server with silent=True and prints its own banner: it now calls _print_cloudflare_line too, so the ON/OFF/FAILED notice and public-exposure warning are no longer skipped on that path (previously it only echoed the URL when a tunnel was up). For the OFF and FAILED notices, do not claim "local network only" when the reachability probe just confirmed the raw port is reachable from the public internet: --no-cloudflare and a failed tunnel disable only the Cloudflare link, not the wildcard bind, so the message is reworded to flag the public raw port.
d85eadf to
ea1bebe
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88b3eca325
ℹ️ 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".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Pushed Summary:
Validation:
|
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request extends Cloudflare tunnel support to wildcard binds (including :: in addition to 0.0.0.0) and enhances the startup banner to display detailed, colorized warnings about public reachability and tunnel status. It also updates corresponding CLI help messages and expands the test suite. Feedback on these changes suggests highlighting a security warning in run.py with the warn style and dynamically including the host variable. Additionally, the reviewer recommends refactoring fragile tests in test_cloudflare_tunnel.py and test_studio_cloudflare_flag.py that rely on literal string matching and AST parsing of source code to use more robust testing patterns.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Code Review
This pull request updates the Cloudflare tunnel startup logic to support IPv6 wildcard binds ("::") alongside "0.0.0.0", refactors the startup banner output to clearly communicate the tunnel's status and security implications, and adds corresponding unit tests. The reviewer feedback suggests improving the security warning when the tunnel is disabled by applying the warning style and dynamically resolving the loopback address, as well as centralizing the external host check into a helper function rather than hardcoding specific wildcard IP checks.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09fb7c6619
ℹ️ 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".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Pushed Summary:
Validation:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
# Conflicts: # studio/backend/run.py
Problem
On a wildcard bind (
-H 0.0.0.0), Studio starts a Cloudflare quick tunnel by default, but the startup output only printed a line when a URL was present. A user running on a local network behind a firewall had no clear signal that Studio had become reachable from the public internet through atrycloudflare.comURL.Change
_print_cloudflare_line()now always prints the tunnel state at startup:--no-cloudflare.--cloudflarehelp text inrun.pyargparse and bothunsloth_clityper options to state it defaults on and exposes Studio publicly.Validation
test_cloudflare_tunnel.pyandtest_secure_tunnel_gate.pyto cover the ON / OFF / FAILED strings and the secure-mode path.-H 0.0.0.0 --no-cloudflareand confirmed the disabled notice.