The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs: document claim-driven stable releases
ethernet8e57bb6c372d
diff --git a/website/docs/developer-guide/stable-releases.md b/website/docs/developer-guide/stable-releases.mdindex 673e97e5eca..df8b37701b8 100644--- a/website/docs/developer-guide/stable-releases.md+++ b/website/docs/developer-guide/stable-releases.md@@ -1,77 +1,121 @@# Stable release admission and promotion-`Stable Release` is the release gate. A successful desktop builder alone is-not a successful stable release. Canary builds retain their separate workflow.+`Stable Release` is the release gate. A successful builder alone is not a+stable release. Stable releases use claim tags as locks and final tags as green+receipts; neither tag is a workflow trigger. Canary builds retain their separate+push-driven workflow.++The committed project version is always `0.0.0`. Release jobs derive the payload+version from the admitted ref and stamp isolated build trees. Do not bump version+files on `main`.## Order-1. Admit an exact `vMAJOR.MINOR.PATCH` tag and non-prerelease draft.-2. Run the whole `ci.yaml` pipeline in release mode.-3. Build and test the same Docker images as the Docker workflow.-4. Run Nix, native PM bundles, install/update E2E, Termux and Windows live- process tests. Build, sign and notarize the candidate packages.-5. Test upgrades to the actual signed Windows/macOS packages on both- architectures. The baseline must be a published stable release.-6. Publish the tested Docker and bundle artifacts. Do not rebuild for publication.-7. After every required check and artifact publication succeeds, advance the- Docker, App Installer, macOS and APT stable channels.-8. Verify promotion, record the accepted package manifest, then publish the- GitHub release. Only this final job reports the stable release green.--Versioned candidate uploads are staging, not stable promotion. Failed,-cancelled, missing and unexpectedly skipped requirements block the gate.-Public channel updates never run merely because one architecture built.--Docker Hub, R2, APT and the Store do not support one cross-service transaction.-All prerequisites finish before promotion starts, but a failure during final-promotion can leave some services advanced and others unchanged. Such a run-stays red. Inspect its per-service results before retrying; do not rebuild or-replace the tested candidate to recover a pointer update.--Promotion also replaces the stable downloads page at `releases/stable/index.html`-on the R2 public origin, so the latest stable builds stay readable without-GitHub. Canary tag builds own `releases/canary/index.html`, and commit builds-own `releases/commit/<sha>/index.html`. Pages list only objects the build-actually staged; a re-run of an older tag never regresses a channel page.--## Run a release--Use `scripts/release.py --bump patch --publish --remote <remote>` to create-its version commit, stable tag and draft. Stable dispatch selects-`stable-release.yml` at that tag. The workflow rejects a different ref/SHA,-a moved tag, a tag outside repository main, or a project-version mismatch.-Canary dispatch still uses the default branch for its workflow/cache scope.--To start the gate for an existing draft, dispatch `Stable Release` with the-exact tag as both the workflow ref and the `tag` input. Keep tags immutable.-The local workflow calls and their checkouts use the tag's commit, not moving-main.--For a failed publication or promotion, retry the failed jobs in the original-run. Desktop and Termux handoffs live in the immutable R2 tag archive, not-expiring GitHub job artifacts. Each producer uploads its files, then writes a-`handoff-<target>.json` receipt containing the tag, commit, paths, sizes and-SHA256 digests. Consumers validate that identity and verify streamed downloads-before using them. Candidate assembly publishes only `release-candidates.json`;-it does not upload the packages again.--Windows, macOS and Termux candidate jobs stage packages, native metadata and-APT inputs under `releases/tag/<tag>/` before acceptance. No stable feed is-written at this stage. Publication and promotion read the candidate manifest-from R2 and require the digest passed by the accepted candidate job. The-existing acceptance and publication gates still control every stable channel.--Immutable uploads accept an existing object only after verifying that its bytes-match; different bytes fail. Do not delete archive objects or rebuild signed-candidates under the same tag to bypass a conflict. A fresh dispatch starts the-build phases again and is not a promotion-only retry. If the original objects-are unavailable, stop recovery rather than replace the accepted candidate.--The desktop workflow's optional Termux upgrade input is-`termux_upgrade_from_tag`: an exact published release tag with a Termux R2-handoff. It no longer selects packages by a GitHub workflow run. Explicit-non-publishing desktop builds retain no downloadable job artifacts. Unrelated-CI diagnostics and tested Docker image handoffs keep their existing storage.+1. Refresh `origin/main` and remote `v*-rc` claims. Derive the next SemVer from+ the published release family seeded at `0.21.4` and every spent claim.+2. Push an annotated `vMAJOR.MINOR.PATCH-rc` claim atomically, create one+ non-prerelease GitHub draft for it, and dispatch `Stable Release` on that exact+ claim ref. The claim message binds its commit and autopublish policy.+3. Admit the exact remote annotated tag-object SHA, peeled commit, `GITHUB_REF`,+ `GITHUB_SHA`, checked-out `HEAD`, and ancestry on `origin/main`.+4. Run the whole source, Docker, Nix, PM bundle, install/update, Termux, Windows,+ signed-package, and native-upgrade acceptance graph.+5. Publish immutable versioned Docker and R2 artifacts from the tested bytes.+ Do not move `stable` or `latest` aliases yet and do not rebuild for publication.+6. Create the annotated final `vMAJOR.MINOR.PATCH` receipt. It binds the original+ claim object, commit, candidate-manifest SHA256, Docker manifest digest, and+ autopublish policy. Retarget the existing draft to this final tag.+7. The stable publication controller resolves releases oldest first. It publishes+ the GitHub draft, verifies and promotes the receipt-bound Docker digest, then+ advances App Installer, macOS, APT, downloads-page, and protected R2 heads.++A sole green draft waits unless its claim selected autopublish. A later green+claim flushes all contiguous earlier green drafts in order. An older running claim+blocks newer publication. Burned claims are skipped but their version numbers are+never reused. Failed, cancelled, missing, and unexpectedly skipped requirements+remain red.++Docker Hub, R2, APT, GitHub, and the Store do not support one cross-service+transaction. The controller is therefore idempotent: after a partial failure,+run it again and let every mutation verify its current state before continuing.+The final tag is the custody receipt. Never rebuild or replace accepted bytes to+repair a pointer.++Promotion replaces the stable downloads page at `releases/stable/index.html` on+the R2 public origin. Canary tag builds own `releases/canary/index.html`, and+commit builds own `releases/commit/<sha>/index.html`. Pages list only staged,+receipt-backed objects; an older run cannot regress a protected channel.++## Run, publish, or abandon a stable release++Start from an exact commit already on remote `main`:++```sh+python scripts/release.py release --commit "$(git rev-parse origin/main)" --bump patch --remote origin+```++Add `--autopublish` to publish immediately when the claim becomes the oldest+green release. Without it, the release stays a draft until an explicit publish+or a later green claim forces ordered resolution.++The claim push is the atomic version lock. Two callers may derive the same next+version, but only one push wins; the loser reports the winning tagger, time, and+commit. A rejected or abandoned claim remains spent. To publish or abandon:++```sh+python scripts/release.py publish --version 0.21.5 --remote origin+python scripts/release.py abandon --version 0.21.5 --remote origin+```++`publish` performs a synchronous supersession preflight, then dispatches the same+ordered controller used by automatic recovery. It refuses a known burned version+below a newer published release. `abandon` deletes only the draft; it deliberately+keeps the `-rc` tag so derivation cannot reuse that version.++Do not manually dispatch `Stable Release` from a final tag. Recovery keeps the+original claim ref, object SHA, commit, draft database ID, and autopublish policy.++## Failure and recovery++A failed stable run waits 15 minutes, then reruns only failed jobs in the same+GitHub Actions run. At most two retries are admitted (run attempts 2 and 3).+After attempt 3 fails, the claim is burned and the sequencer may resolve later+claims. The hourly publication controller recovers a lost retry request or a+crash between any publication mutations.++Desktop and Termux handoffs live in the immutable R2 tag archive. Each producer+writes a `handoff-<target>.json` receipt containing the tag, commit, paths, sizes,+and SHA256 digests. Candidate assembly emits one pinned+`release-candidates.json`; consumers verify its digest and do not re-upload the+packages. Docker publication pushes one immutable versioned manifest and records+its registry digest in the final tag. Delayed publication promotes that digest+registry-side, so it does not depend on expiring Actions artifacts.++Windows, macOS, and Termux candidate jobs stage packages and metadata under+`releases/tag/<tag>/` before acceptance. No stable feed is written at this stage.+Immutable uploads accept an existing object only when its bytes match. If an+archive object, final-tag digest, versioned Docker tag, or read-back differs, stop+recovery rather than replacing the accepted candidate.++The desktop workflow's optional `termux_upgrade_from_tag` input names an exact+published release with a Termux R2 handoff. Explicit non-publishing desktop builds+retain no downloadable job artifacts.++## Tag namespaces and receipts++Before relying on claim tags as locks, apply a repository ruleset for+`refs/tags/v*` that restricts creation, update, and deletion to organization+administrators and the release integration. Claim and final tags are immutable.+Channel and commit builds write annotated post-build receipts such as+`v0.0.7+channel.<YYYYMMDDTHHMMSSZ>.<run-id>` and+`v0.0.0+commit.<YYYYMMDDTHHMMSSZ>.<run-id>` only after publication succeeds.+Receipt tags do not create GitHub releases and do not trigger workflows.++Canary source identity is only+`v<stable>+canary.<YYYYMMDDTHHMMSSZ>`. Build metadata intentionally makes it+SemVer-equal to its stable core; the protected channel record and embedded UTC+timestamp decide progression. Every `main` push queues a canary run with+`cancel-in-progress: false`. Historical `-canary.` identities are unsupported.## Canary and one-off desktop identities@@ -194,9 +238,10 @@ For an existing stable release that predates this metadata, supply`baseline-manifest` as an HTTPS URL on the configured R2 public origin to anequivalent manifest of its actual published packages. Manifest redirects muststay on the same origin. The baseline tag must be a published stable release,-package identities must agree, and versions must increase. Stable sideload-Windows versions must equal the tag's three components plus `.0`; Store-packages retain their separate version policy. Missing baseline+package identities must agree, and versions must increase. Stable Windows+packages use electron-builder's `storePackageVersionAt` timestamp policy+(`year.hourOfYear.secondOfHour.0`), independently of the SemVer payload tag.+Missing baselineartifacts are a blocker, not permission to fabricate or skip acceptance.See [the bundled update contract](https://github.com/NousResearch/hermes-agent/blob/main/tests/install/BUNDLED_UPDATES.md).