OpenProgram Docs

Upgrade source checkouts

A gated git pull and restart: a bad commit fails in a throwaway process rather than in the service you would use to fix it. For Desktop and managed releases, including v0.6.6 to v0.7.0: Upgrade.

GoalCommand
What would change? Read-onlyopenprogram upgrade status--json: head_sha, target_sha, update_available
Print the planopenprogram upgrade --dry-run
Do itopenprogram upgrade

Steps

StepDoesFails with
1 preflightRefuses a dirty tree, resolves the target, asks before a downgradedirty-worktree, downgrade-needs-confirmation
2 checkoutFast-forwards to the targetcheckout-failed
3 depspip install -e . if pyproject.toml or setup.py changed; npm ci if package-lock.json changeddeps-failed
4 buildRebuilds apps/web or apps/cli if that workspace or package-lock.json changedbuild-failed
5 probeBoots the new code on a scratch port under an isolated profile, waits for /healthz, runs doctor, kills itprobe-failed
6 restartRestarts the real servicerestart-failed
7 verifyPolls until the service reports the new commitverify-failed

The running service is untouched before step 6. The first failure stops the chain, prints the code and exits non-zero. Progress: ~/.openprogram/upgrade-state.json.

When a step fails

CodeWhat to do
dirty-worktreeCommit your changes
downgrade-needs-confirmationThe target is older, and old code may not read config written by new code. --yes if you mean it
probe-failedThe new code does not boot. Nothing restarted; the fix belongs upstream
verify-failedThe restart happened but the service does not report the new commit. No automatic rollback; run the printed command: git -C <repo> checkout <previous-sha> && openprogram restart

Flags

FlagEffect
--dry-runPlans only; changes no checkout, worker or upgrade state. An explicit --channel is still persisted
--no-restartStops after the probe. The checkout moves; the service keeps old code until you restart it
--yes, -yAllows a downgrade
--channel NAMEFollows another line and persists it as update.channel. Only stable, which here tracks origin/main, is built in. It is not the stable GitHub Release
--jsonMachine-readable result with every step
Sample output
$ openprogram upgrade status
  channel        stable (origin/main)
  head           f5671fd25e4c6ae89e6d77f3fcffc4d4a2c0570a
  target         a2d7f95633527e182ac850e40aca727aa0f6a3e6
  update         available

$ openprogram upgrade --dry-run
  [OK  ] preflight  stable → origin/main: 80d77d1ed44c → 1a4101433b13
  [OK  ] checkout   planned (dry run)
  [OK  ] deps       planned (dry run)
  [OK  ] build      planned (dry run)
  [OK  ] probe      planned (dry run)
  [OK  ] restart    planned (dry run)
  [OK  ] verify     planned (dry run)

openprogram update (--check, --force) is a leftover that raises ImportError. Use openprogram upgrade.

Troubleshooting

Last updated · 2026-11-25