Skip to main content

Module update_manifest

Module update_manifest 

Source
Expand description

The signed manifest of a release’s files (docs/specs/SPEC_SIGNED_UPDATE_CHECKSUMS_2026_10_25.md).

A release publishes three small files beside its downloads: a manifest (every file with its size and SHA-256), an envelope that names the manifest by its hash and the release by its tag, and a signature of the envelope’s exact bytes. AgentMux pins the public key and takes a release file’s name, size and hash only from a manifest that verify_release passed, so a file that didn’t come out of the release pipeline (a swapped asset, a rewritten API answer) is never offered, downloaded or run.

This module only checks bytes it is given: fetching them, and what the person is told, are the update check’s (srv::backend::update::check). The release workflow makes and verifies the same files with scripts/release-manifest.mjs; tests::a_release_made_by_the_script_verifies pins the two to one format.

Structs§

Envelope
What is signed: a release’s tag and the hash of its manifest.
Manifest
A release’s files, and the images it built. Older manifests have no images, and an app older than the field ignores it.
ManifestFile
One release file, as the pipeline made it.
ManifestImage
A container image the release built, named by the digest of its content: whatever a registry serves under a tag, the image at this digest is the one the pipeline made.
UpdateKey
A public key the app trusts to sign releases, with the id signature lines name it by.

Enums§

Outcome
What the signed manifest said about a release file.
SharedStoreChanged
Whether the release changes a shared store’s schema (upgrade.shared_store_changed).
SignedFloor
The upgrade floor a verified manifest carries.
VerifyError
Why a release’s manifest isn’t trusted.

Constants§

ENVELOPE_FORMAT
The envelope’s format, the only one understood.
FIRST_SIGNED
The first release the pipeline signs (v0.60.4). From it on, a release without a verified signed manifest is not installed; an older one never had one.
MANIFEST_FORMAT
The manifest’s format, the only one understood.
MAX_ENVELOPE_BYTES
The most bytes read for an envelope: it is a fixed handful of fields.
MAX_MANIFEST_BYTES
The most bytes read for a manifest. It grows with the files of a release; a megabyte is thousands of files.
UPDATE_KEYS
The keys this build trusts: at most two (the current one and, once a rotation is prepared, the next; spec §6). k1 is the release signing key (plain Ed25519, raw 32-byte public key); the private half never leaves the signing service.

Functions§

decide
What to do about outcome for version: Ok to go on, or the message to show (spec §7). The app’s download and the Linux package helper say the same thing.
file_names
The three files of a signed release, as published next to its other files: the envelope, its signature and the manifest.
hex
Lowercase hex of bytes.
install_first_message
What a person reads when the installed version is older than a release can upgrade from. The app’s check and download and the Linux package helper say the same thing.
is_plain_version
<digits>.<digits>.<digits> and nothing else (each part at most nine digits).
judge_file
The decision, given what was fetched (None: the release has no signed manifest) and the file called name that has size bytes and hashes to sha256.
judge_file_and_floor
judge_file, and the upgrade floor the manifest signs. The floor is read from the same verified manifest the file is judged against, so a download can refuse on it without trusting what an earlier check saw; it is Absent whenever the manifest did not verify (the outcome says why).
signed_floor_in_force
The floor in force when a verified manifest carries a usable one: the higher of that and build (a build’s own floor), which a signed floor never lowers. None when the manifest has none that can be used.
verify_release
Check a release’s envelope, its signatures file and its manifest against the trusted keys for the release called tag, and return the manifest only if every step passes (spec §5.2):
version_core
major.minor.patch out of a version or tag (v0.59.27, 0.59.27+g1a2b), or None when it doesn’t start with three integers.