# release: channels, versions, manifests - how a release of `socialweb-computer` is published as records, and how `scripts/install.sh` and a bidder follow it - lexicons: `lexicons/software/release/` (Go types: `internal/atproto/release`) - the account: `socialweb.computer` (`did:plc:gmlkrhimoueejcertevr4hl3`, `marketbidder.DefaultReleaseRepo`). No Go code writes these records: the knotless `release-workload` module of CI `promote` does, as that account - index: [README.md](README.md); the pipeline: [../deploy.md](../deploy.md) ## Records | NSID | rkey | |---|---| | `software.release.project` | `socialweb-computer` | | `software.release.manifest` | `socialweb-computer:` as written today (the lexicon says `tid`) | | `software.release.version` | `socialweb-computer:`; `previous` is the version it replaced | | `software.release.channel` | `socialweb-computer:rc`, `socialweb-computer:stable` | [lexicon: software.release.project](https://socialweb.computer/docs/lexicons/software.release.project.html) [lexicon: software.release.manifest](https://socialweb.computer/docs/lexicons/software.release.manifest.html) [lexicon: software.release.version](https://socialweb.computer/docs/lexicons/software.release.version.html) [lexicon: software.release.channel](https://socialweb.computer/docs/lexicons/software.release.channel.html) [lexicon: software.release.defs](https://socialweb.computer/docs/lexicons/software.release.defs.html) An artifact's `cid` is a CIDv1 raw sha2-256 of the file's bytes: the sha256 of the binary, checked after download. Trimmed; artifact URL shortened: ```json {"uri": "at://socialweb.computer/software.release.channel/socialweb-computer:stable", "value": {"$type": "software.release.channel", "name": "stable", "updatedAt": "2026-11-19T03:22:08Z", "project": "at://did:plc:gmlkrhimoueejcertevr4hl3/software.release.project/socialweb-computer", "version": {"uri": "at://did:plc:gmlkrhimoueejcertevr4hl3/software.release.version/socialweb-computer:v0.0.0", "cid": "bafyreiciv2ovu65hcfceuvymnyvfswzfbvqfttqut7jh3jxqg4zgq4wwx4"}}} {"uri": "at://socialweb.computer/software.release.version/socialweb-computer:v0.0.0", "value": {"$type": "software.release.version", "version": "v0.0.0", "createdAt": "2026-11-19T03:22:08Z", "manifest": {"uri": "at://did:plc:gmlkrhimoueejcertevr4hl3/software.release.manifest/socialweb-computer:v0.0.0-rc186", "cid": "bafyreiclhbqbq5deutuerkyevwq332knghnneg64vovwhm35qnvife7aua"}}} {"uri": "at://socialweb.computer/software.release.manifest/socialweb-computer:v0.0.0-rc186", "value": {"$type": "software.release.manifest", "commit": "688c2105f8792f235a22ea84490e4e9fde22d3f9", "artifacts": [{"$type": "software.release.defs#httpArtifact", "name": "socialweb-computer-linux-amd64", "url": "https://socialweb-computer-kcp.sfo3.digitaloceanspaces.com/main/688c2105.../binaries/socialweb-computer-linux-amd64", "cid": "bafkreigusm4ugilrwp3obf5gwehfmwrup6gn5rgizwzmid7ggtrpdxyl6e", "size": 589676670, "target": {"os": "linux", "arch": ["amd64"]}}, "..."]}} ``` Channel `rc` pointed at `socialweb-computer:v0.0.0-rc186` then. A stable version reuses the manifest of the rc it was cut from. ## Following A Channel ```mermaid sequenceDiagram autonumber participant F as follower (install.sh, bidder) participant P as socialweb.computer PDS participant S as bucket F->>P: getRecord software.release.channel socialweb-computer: F->>P: getRecord version (by the channel's strongRef, CID checked) F->>P: getRecord manifest (by the version's strongRef, CID checked) F->>S: GET the artifact url for this os/arch F->>F: sha256 of the bytes == the artifact cid, size equal F->>F: install (bidder: SelfCheck, swap bin/current, restart its units) ``` - `scripts/install.sh [stable|rc]`: the steps above with curl and jq, the PDS from the account's PLC document; installs to `${PREFIX:-$HOME/.local}/bin` - a bidder (`internal/stack/bidder/release.go` `followRelease`, `internal/releasefollow/follow.go`): an `AtprotoRecordWatch` `release-channel` on the two channel rkeys (`deploy/apps/market-bidder/release-channel-watch.prod.yaml`), event driven, re-armed every 5 min - channel: option `release-channel`, else `rc` when the running version contains `-rc` (every build's version does today, v0.0.0 included: [../bidder.md](../bidder.md#upgrade-rollback-self-update)), else `stable` - no change when the version string equals the running one or the artifact cid equals the running binary's sha256; any other version is installed, an older one too - install: download (10 min timeout), size and cid checked, `install.Upgrade` (re-hash, `SelfCheck`: `version --json` and `check-host`), `bin/current` and `bin/previous` swapped, its units restarted; the VMs, the state dir and the DID stay - off for dev builds and when there is no `bin/current` - the heartbeat then names the new binary: `market.heartbeat/self` `version {version, commit, sha256}` ([market.md](market.md#discovery)) ## rc, Stable, Promote, Rollback A push to `main` runs `release` (the checks and the one build, published to `main//`), then `test` (the staging gate), then `promote`. `promote`'s release step has `release-workload` write the rc's manifest and version and move channel `rc`; `scripts/promote.sh` deploys the `socialweb.computer` droplets, waits until every bidder of `deploy/release/rc-operators.json` heartbeats that binary (`updateWithin`, 10 min), runs the prod gate, and copies `main//` to `releases//`. Exit 0: `release-workload` moves channel `stable` to a new version `vT` (its manifest the rc's). Anything else, a cancel or a timeout (the workflow's `stop`) included: channel `rc` goes back to the rc's `previous` and `scripts/promote.sh rollback` puts the droplets and the rc bidders back on the previous binary. Detail: [../deploy.md](../deploy.md), `.knotless/workflows/promote.yml`, `scripts/promote.sh`. ## See Also - [../deploy.md](../deploy.md), [../bidder.md](../bidder.md), [identity.md](identity.md#actors) (the release account), [glossary.md](glossary.md)