Upgrade an application
Move your application to the next OpenLup release while reconciling package, SQL and application-file changes.
Read the stability policy and contracts for the release you intend to install, including the database compatibility limits.
Read the changes
Read every package's CHANGELOG.md, including each Migration: block between
your installed and target releases. Use the per-release notes
as the starting point; older entries may be in the package's
CHANGELOG-HISTORY.md at that release tag.
Starter upgrade order
For each adjacent release hop in a starter application:
- Stop the application and keep exclusive access to its files.
- Install the exact target release's
openlupCLI in a separate scratch directory or pristine target extraction. Use that CLI for this hop. - Reconcile owned files as directed by the target release notes
and prepare the exact predecessor and target snapshots. Follow the
snapshot instructions for a customized inventory
if you changed
ownership.json. - Apply any documented pre-file SQL through your migration chain, including the native checkout-attempt ledger prerequisite when applicable. If range admission needs a supported forward, apply it through the same chain. Observe the applied migration count after any such forward, using the actual database and installation profile.
- Reconcile application files using the target CLI. Plan, resolve the reported conflicts and replan. Apply the final snapshot pair and confirm replay makes no further changes. Finish any ownership inventory reconciliation before refreshing dependencies. See the 1.4.0 release notes to repair permissions on files created by earlier upgrades.
- Refresh the application's package pins, lockfile and installation to match
the reconciled manifest. Pin every
@openlup/*package in use to the same exact target version. - Complete the remaining documented SQL and explicit policy installation steps. Check readiness before restarting the application.
Upgrade the packages together
For an npm-only upgrade, pin every @openlup/* package your application uses to
the same exact version.
Choose the target release explicitly. With OPENLUP_VERSION set to that
version, an application using all the packages runs:
npm install --save-exact "@openlup/core@$OPENLUP_VERSION" "@openlup/outbox@$OPENLUP_VERSION" "@openlup/platform@$OPENLUP_VERSION"
Include only the packages your application uses, keeping their versions equal. See Keep the packages together.
Apply SQL through your migration chain
Apply the database changes your selected packages require through your application's migration chain, as described in Upgrade the database. Importing a package does not apply SQL.
Reconcile application files
Plan, reconcile and apply snapshot-managed application files with
openlup upgrade plan and openlup upgrade apply, as described in
Upgrade application files. Supply the applied migration
count observed for the actual database and installation profile. These commands
run no SQL and do not observe the database.
Use --json for a structured report.
For a target CLI up to and including 1.3.0, read plan.conflicts from upgrade plan
and top-level conflicts from a refused upgrade apply; from 1.4.0, read the
top-level conflicts key from both.
Reconcile a customized ownership inventory
- When preparing snapshots, save your application's
ownership.json. Build them from the exact predecessor and target extractions. Exclude generated and locally owned paths, including ejected copies. Include new owned files only as documented target-only creations in the target release notes. - During file preflight, restore the exact predecessor
ownership.jsonin the app. Resolve the reported conflicts, including an occupied settings binding path when applicable, and replan before apply writes any files. Keep the final pair identical for apply, resume and replay. - After replay, reattach the saved app-owned entries and exclusions to the resulting inventory. Check that the app's owned and generated paths stay out of its managed list. Use fresh predecessor and target evidence for each hop.
Check readiness
If your app has an owned settings binding, validate its business configuration
offline with ./node_modules/.bin/openlup settings check --app ./owned/settings-host.ts
or pass check to your starter's settings script. Do this before running full
tests and starting the application. See Configure settings.
If your custom readiness observer calls the starter's native composition, see the 1.2.0 argument order.
Create an application-owned module exporting createVerificationInput() that
returns your actual ReadinessInput: selected contributions, complete installed
package inventory, candidate identity, bindings and a read-only schema observer.
Set APP_OBSERVATIONS to its path, then run:
./node_modules/.bin/openlup verify --app "$APP_OBSERVATIONS" --json
The command imports explicitly trusted application code without a sandbox. That module must assemble observations and read-only probes, avoid writing to stdout, and close its resources. Verification invokes only the supplied schema observer; it does not execute handlers, routes, schedules, migrations or installs. It does not prove SQL behavior, permissions, provider delivery or live scheduling.
Only ready admits the exact candidate; retain the serving candidate for
unknown or unsatisfied. Repair findings and rerun verification with fresh
observations after changing artifacts, configuration or schema.
| Exit code | Meaning |
|---|---|
0 |
Upgrade completed without conflicts, or verification reports ready. |
1 |
Upgrade conflicts, or verification reports unsatisfied. |
2 |
Verification reports unknown. Without --app, OPENLUP_E_APP_UNKNOWN explains that no application observations were loaded. |
64 |
Invalid invocation or JSON: OPENLUP_E_CLI_INPUT. Correct the syntax or input. |
74 |
Operation or application-loading failure: OPENLUP_E_CLI_FAILURE. Check snapshots, filesystem access or the trusted application module. |
From 1.4.0, upgrade findings name schema-range conflicts as
OPENLUP_E_UPGRADE_SCHEMA_RANGE and managed-file conflicts as
OPENLUP_E_UPGRADE_FILE_CONFLICT. Snapshot validation failures after JSON
parsing can return 74.
Readiness findings use OPENLUP_E_PORT_MISSING, OPENLUP_E_EVENT_UNHANDLED,
OPENLUP_E_EVENT_DUPLICATE, OPENLUP_E_SCHEDULE_UNBOUND,
OPENLUP_E_SCHEMA_BEHIND, OPENLUP_E_SET_MISMATCH, OPENLUP_E_ENV_MISSING
or registry_missing_referenced_version.
Each finding includes an observation, cause, fix and recheck instruction.
Per-release notes
Each release's notes are the packages' changelogs, linked at the release tag: core, outbox and platform. Upgrading to 1.4.0, Upgrading to 1.3.0, Upgrading to 1.2.0, Upgrading to 1.1.0, Upgrading to 1.0.0, Upgrading to 0.43.0, Upgrading to 0.42.0, Upgrading to 0.41.0 and Upgrading to 0.40.0 each gather that release's notes and API report changes.
Preparing for native provider profiles
The 0.43.0 release replaces native provider identity
predicates with immutable profile data. Apply the complete selected catalogue,
including 20261121090000_payment_provider_profiles.sql, through your existing
migration runner. Do not replace historical slots or rewrite stored payment
identity, evidence, receipts or payloads. Installing packages alone applies no SQL.
The two reference profiles preserve existing preparation, claims, refund and reopening rules. Arbitrary admitted providers retain generic behavior; claims and reopening require an explicit profile declaration. A third provider needs its profile declaration plus adapter. The second reference provider's portable composition remains unsupported. Absence auto-reopen stays off by default; provider activation and live qualification remain separate.