Repository navigation
Always run full install on finalrun upgrade - #132
Conversation
Previously the upgrade subcommand auto-detected `--ci` (binary-only) mode when the runtime tarball wasn't on disk, which surfaced a confusing `(binary-only (--ci))` label in the upgrade output for users who never explicitly opted into binary-only. Drop the auto-detection and the `--ci` flag from `finalrun upgrade` entirely. Upgrade now always re-runs the full install script. Users who want a binary-only refresh can invoke install.sh directly with `--ci`, or set `CI=1` / `FINALRUN_NON_INTERACTIVE=1` — install.sh already honors those env vars. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/upgradeCommand.ts`:
- Around line 8-10: The upgrade command currently strips all FINALRUN_* env vars
except FINALRUN_DIR/FINALRUN_VERSION before spawning the installer, so
FINALRUN_NON_INTERACTIVE=1 is lost; update the env-filtering logic used in the
upgrade flow (where you build the spawn env for the installer) to preserve
FINALRUN_NON_INTERACTIVE (or translate it to set CI=1 in the child env) so that
running `FINALRUN_NON_INTERACTIVE=1 finalrun upgrade` behaves like the
documentation; adjust the code that constructs the filteredEnv/childEnv in
upgradeCommand.ts (and the similar block around lines 36-44) to include
FINALRUN_NON_INTERACTIVE (or add CI=1 when present).
🪄 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: CHILL
Plan: Pro
Run ID: 54490f95-bec1-4c64-90c7-e6d100f915c0
📒 Files selected for processing (2)
packages/cli/bin/finalrun.tspackages/cli/src/upgradeCommand.ts
💤 Files with no reviewable changes (1)
- packages/cli/bin/finalrun.ts
The upgrade command strips all FINALRUN_* env vars before spawning the installer to keep this binary's debugging overrides from leaking into the next version's install location. But the documentation and PR description both said `FINALRUN_NON_INTERACTIVE=1 finalrun upgrade` is the way to opt into binary-only mode — and the scrub silently dropped that var, so the documented escape hatch didn't work. Carry FINALRUN_NON_INTERACTIVE over alongside FINALRUN_DIR. install.sh and install.ps1 both already honor it (CI=1 still works too — it travels through unchanged because the scrub only targets FINALRUN_*). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
finalrun upgradepreviously auto-detected--ci(binary-only) mode when~/.finalrun/runtime/<version>/manifest.jsonwasn't on disk, which surfaced a confusing(binary-only (--ci))label in the upgrade output for users who never explicitly opted into binary-only.--ciflag from theupgradesubcommand.finalrun upgradenow always re-runs the full install script — same defaults as a fresh install.install.shdirectly with--ci, or setCI=1/FINALRUN_NON_INTERACTIVE=1—install.shalready honors both env vars (CI providers all setCI=1so CI runners stay binary-only without needing the upgrade shim to second-guess them).Why this is safe for users currently on binary-only
The full install path is idempotent — it checks for an existing runtime before downloading,
maybe_skip_platform_setup()skips the Android/iOS prompt when host tools are already detected, the platform prompt has a 30s timeout (won't hang), andskills updateis a no-op when up-to-date. So a user who originally chose--ciwill, on their nextfinalrun upgrade, just gain the runtime tarball + (optionally) host-tool setup — no destructive behavior.Behavior diff
finalrun upgradewith no runtime on disk--cifinalrun upgradewith runtime on diskfinalrun upgrade --ciinstall.sh | bash -s -- --ciinstead)CI=1 finalrun upgradeinstall.sh's CI auto-detectfinalrun upgrade --version 0.1.10Test plan
finalrun upgradeon a machine without the runtime tarball → installs runtime, prompts for platform, runs doctorfinalrun upgradeon a machine with the runtime → unchanged from current behaviorfinalrun upgrade --version 0.1.12→ pins installer to v0.1.12 viaFINALRUN_VERSIONenv varCI=1 finalrun upgrade→install.shenters CI mode on its own, binary-only pathfinalrun upgrade --ci→ fails with "unknown option" (flag removed)🤖 Generated with Claude Code
Summary by CodeRabbit
--cicommand-line flag from the upgrade command. The upgrade process now uses the installer's default behavior for all upgrade operations, eliminating conditional binary-only installation modes.