Skip to content

feat: rename cua-train to cua-cloud in cyclops-cs and all usages#2026

Open
r33drichards wants to merge 2 commits into
mainfrom
f/cua-647-rename-cua-train-to-cua-cloud-in-cyclops-cs-and-all-usages
Open

feat: rename cua-train to cua-cloud in cyclops-cs and all usages#2026
r33drichards wants to merge 2 commits into
mainfrom
f/cua-647-rename-cua-train-to-cua-cloud-in-cyclops-cs-and-all-usages

Conversation

@r33drichards

@r33drichards r33drichards commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Renames cua-train to cua-cloud throughout the repository, as per CUA-647.

Context

  • cua cloud is considered a better name than cua train
  • The cloud component is currently not implemented and may become a new provider
  • A cua-train PyPI stub exists today for packaging infrastructure, but the preferred product/package direction is cua cloud

Changes

Package rename

  • libs/python/cua-train/libs/python/cua-cloud/
  • Python package src/cua_train/src/cua_cloud/

Source code

  • Renamed TrainClientCloudClient in client.py and __init__.py
  • Updated module docstrings from cua-train to cua-cloud
  • Updated __all__ export

Configuration

  • pyproject.toml: name = 'cua-cloud', packages = ['src/cua_cloud']
  • .bumpversion.cfg: tag_name = cloud-v{new_version}, updated commit message
  • README.md: Updated install command, import, and usage examples

CI/CD

  • Renamed .github/workflows/cd-py-train.ymlcd-py-cloud.yml
    • Updated workflow name, tag pattern (cloud-v*), package_name, package_dir, base_package_name
  • Updated .github/workflows/release-bump-version.yml:
    • Replaced pypi/train option with pypi/cloud
    • Updated directory mapping (libs/python/cua-cloud)
    • Updated version capture step

Closes CUA-647

Summary by CodeRabbit

  • New Features

    • Added support for the new cloud Python package and release flow.
    • Updated package setup so users can install and use the cloud client.
  • Documentation

    • Refreshed the README with cloud-specific installation and client usage examples.
    • Added sample interactions for control-plane and data-plane workflows.
  • Chores

    • Updated release and version-bumping automation to recognize cloud package versions and tags.

@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 26, 2026 6:36pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e63f051-c266-4de0-a726-43e2210c3935

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR renames the Python package and client from train to cloud, updates the release and version-bump workflows to use cloud tags and paths, and refreshes the README examples for the new package.

Changes

Cloud package rename and release automation

