Reference·UpdatesIndex

Updates

The update command, the update config keys, channels, staging, the hot and restart paths, and manual steps.

.mdllms.txt
a shell
nodecode update [VERSION] [--check]

Command

FormDoes
nodecode updateMoves to the latest release on the configured channel.
nodecode update VERSIONMoves to that release label.
nodecode update --checkStages and classifies the release. Applies nothing.
CaseResult
An organism serves this homeIt takes the update itself. The command prints its answer.
No organism runsThe release is staged and linked. The next launch runs it.
Already on that releasePrints already at LABEL.
The binary and the organism differPrints one line for each.

An organism is a running Nodecode. One update runs at a time. An error exits with code 1.

Config keys

Set these under update in ~/.nodecode/config.jsonc.

KeyValuesDefault
update.modeauto, ask, offauto on an installed build. off on a source build.
update.channelA channel namestable
update.check_minutesInteger, 1 or more360 with a release feed. 30 without one.
update.urlA release hostThe host this build was installed from. Else https://preview.nodecode.ai/dl.
update.feedA feed host, or offThe release host. off when the host is a folder.
~/.nodecode/config.jsonc
{
  "update": { "mode": "ask", "channel": "stable" }
}
ModeDoes
autoStages and applies each new release.
askStages the release. Posts a notice. nodecode update applies it.
offNever looks. No release note is reported.

An installed build runs from the installer's layout, beside a current link. NODECODE_BASE_URL overrides the built-in host. See Config.

Channels

A channel is one pointer file per platform on the release host:

a shell
<host>/<channel>-<arch>-<os>
PlatformPointer on stable
Linux x86_64stable-x86_64-linux
macOS Apple Siliconstable-arm64-darwin
Windows x86_64stable-x86_64-windows

The pointer holds one release label. The installer reads the same file.

CheckWhen
First look30 seconds after the gateway starts.
PollEvery update.check_minutes.
Release feedOne open connection to the feed host. A new label triggers a check at once.

Windows: the default poll is 30 minutes.

Staging

Staging runs the installer that shipped with the build, in stage mode.

  1. Download the release archive.
  2. Check its sha256.
  3. Lay it out in <release-dir>/<label>/, beside the running build.
  4. Run the staged executable with --help.

current does not move. Nothing restarts. A failure stops here with the installer's last line as the reason. The installer may run for 30 minutes at most.

After staging, Nodecode compares the staged source with its own, definition by definition. The verdict is same, hot or restart.

Hot path and restart path

Changed formPath
defun, defmethod, defvar, defparameter, defsetf, define-*, defclassHot
Any new definitionHot
A changed defmacro or inline functionHot. Every definition that uses it is evaluated again.
defstruct, define-recordRestart
defpackage, defconstant, deftypeRestart
define-kind, the store schemaRestart
A defgeneric whose lambda list changedRestart
Code outside any definitionRestart
A new system dependencyRestart
StepHot releaseRestart release
Live imageEvery changed definition is evaluated. All or nothing.Every definition that can go live is evaluated. The rest waits.
current linkMoves to the new release.Moves to the new release.
Attached shellsEvaluate the same changes.Evaluate the same changes. Boot state waits for their next launch.
RestartNone.See below.
RecordAn organism.upgraded fact.An organism.upgraded fact.

Restart on the restart path:

Organism runs asResult
The background gateway (nodecode gateway on)It checks every 5 seconds. It exits when no turn runs. The unit starts it on current.
A shell, or nodecode serveThe new build runs at the next launch.

A running turn is never interrupted.

If the live image refuses a release, nothing changes in the image. The release is linked for the next launch. The poller does not try it again.

After an update the model reports the new version and the changes once.

Rollback

FailureWhat happens
A staged build does not answer --helpRefused at staging. Nothing moved.
A hot load failsThe image is restored. The release is linked for the next launch.
A new build fails to serve after a restartNo automatic recovery.

Go back by hand:

a shell
nodecode update OLD-LABEL

If nodecode itself does not start, reinstall the old release:

a shell
curl -fsSL https://nodecode.ai/install.sh | NODECODE_VERSION=OLD-LABEL sh

Not automated

  • Rollback after a restart onto a build that does not serve.
  • Rollback after a store migration. Copy ~/.nodecode/history.db before an update you may want to reverse, or run /backup.
  • Updates of a source build. update.mode is off there. Run just release to rebuild.
  • Updates of cells from the hub. nodecode update moves the core and the shipped cells only.

Run the installer again to upgrade from outside. It restarts a running background gateway on the new build. See Install.

Esc

    Loading the index…

    ↑↓ moveEnter openEsc close