This runbook is for an operator-approved rollback of a FORGE release. It restores the public npm channel dist-tag and/or the GHCR channel alias to the previous verified release. It does not delete release history, unpublish a package, rebuild an older image, or choose a version from a mutable alias.
The rollback manifest is a signed instruction record, not an automatic rollback mechanism. A successful manifest verification does not grant approval to change either registry.
- Open an incident/change record. Record the affected release tag, affected channel, observed failure, impact, operator and independent approver.
- Download
release-rollback-manifest.jsonandrelease-rollback-manifest.json.ascfrom the matching GitHub Release. Keep both files together. - Confirm the manifest's
release.repository,release.tag,release.versionandrelease.channel.nameidentify the affected FORGE release. - Check
rollback.state. Continue only when it isoperator-confirmation-requiredandpreviousReleaseis present. If it isno-prior-release-in-channelorpreviousReleaseisnull, stop. Do not substitute a release from another channel or guess an older version.
The previousRelease record must identify the previous annotated tag and source commit, its pinned signing-key fingerprint, the npm SHA-512 integrity, and the immutable GHCR image tag, manifest media type and sha256: digest. The manifest builder checks that the prior tag is annotated, signed by the same pinned release key, an ancestor of main, and has a matching historical package.json. It also verifies that the npm integrity and OCI digest resolve from the live registries.
Use a trusted copy of the FORGE release public key. Do not trust a key obtained only from the downloaded release assets. Compare its full fingerprint with the independently recorded FORGE_RELEASE_SIGNING_FINGERPRINT held by the release administrators.
gpg --import /path/to/trusted-forge-release-public-key.asc
gpg --status-fd=1 --verify \
release-rollback-manifest.json.asc \
release-rollback-manifest.jsonConfirm the VALIDSIG fingerprint printed by GPG is the pinned fingerprint. A valid signature from a different key is not sufficient.
From a trusted FORGE checkout with Node.js 22.14+ and npm installed, verify the canonical manifest digest, repository identity, previous npm integrity and current OCI version-tag digest:
GITHUB_REPOSITORY=NetCore-Technologies/FORGE \
npm run release:rollback -- verify release-rollback-manifest.jsonThe verification command is read-only. It queries npm and GHCR again and fails if either recorded registry value has changed or cannot be resolved. Authenticate to GHCR with an authorised read-only credential first if the package is private. Do not proceed after any verification error.
Inspect the generated recovery instructions; do not reconstruct them from an issue comment or from a mutable tag:
node --input-type=module <<'NODE'
import { readFileSync } from 'node:fs';
const manifest = JSON.parse(readFileSync('release-rollback-manifest.json', 'utf8'));
const { npm, oci } = manifest.rollback.instructions;
console.log('Record:', manifest.recordId);
console.log('Current release:', manifest.release.tag);
console.log('Channel:', manifest.release.channel.name);
console.log('Previous release:', manifest.previousRelease?.tag ?? 'none');
console.log('npm integrity:', manifest.previousRelease?.npmIntegrity ?? 'none');
console.log('OCI immutable tag:', manifest.previousRelease?.ociTag ?? 'none');
console.log('OCI digest:', manifest.previousRelease?.ociDigest ?? 'none');
console.log('npm recovery command:', npm.command ?? 'not available');
console.log('OCI recovery command:', oci.command ?? 'not available');
NODEThe record digest protects against accidental or partial edits; the detached GPG signature authenticates the manifest. The live verification step checks that the recorded npm and OCI values still resolve. Keep the manifest, signature and incident record as the audit evidence.
First inspect the current public dist-tags and confirm whether the failed version is actually public:
npm view @netcore-technologies/forge dist-tags --json
npm view @netcore-technologies/forge@PREVIOUS_VERSION dist.integrity --jsonReplace PREVIOUS_VERSION with the exact previousRelease.version from the verified manifest. Compare the returned integrity value with previousRelease.npmIntegrity.
A submitted npm staged package is not public until a maintainer approves it with npm 2FA. If the affected version is still only in Staged Packages, do not move the public dist-tag. Handle the pending stage in npm's UI according to the release incident decision.
When the affected version is public, and the incident approver authorises the npm rollback, execute the exact rollback.instructions.npm.command from the signed manifest. It has this form:
npm dist-tag add @netcore-technologies/forge@PREVIOUS_VERSION CHANNELThe generated command contains the exact package version and channel (latest, beta, canary, rc, and so on). Do not substitute latest for a prerelease channel, or move one channel to a version from another channel.
Verify the dist-tag after the command:
npm view @netcore-technologies/forge dist-tags --json
npm view @netcore-technologies/forge@PREVIOUS_VERSION dist.integrity --jsonConfirm the channel points at the previous version and its integrity still matches the signed manifest. The old package version remains addressable by its exact version; this operation changes a dist-tag, not the package contents.
Use an authorised GHCR credential with package write permission. Supply it through the normal secret-management process; do not place a token in a checked-in file or command-line argument.
printf '%s' "$GHCR_TOKEN" |
docker login ghcr.io --username "$GHCR_USERNAME" --password-stdin
docker buildx versionRead rollback.instructions.oci.command from the verified manifest and compare the image, channel alias and full sha256: digest with previousRelease.ociDigest. After independent approval, execute that exact command. It has this form:
docker buildx imagetools create \
--tag ghcr.io/netcore-technologies/forge:CHANNEL \
ghcr.io/netcore-technologies/forge@sha256:PREVIOUS_MANIFEST_DIGESTThe source is the immutable digest, not latest, beta, canary, or any other mutable tag. The previous immutable version tag is the full v-prefixed Git tag recorded in previousRelease.ociTag.
Verify the channel alias now resolves to the exact recorded digest:
docker buildx imagetools inspect \
ghcr.io/netcore-technologies/forge:CHANNEL \
--format '{{json .Manifest}}'Check that the returned .digest equals previousRelease.ociDigest and the media type equals previousRelease.ociMediaType. Then pull and smoke-test by digest, not by alias:
docker pull ghcr.io/netcore-technologies/forge@sha256:PREVIOUS_MANIFEST_DIGEST
docker run --rm \
ghcr.io/netcore-technologies/forge@sha256:PREVIOUS_MANIFEST_DIGEST \
--help
docker run --rm \
ghcr.io/netcore-technologies/forge@sha256:PREVIOUS_MANIFEST_DIGEST \
--versionThe image's entrypoint is FORGE's Node CLI. The expected version output must match previousRelease.version. Stop if the digest, media type or reported CLI version differs.
Run the install and runtime checks from a clean test environment before closing the incident:
npm exec --yes \
--package=@netcore-technologies/forge@PREVIOUS_VERSION \
-- forge --versionConfirm npm's channel dist-tag points to the previous version. Confirm the GHCR channel alias resolves to the recorded immutable digest. Confirm the image works when addressed directly by that digest. Run post-rollback smoke/provenance checks and repeat the project-specific smoke tests that exposed the incident; record their output and timestamps.
Keep the failed release's GitHub Release, tag, assets, signatures and provenance as incident evidence. Do not delete a GitHub Release or rewrite a signed tag as part of a rollback. Any explanatory notice should be added as a separate incident update, preserving the original assets.
Record the exact manifest recordId, current and previous tags, previous npm integrity, previous OCI digest, approval evidence, commands executed, registry observations and smoke-test results.
Stop and escalate rather than improvising when:
- the GPG signature or pinned signer fingerprint does not match;
- the manifest repository, release tag, channel or digest is unexpected;
- the manifest has no previous release in the same channel;
- npm integrity or the OCI digest no longer matches the signed manifest;
- the registry cannot be queried or the operator lacks the required permission;
- the generated command would target another channel or a mutable OCI tag;
- the post-rollback version, digest or smoke tests do not match the manifest.
A rollback is complete only after the approved registry changes, client-facing verification and incident evidence are all recorded. The process is deliberately manual: FORGE generates and verifies the recovery instructions, but never executes registry changes automatically.