aien-sovereign-core-mv
AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.
Brought by drakestapleton
aien-sovereign-core-mv / docs / release / RELEASE_SIGNING.md
| 1 | # Release signing |
| 2 | |
| 3 | ## Where things stand (Drake ruling 1, 2026-10-10, sc#385 and arch#190) |
| 4 | |
| 5 | - **No public-release key exists yet.** A public release needs a new, dedicated, offline Ed25519 key. Its private half |
| 6 | never exists on GitHub, in CI, in a secret, on a production machine, or in this repository. A CI secret does not |
| 7 | qualify. It is made at a witnessed key ceremony with a verified backup and a public-key verification test |
| 8 | (`KEY_CEREMONY.md`, operator checklist sc#118). Until then `allowed_signers` is a labelled **PLACEHOLDER** with no key |
| 9 | line, `install.sh` has an empty `AIEN_RELEASE_SIGNER`, and nothing can verify or be recorded as a public release. |
| 10 | - **The old key is the internal test key.** It signed v0.1.1. It is not reused for public releases. Its public half |
| 11 | moved to `internal_test_signers` (and `AIEN_INTERNAL_TEST_SIGNER` in `install.sh`), so internal installs keep |
| 12 | working; anything it verifies is recorded as `signature_check: internal-test-key`. |
| 13 | - **v0.1.0 and v0.1.1 are internal test releases** (Drake decision 2026-10-08). v0.1.0 has only `SHA256SUMS.txt`; |
| 14 | v0.1.1 carries `SHA256SUMS.txt.sig` made with the internal test key. |
| 15 | - Physical rollback is also required before any public tag (public-release gates, 2026-10-06); this file covers signing |
| 16 | only. |
| 17 | |
| 18 | ## The three stages of a release (offline-signing handoff) |
| 19 | |
| 20 | 1. **CI builds and publishes checksums, unsigned.** A `v*` tag push runs `.github/workflows/release.yml`: build the |
| 21 | reproducible archive, run the release gate, write `SHA256SUMS.txt`, and create a **draft** release holding the |
| 22 | archives and `SHA256SUMS.txt`. The draft is not public. CI holds no signing key. |
| 23 | 2. **The operator signs offline.** Carry `SHA256SUMS.txt` (only that file) to the offline machine on a USB stick and run |
| 24 | `scripts/key-ceremony.sh sign <key> <allowed_signers> SHA256SUMS.txt`. It shows the files the signature vouches |
| 25 | for, signs, and verifies the signature before anything leaves the machine. Carry `SHA256SUMS.txt.sig` back and |
| 26 | attach it to the draft release (GitHub release page, "Edit", drop the file in; or `gh release upload <tag> |
| 27 | SHA256SUMS.txt.sig`). **Human only.** |
| 28 | 3. **CI verifies, then publishes.** Run `.github/workflows/release-publish.yml` by hand with the tag. It checks out the |
| 29 | tagged commit, downloads the draft, and runs `scripts/release-publish-gate.sh` against that commit's |
| 30 | `allowed_signers`. It publishes only if the signature is valid for the pinned release key, every asset matches its |
| 31 | checksum, and nothing is a dry run. Unsigned, mismatched, dry-run, internal-test-key and placeholder-key releases |
| 32 | are refused. |
| 33 | |
| 34 | The release key is pinned in `allowed_signers` (and `install.sh`) **before** the tag is cut, so the key a release is |
| 35 | checked against is fixed in the same commit the release is built from. |
| 36 | |
| 37 | ## What `install.sh` records |
| 38 | |
| 39 | `install.sh` release mode (`AIEN_RELEASE_TAG=vX.Y.Z`) verifies `SHA256SUMS.txt.sig` with `ssh-keygen -Y verify`, then the |
| 40 | archive checksum, then every file in the package's `release.toml`. The class is decided by which key verified, never by |
| 41 | what the artifact claims, and is written to `installed.toml` (`signature-check`) and to `install-receipt.json` |
| 42 | (`signature_check`, plus `artifact_sha256`, `files_verified`, `cli_sha256`, `daemon_sha256`): |
| 43 | |
| 44 | | `signature_check` | verified by | meaning | |
| 45 | |---|---|---| |
| 46 | | `release` | `AIEN_RELEASE_SIGNER` = `allowed_signers` | a public release (impossible until the ceremony) | |
| 47 | | `internal-test-key` | `AIEN_INTERNAL_TEST_SIGNER` = `internal_test_signers` | internal test release, never public | |
| 48 | | `dry-run-key` | a throwaway signer file named in `AIEN_DRY_RUN_SIGNERS` | dry run or test, never a release | |
| 49 | |
| 50 | A package whose `release.toml` says `dry-run = true` (or candidate `NOT-RELEASABLE`) is refused if it ever verifies as |
| 51 | `release`. A missing signature, a one-byte change, an edited checksum list and a wrong key are each refused by name and |
| 52 | install nothing (`scripts/test-install-release.sh`). |
| 53 | |
| 54 | Install a dry-run artifact (the `dry-run-signed-assets` workflow artifact of a manual `release.yml` run, unzipped into a |
| 55 | folder): |
| 56 | |
| 57 | ```sh |
| 58 | AIEN_RELEASE_TAG=dry-run AIEN_RELEASE_BASE_URL="file:///path/to/folder" \ |
| 59 | AIEN_DRY_RUN_SIGNERS=/path/to/folder/dry-run-signers bash install.sh |
| 60 | ``` |
| 61 | |
| 62 | ## Verify a download by hand |
| 63 | |
| 64 | ```sh |
| 65 | sha256sum -c SHA256SUMS.txt |
| 66 | ssh-keygen -Y verify -f docs/release/allowed_signers -I aien-release -n aien-release \ |
| 67 | -s SHA256SUMS.txt.sig < SHA256SUMS.txt |
| 68 | ``` |
| 69 | |
| 70 | A GB10 release also carries `release_golden_path.json`, the artifact the |
| 71 | `release_golden_path_records_whether_gb10_ran` test prints on the Spark. A |
| 72 | release is only a GB10 release when that file says `"skipped": false`; it is |
| 73 | listed in `SHA256SUMS.txt` and therefore covered by the signature. |
| 74 | |
| 75 | ## Tests (all offline, throwaway keys only) |
| 76 | |
| 77 | - `scripts/test-install-release.sh`: signature classes, receipts, negative install rows. |
| 78 | - `scripts/test-offline-signing.sh`: ceremony rehearsal, offline sign, publish gate refusals. |
| 79 | - `scripts/test-release-signing-workflow.sh`: no release key in CI; release.yml only drafts; publish only after the gate. |
| 80 | - `scripts/test-public-key-integration.sh`: from only the ceremony's public folder: the trust-config change is a reviewable 3-file diff, the record fingerprint matches the pinned key, matching key installs as `release`, other key / tampered archive / tampered checksums refused. |
| 81 | - `scripts/check-release-trust-config.sh`: run in CI; passes in the PLACEHOLDER state and, after the ceremony, only if `allowed_signers`, `install.sh` and `ceremony-record.txt` agree. |
| 82 | - `scripts/test-release-checks.sh`: signature and checksum verification, placeholder refusal. |