Layer / File(s) Summary
Package rename and public client
libs/python/cua-cloud/pyproject.toml, libs/python/cua-cloud/README.md, libs/python/cua-cloud/src/cua_cloud/*
cua-cloud becomes the package name, CloudClient becomes the exported client, and the README examples switch to the cloud package and client APIs.
Cloud bump-version dispatch
.github/workflows/release-bump-version.yml
pypi/cloud is added to the dispatch input, mapped to libs/python/cua-cloud, and its bumped version is read from libs/python/cua-cloud/pyproject.toml.
Cloud CD tag and release wiring
.github/workflows/cd-py-cloud.yml, libs/python/cua-cloud/.bumpversion.cfg
The CD workflow now handles cloud-v* tags, parses cloud-v<semver> versions, wires cloud publish/release inputs, and the bumpversion templates emit cloud tag and commit messages.

Sequence Diagram(s)

sequenceDiagram
  participant GitHub
  participant "cd-py-cloud.yml"
  participant "py-reusable-publish.yml"
  participant "reusable GitHub release workflow"
  GitHub->>cd-py-cloud.yml: trigger on refs/tags/cloud-v*
  cd-py-cloud.yml->>cd-py-cloud.yml: parse cloud-v<semver>
  cd-py-cloud.yml->>py-reusable-publish.yml: package_name=cloud, package_dir=libs/python/cua-cloud
  cd-py-cloud.yml->>"reusable GitHub release workflow": tag cloud-v${version}, module_path=libs/python/cua-cloud
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • trycua/cua#1918: Similar PyPI release automation changes, including the release-bump-version.yml service handling and cua_train package export updates.

Poem

I hopped from train to cloud so bright,
With CloudClient purring just right.
🐇 Tags bloom blue in the CI breeze,
And release carrots rustle with ease.
Hop hop — the cloud is in flight!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and accurately summarizes the main change: renaming cua-train to cua-cloud across the repository.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch f/cua-647-rename-cua-train-to-cua-cloud-in-cyclops-cs-and-all-usages

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copy link
Copy Markdown
Collaborator Author

fix merge conflicts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/cd-py-cloud.yml (1)

37-42: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Avoid interpolating ${{ github.ref }} directly into the run shell.

The expression is expanded into the script before bash executes, so a maliciously crafted tag/ref can break out of the string and inject shell. Pass it through env and reference the shell variable in the regex instead. zizmor flags this as template-injection.

🔒 Proposed fix
       - name: Determine version
         id: get-version
+        env:
+          GITHUB_REF_NAME_RAW: ${{ github.ref }}
         run: |
           if [ -n "${{ inputs.version }}" ]; then
             VERSION=${{ inputs.version }}
           elif [ "${{ github.event_name }}" == "push" ]; then
-            if [[ "${{ github.ref }}" =~ ^refs/tags/cloud-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
+            if [[ "$GITHUB_REF_NAME_RAW" =~ ^refs/tags/cloud-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then
               VERSION=${BASH_REMATCH[1]}
             else
               echo "Invalid tag format for cloud"
               exit 1
             fi
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/cd-py-cloud.yml around lines 37 - 42, The tag validation
in the workflow script is vulnerable because github.ref is interpolated directly
into the shell. Update the cloud version parsing step to pass github.ref through
env in the job or step, then use the shell variable inside the regex check
instead of embedding the expression in the run block. Keep the logic in the same
tag-matching branch so VERSION is still extracted from the validated ref safely.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/cd-py-cloud.yml:
- Around line 37-42: The tag validation in the workflow script is vulnerable
because github.ref is interpolated directly into the shell. Update the cloud
version parsing step to pass github.ref through env in the job or step, then use
the shell variable inside the regex check instead of embedding the expression in
the run block. Keep the logic in the same tag-matching branch so VERSION is
still extracted from the validated ref safely.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8e54241-3922-42f7-abd3-44085f677d69

📥 Commits

Reviewing files that changed from the base of the PR and between 9e84c1d and bf7fa44.

📒 Files selected for processing (8)
  • .github/workflows/cd-py-cloud.yml
  • .github/workflows/release-bump-version.yml
  • libs/python/cua-cloud/.bumpversion.cfg
  • libs/python/cua-cloud/README.md
  • libs/python/cua-cloud/pyproject.toml
  • libs/python/cua-cloud/src/cua_cloud/__init__.py
  • libs/python/cua-cloud/src/cua_cloud/client.py
  • libs/python/cua-train/src/cua_train/__init__.py
💤 Files with no reviewable changes (1)
  • libs/python/cua-train/src/cua_train/init.py

@r33drichards r33drichards force-pushed the f/cua-647-rename-cua-train-to-cua-cloud-in-cyclops-cs-and-all-usages branch 2 times, most recently from cfc7738 to 5413126 Compare June 25, 2026 07:11
@r33drichards

Copy link
Copy Markdown
Collaborator Author

CI / CodeRabbit Follow-up

Addressed all feedback and resolved merge conflicts:

CodeRabbit nitpick (security)

  • Fixed template injection in .github/workflows/cd-py-cloud.yml: moved ${{ github.ref }}, ${{ github.event_name }}, and ${{ inputs.version }} out of the shell script body and into the step env: block, then referenced them as shell variables. This eliminates the zizmor-flagged template-injection vector.

Merge conflict

  • Resolved conflict in libs/python/cua-cloud/pyproject.toml (version bump 0.1.10.1.2 from upstream cua-train bump)
  • Rebased branch onto latest main

Commits pushed:

  • bfdab0ce feat: rename cua-train to cua-cloud (rebased, conflict resolved)
  • 5413126a fix(cd-py-cloud): avoid template injection in shell script (zizmor)

@sentry

sentry Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

Caution

This repository is currently using the Sentry GitHub App to receive Codecov PR comments. This integration will be deprecated on July 8, 2026. Please install the Codecov GitHub App to continue receiving coverage reports on your pull requests.
✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@r33drichards r33drichards force-pushed the f/cua-647-rename-cua-train-to-cua-cloud-in-cyclops-cs-and-all-usages branch from 5413126 to 9e0021d Compare June 26, 2026 08:24
@r33drichards

Copy link
Copy Markdown
Collaborator Author

No CodeRabbit review comments found on this PR. PR is ready for human review. 🟢

CUA Bot and others added 2 commits June 26, 2026 18:36
- Rename libs/python/cua-train/ → libs/python/cua-cloud/
- Rename src/cua_train/ → src/cua_cloud/ (Python package)
- Rename TrainClient → CloudClient in client.py and __init__.py
- Update pyproject.toml: name = 'cua-cloud', packages = ['src/cua_cloud']
- Update .bumpversion.cfg: tag_name = cloud-v{new_version}
- Update README.md: cua-cloud, pip install cua-cloud, CloudClient usage
- Rename .github/workflows/cd-py-train.yml → cd-py-cloud.yml
  - Update workflow name, tag pattern (cloud-v*), package_name/dir/base_name
- Update .github/workflows/release-bump-version.yml:
  - Replace pypi/train option with pypi/cloud
  - Update directory mapping and version capture step

Closes CUA-647
@r33drichards r33drichards force-pushed the f/cua-647-rename-cua-train-to-cua-cloud-in-cyclops-cs-and-all-usages branch from 9e0021d to 937ca12 Compare June 26, 2026 18:36
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.

2 participants