Skip to content

try-pr.sh: try a pull request the cheapest way, live when it needs no build - #35450

Merged
teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/try-pr-live
Nov 4, 2026
Merged

teamleaderleo merged 2 commits into
feat-cmux-nextfrom
lane/try-pr-live

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Leo: "if you could just, hot reload and test out the f***ing fix right then and there, without much fanfare at all ... and it's still like the same kind of flow, right?"

Leo-ask: ask-ffdcb76e34

What

scripts/cmux-next/try-pr.sh <PR> is one command for trying a PR. It reads the PR's diff with git (no GitHub API), sorts it with scripts/cmux-next/live_apply.py, and takes the cheapest path:

  • web-live: runs web-overlay.sh follow <PR>, so the running app hot-reloads the PR's web UI in seconds with no build.
  • no-app (CI, tests, docs) and ios-only: reports that there is nothing to try in the Mac app.
  • daemon, swift-live, rebuild: says why it needs a new binary (a stored property, a changed signature, a new file, a resource), and with --build requests the same fleet dev build as today, tagged pr-<N>.

--dry-run prints the verdict and the command without running it. The rules come from the live-apply study of 8,315 merged PRs: 66% of NEXT-era PRs that touch the app needed no new binary, and most of those are web changes. The hot-reload doc gets a row and a section.

Not in this PR: injecting Swift into the app itself. The view shell has live code today (#35314), but the app is not linked for it yet. For a body-only Swift change the script says it is injectable later and needs a dev build for now.

Verification

Observed / Not run

Not run: web-overlay.sh follow on a Mac against a live app. That path is the existing, unchanged script. A real --build submission was not run either.

Changelog

none

🤖 Generated with Claude Code
Agent session: agent session


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Adds scripts/cmux-next/try-pr.sh <PR> and live_apply.py for trying a pull request without waiting for a build when none is needed. The script reads the PR's diff with git, classifies it with live_apply.py, and takes the cheapest path: web-only changes go straight to web-overlay.sh follow for live hot-reload, CI/tests/docs changes report nothing to try, and daemon, Swift, or resource changes say why they need a new binary (with --build requesting the fleet dev build tagged pr-<N>). --dry-run prints the verdict and command without running.

Addresses review follow-ups: lockfiles, bundled scripts, and web config (like vite.config.mjs) no longer fall into no-app—the extension rule now runs after the web, resource, and Rust rules. The hot-reload doc gives honest numbers (about half of recent NEXT-era PRs need no new binary) and stops counting swift-live as needing no build. --port with no value prints usage. All 10 tests pass, including dry runs on several merged PRs.

Written for commit 89ae0b8. Summary will update on new commits.

View guided diff Turn on auto-fix

… build

scripts/cmux-next/try-pr.sh PR reads the PR's diff with git and sorts it with
live_apply.py (the rules from the 8,315-PR live-apply study). A web-only PR goes
straight to web-overlay.sh follow, so the running app hot-reloads it with no
build; a CI/tests/docs PR is nothing to try; a daemon, Swift or resource change
says why it needs a new binary and, with --build, requests the fleet dev build
tagged pr-N.

Tests: python3 -m unittest scripts/cmux-next/tests/test_live_apply.py (10 pass);
dry runs on #35314 (rebuild), #35408 (no-app), #35206 and #35205 (web-live).

Leo-ask: ask-ffdcb76e34

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f164a6206bf2ef9c6b7d
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 89ae0b8: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr35450 -f ref=lane/try-pr-live -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 08052d3 to compare; do not merge until green; see lane-rules

Shipped in:

…honest doc numbers

Review follow-ups on #35450: the extension rule now runs after the web, resource
and Rust rules, the doc no longer counts swift-live as needing no binary, and
--port with no value prints usage.

Leo-ask: ask-ffdcb76e34

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-f164a6206bf2ef9c6b7d
@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent claude-opus-5.5 medium): SHIP at 89ae0b8

Checked: bash on 3.2 (empty arrays under set -u, quoting), the fetch and merge-base range, the classifier order after the fix, and that the docs match the behaviour. Unit tests and dry runs pass.

Follow-ups: webviews/*.md and non-Rust tooling under cmux-tui/ get a heavier verdict than they should (safe side); use the PR's own base rather than feat-cmux-next; take the merge-base from FETCH_HEAD; Swift rule misses (multi-line signatures, nested stored properties, didSet, tabs) before swift-live drives injection.

@github-actions github-actions Bot removed the risk:low Risk tier (docs/ci/risk-tiers.md) label Nov 4, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Found 10 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmp534aqc5t/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpulnwynfv/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
imported web bundle inputs are not routed:/imported web bundle inputs are not routed: View Logs
nightly cmux-tui resolve/nightly cmux-tui resolve View Logs
nightly.yml must not read vars.NIGHTLY_SIGN while nightly-sign.yml is in shadow mode/
nightly.yml must not read vars.NIGHTLY_SIGN while nightly-sign.yml is in shadow mode
View Logs
the short nightly decide gate must use the pooled Linux route with a Blacksmith fallbac
k/
the short nightly decide gate must use the pooled Linux route with a Blacksmith fallbac
k
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 89ae0b8

Reviewer: codex gpt-6-astra high, fast tier.

Follow-ups: 1. They land as checklist items in this PR's one follow-up tracking issue in this repo (Follow-ups: #N ..., label follow-up; add to an open one before filing, never one issue per finding), linking this receipt; the lane that opened the PR fixes them forward.

SHIP at 89ae0b8

Visual verdict: no images; Leo tries the build

  • [P2] [follow-up] [category:correctness] [finding:F1] [outcome:pending] scripts/cmux-next/live_apply.py:35: REBUILD_FILE only matches /Resources/, so root bundled paths such as Resources/foo.sh fall through to NOAPP_EXT and are classified no-app. The app bundles root Resources/; those changes should request a rebuild.

Focused unit tests, syntax checks, and diff checks pass.

Follow-ups:

  • [finding:F1] Include root-level Resources/ in resource detection.

@cmux-bot cmux-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cmux-bot approves 89ae0b8: an independent review passed this exact head (router-review receipt by teamleaderleo). A push needs a new review; a later BLOCK at this head dismisses this approval.

@teamleaderleo
teamleaderleo merged commit fb6e933 into feat-cmux-next Nov 4, 2026
190 of 194 checks passed
@teamleaderleo
teamleaderleo deleted the lane/try-pr-live branch November 4, 2026 13:58

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 89ae0b8f Deployed Nov 4, 2026 by teamleaderleo via wait for same-key tree publisher #111896
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant