Repository navigation
cmux-tui-artifacts: transitional double-publish under the legacy mux/ prefix - #7716
Conversation
… prefix cmux-cloud's bootstrap and snapshot builders still curl files.cmux.com/mux/<ref>/cmux-mux-<target>; keep those URLs updating until manaflow-ai/cmux-cloud#2 switches to cmux-tui/.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe cmux-tui-artifacts.yml workflow adds a transitional step that copies built binaries and manifests, renames them from cmux-tui- to cmux-mux- prefixes, and republishes them to legacy R2 paths (mux//... and mux/latest/... on main) alongside the existing cmux-tui publish. ChangesLegacy R2 Publish Step
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 21❌ Failed checks (1 warning, 20 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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. Comment |
| for file in assets/cmux-tui-*; do | ||
| cp "$file" "$legacy_assets/$(basename "$file" | sed 's/^cmux-tui-/cmux-mux-/')" | ||
| done | ||
| cp assets/manifest.json "$legacy_assets/manifest.json" |
There was a problem hiding this comment.
Legacy manifest.json has mismatched binary names
The manifest built in the "Build manifest and checksums" step records "cmux-tui-<target>" as the keys in its binaries object (via the Python snippet that globs cmux-tui-*). This file is copied verbatim with cp assets/manifest.json "$legacy_assets/manifest.json" and then published to mux/<sha>/manifest.json. Any consumer that reads manifest.json from the legacy prefix to discover file names or verify checksums will find entries like "cmux-tui-x86_64-linux" — names that do not exist under mux/, where the actual binaries are named cmux-mux-*. The manifest and the directory contents are structurally inconsistent.
| for file in assets/cmux-tui-*; do | ||
| cp "$file" "$legacy_assets/$(basename "$file" | sed 's/^cmux-tui-/cmux-mux-/')" | ||
| done |
There was a problem hiding this comment.
Checksums file content still references
cmux-tui-* names
The checksum file cmux-tui-checksums.txt (generated by sha256sum cmux-tui-*) is included in the assets/cmux-tui-* glob, so the loop renames it to cmux-mux-checksums.txt in legacy_assets — but its internal content still reads <hash> cmux-tui-<target>. Any consumer that downloads cmux-mux-checksums.txt and runs sha256sum -c against the co-located cmux-mux-* binaries will get "no such file" errors for every entry because the names inside the file don't match the renamed binaries.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/workflows/cmux-tui-artifacts.yml:
- Around line 119-140: The legacy asset publishing flow in the workflow’s
publish_legacy_prefix path copies manifest.json and checksums unchanged, so
their contents still point to cmux-tui filenames even though the copied binaries
were renamed to cmux-mux-*. Update the content of the copied manifest.json and
cmux-mux-checksums.txt under assets-legacy after the rename loop, using a
targeted filename replacement so only asset names change and hash values remain
intact, and keep the logic localized near publish_legacy_prefix.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 669f92b2-5867-4764-ac0d-e597a8615b22
📒 Files selected for processing (1)
.github/workflows/cmux-tui-artifacts.yml
| legacy_assets="assets-legacy" | ||
| mkdir -p "$legacy_assets" | ||
| for file in assets/cmux-tui-*; do | ||
| cp "$file" "$legacy_assets/$(basename "$file" | sed 's/^cmux-tui-/cmux-mux-/')" | ||
| done | ||
| cp assets/manifest.json "$legacy_assets/manifest.json" | ||
| publish_legacy_prefix() { | ||
| local prefix="$1" | ||
| local cache="$2" | ||
| for file in "$legacy_assets"/*; do | ||
| python3 scripts/ci/upload-r2-object.py \ | ||
| --file "$file" \ | ||
| --endpoint-url "$R2_ENDPOINT" \ | ||
| --bucket cmux-binaries \ | ||
| --key "$prefix/$(basename "$file")" \ | ||
| --cache-control "$cache" | ||
| done | ||
| } | ||
| publish_legacy_prefix "mux/$GITHUB_SHA" "public, max-age=31536000, immutable" | ||
| if [ "$GITHUB_REF" = "refs/heads/main" ]; then | ||
| publish_legacy_prefix "mux/latest" "no-cache, no-store, must-revalidate" | ||
| fi |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Manifest and checksums published under legacy prefix reference wrong filenames.
manifest.json and cmux-mux-checksums.txt are copied as-is to assets-legacy/, but their content still references cmux-tui-* filenames. After the rename loop, the files alongside them are cmux-mux-*, so any consumer downloading mux/<sha>/manifest.json will see binary keys like cmux-tui-linux-x64 while the actual files are named cmux-mux-linux-x64. The same mismatch exists in the checksums file.
Since SHA256 hashes are hex strings, a targeted sed replacement is safe — it will only update filenames, not corrupt hash values.
🛠️ Proposed fix: update manifest and checksums content after copy
cp assets/manifest.json "$legacy_assets/manifest.json"
+ # Fix manifest and checksums to reference renamed cmux-mux-* binaries
+ sed -i 's/cmux-tui-/cmux-mux-/g' "$legacy_assets/manifest.json"
+ sed -i 's/cmux-tui-/cmux-mux-/g' "$legacy_assets/cmux-mux-checksums.txt"
publish_legacy_prefix() {📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| legacy_assets="assets-legacy" | |
| mkdir -p "$legacy_assets" | |
| for file in assets/cmux-tui-*; do | |
| cp "$file" "$legacy_assets/$(basename "$file" | sed 's/^cmux-tui-/cmux-mux-/')" | |
| done | |
| cp assets/manifest.json "$legacy_assets/manifest.json" | |
| publish_legacy_prefix() { | |
| local prefix="$1" | |
| local cache="$2" | |
| for file in "$legacy_assets"/*; do | |
| python3 scripts/ci/upload-r2-object.py \ | |
| --file "$file" \ | |
| --endpoint-url "$R2_ENDPOINT" \ | |
| --bucket cmux-binaries \ | |
| --key "$prefix/$(basename "$file")" \ | |
| --cache-control "$cache" | |
| done | |
| } | |
| publish_legacy_prefix "mux/$GITHUB_SHA" "public, max-age=31536000, immutable" | |
| if [ "$GITHUB_REF" = "refs/heads/main" ]; then | |
| publish_legacy_prefix "mux/latest" "no-cache, no-store, must-revalidate" | |
| fi | |
| legacy_assets="assets-legacy" | |
| mkdir -p "$legacy_assets" | |
| for file in assets/cmux-tui-*; do | |
| cp "$file" "$legacy_assets/$(basename "$file" | sed 's/^cmux-tui-/cmux-mux-/')" | |
| done | |
| cp assets/manifest.json "$legacy_assets/manifest.json" | |
| # Fix manifest and checksums to reference renamed cmux-mux-* binaries | |
| sed -i 's/cmux-tui-/cmux-mux-/g' "$legacy_assets/manifest.json" | |
| sed -i 's/cmux-tui-/cmux-mux-/g' "$legacy_assets/cmux-mux-checksums.txt" | |
| publish_legacy_prefix() { | |
| local prefix="$1" | |
| local cache="$2" | |
| for file in "$legacy_assets"/*; do | |
| python3 scripts/ci/upload-r2-object.py \ | |
| --file "$file" \ | |
| --endpoint-url "$R2_ENDPOINT" \ | |
| --bucket cmux-binaries \ | |
| --key "$prefix/$(basename "$file")" \ | |
| --cache-control "$cache" | |
| done | |
| } | |
| publish_legacy_prefix "mux/$GITHUB_SHA" "public, max-age=31536000, immutable" | |
| if [ "$GITHUB_REF" = "refs/heads/main" ]; then | |
| publish_legacy_prefix "mux/latest" "no-cache, no-store, must-revalidate" | |
| 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/cmux-tui-artifacts.yml around lines 119 - 140, The legacy
asset publishing flow in the workflow’s publish_legacy_prefix path copies
manifest.json and checksums unchanged, so their contents still point to cmux-tui
filenames even though the copied binaries were renamed to cmux-mux-*. Update the
content of the copied manifest.json and cmux-mux-checksums.txt under
assets-legacy after the rename loop, using a targeted filename replacement so
only asset names change and hash values remain intact, and keep the logic
localized near publish_legacy_prefix.
The rename (#7710) moved the R2 artifact prefix to files.cmux.com/cmux-tui/ with cmux-tui- binary names, but cmux-cloud's bootstrap/install-mux.sh and snapshot builders still curl the old mux//cmux-mux- URLs, so they would silently stop receiving updates. Double-publish copies under the legacy prefix + names until https://github.com/manaflow-ai/cmux-cloud/pull/2 switches over (commented in the workflow). Workflow-only change.
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
Low Risk
CI publish-step extension only; duplicates existing artifacts under legacy keys with no runtime or security impact.
Overview
After the normal
cmux-tui/R2 publish, the cmux-tui artifacts workflow now transitionally mirrors the same binaries under the pre-rename layout:mux/<commit>andmux/latest(onmain), with filenames rewritten fromcmux-tui-*tocmux-mux-*, plus a copiedmanifest.json.This keeps cmux-cloud bootstrap/install and snapshot builders working on
files.cmux.com/mux/...until they move to the new prefix (noted in workflow comments with a follow-up PR). Workflow-only; no application code changes.Reviewed by Cursor Bugbot for commit 694c5ec. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Temporarily double-publishes TUI artifacts to the legacy mux/ prefix with cmux-mux-* names so external consumers keep receiving updates until
cmux-cloudmigrates to cmux-tui paths. Workflow-only change.cmux-tui-*to legacycmux-mux-*and upload tomux/<sha>andmux/latestwith appropriate cache headers.cmux-cloudbootstrap and snapshot builders working until they switch tocmux-tui/.Written for commit 694c5ec. Summary will update on new commits.
Summary by CodeRabbit