From 2d79699fdea5ac1b1064f76b91b864718caea518 Mon Sep 17 00:00:00 2001 From: Alibek Tokayev Date: Wed, 25 Nov 2026 11:35:05 -0600 Subject: [PATCH 1/3] [CLI] Surface Terms of Service link in login and version banner Add the Terms of Service URL to the CLI so users can find the terms without acceptance being required: - New CENTML_TERMS_OF_SERVICE_URL setting (env-overridable), defaulting to https://app.centml.com/terms-of-service/ - login prints a "By continuing, you agree to the Terms of Service" notice before the browser prompt (only when a login is needed) - The --version banner shows a Terms of Service line No acceptance step is added; this is informational only. Co-Authored-By: Claude Opus 4.8 --- centml/cli/login.py | 1 + centml/cli/main.py | 3 ++- centml/sdk/config.py | 3 +++ tests/test_cli_terms.py | 30 ++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 tests/test_cli_terms.py diff --git a/centml/cli/login.py b/centml/cli/login.py index 9c9c059e..9701fc70 100644 --- a/centml/cli/login.py +++ b/centml/cli/login.py @@ -96,6 +96,7 @@ def login(token_file): click.echo("✅ Login successful") else: click.echo("Logging into CCluster...") + click.echo(f"By continuing, you agree to the Terms of Service: {settings.CENTML_TERMS_OF_SERVICE_URL}\n") choice = click.confirm("Do you want to log in with your browser now?", default=True) if choice: diff --git a/centml/cli/main.py b/centml/cli/main.py index 504ea4fe..944293b6 100644 --- a/centml/cli/main.py +++ b/centml/cli/main.py @@ -3,6 +3,7 @@ from centml.cli.login import login, logout from centml.cli.cluster import ls, get, delete, pause, resume, capacity from centml.cli.shell import shell, exec_cmd +from centml.sdk.config import settings # NVIDIA green (#76B900) _NVIDIA_GREEN = (118, 185, 0) @@ -21,7 +22,7 @@ ✨ AI Deployment Made Simple ✨ 📚 Documentation: https://docs.nvidia.com/ccluster 💬 Need help? Reach out on GitHub: https://github.com/NVIDIA/ccluster -""" +📄 Terms of Service: """ + settings.CENTML_TERMS_OF_SERVICE_URL + "\n" @click.group() diff --git a/centml/sdk/config.py b/centml/sdk/config.py index 55b440fa..0caa4a39 100644 --- a/centml/sdk/config.py +++ b/centml/sdk/config.py @@ -9,6 +9,9 @@ class Config(BaseSettings): model_config = SettingsConfigDict(env_file=Path(".env"), extra="ignore") CENTML_WEB_URL: str = os.getenv("CENTML_WEB_URL", default="https://app.centml.com/") + CENTML_TERMS_OF_SERVICE_URL: str = os.getenv( + "CENTML_TERMS_OF_SERVICE_URL", default="https://app.centml.com/terms-of-service/" + ) CENTML_CONFIG_PATH: str = os.getenv("CENTML_CONFIG_PATH", default=os.path.expanduser("~/.centml")) CENTML_CRED_FILE: str = os.getenv("CENTML_CRED_FILE", default="credentials.json") CENTML_CRED_FILE_PATH: str = os.path.join(CENTML_CONFIG_PATH, CENTML_CRED_FILE) diff --git a/tests/test_cli_terms.py b/tests/test_cli_terms.py new file mode 100644 index 00000000..58167a4d --- /dev/null +++ b/tests/test_cli_terms.py @@ -0,0 +1,30 @@ +from unittest.mock import patch + +from click.testing import CliRunner + +from centml.cli.main import cli +from centml.sdk.config import settings + +TOS_URL = settings.CENTML_TERMS_OF_SERVICE_URL + + +def test_version_shows_terms_url(): + result = CliRunner().invoke(cli, ["--version"]) + assert result.exit_code == 0 + assert TOS_URL in result.output + + +def test_login_shows_terms_url_when_not_authenticated(): + with patch("centml.cli.login.auth.load_centml_cred", return_value=None): + result = CliRunner().invoke(cli, ["login"], input="n\n") + assert TOS_URL in result.output + assert "Terms of Service" in result.output + + +def test_login_with_stored_credentials_skips_terms_notice(): + with patch("centml.cli.login.auth.load_centml_cred", return_value={"refresh_token": "x"}), patch( + "centml.cli.login.auth.refresh_centml_token", return_value=True + ): + result = CliRunner().invoke(cli, ["login"]) + assert "Login successful" in result.output + assert TOS_URL not in result.output From 78d0cba7c4939361eccef3e2200bc05e91238177 Mon Sep 17 00:00:00 2001 From: Alibek Tokayev Date: Wed, 25 Nov 2026 11:41:16 -0600 Subject: [PATCH 2/3] Add CODEOWNERS with Platform team as default owner Request the Platform team for review on every pull request. Co-Authored-By: Claude Opus 4.8 --- .github/CODEOWNERS | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..29a1e216 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,6 @@ +# Code owners for this repository. +# These owners are the default for everything in the repo and are +# automatically requested for review on every pull request. +# See https://docs.github.com/articles/about-code-owners + +* @CentML/platform-team From 08b7d052dfa8d9a0cb76d2bee1faaae2befb266a Mon Sep 17 00:00:00 2001 From: Alibek Tokayev Date: Wed, 25 Nov 2026 11:43:40 -0600 Subject: [PATCH 3/3] Collapse CODEOWNERS whitespace to a single space Co-Authored-By: Claude Opus 4.8 --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 29a1e216..7608b0d9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,4 +3,4 @@ # automatically requested for review on every pull request. # See https://docs.github.com/articles/about-code-owners -* @CentML/platform-team +* @CentML/platform-team