Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aien-sovereign-core-mv/blob/main/scripts/release-publish-gate.sh # 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 Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aien-sovereign-core-mv / scripts / release-publish-gate.sh` 53 lines ยท 3207 bytes Raw Blame History 1 #!/usr/bin/env bash 2 # SPDX-License-Identifier: Apache-2.0 3 # Copyright 2026 Drake Stapleton (AIEN / aien-dev) 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 # Stage 3 of the offline-signing handoff (sc#385, docs/release/RELEASE_SIGNING.md): decide whether a draft release may 18 # be published. Run by .github/workflows/release-publish.yml on the downloaded draft assets, and by hand. 19 # scripts/release-publish-gate.sh 20 # Passes only when ALL hold: 21 # - pins a key (the PLACEHOLDER refuses) and that key is not the internal test key 22 # - nothing in is a dry-run asset (DRY-RUN-* files, dry-run-signers) and no packaged release.toml says 23 # dry-run = true or candidate NOT-RELEASABLE 24 # - scripts/verify-release-assets.sh: SHA256SUMS.txt.sig (made offline by the operator) is valid for the pinned key, 25 # every listed file matches, every sovereign-* archive is covered 26 # The private key is never needed here and never present: this only verifies. 27 set -euo pipefail 28 ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" 29 d="${1:?asset directory}"; signers="${2:?allowed_signers file}" 30 die() { echo "publish gate: REFUSED: $*" >&2; exit 1; } 31 [[ -d "$d" ]] || die "asset directory $d is missing" 32 [[ -f "$signers" ]] || die "signer file $signers is missing" 33 key="$(grep -vE '^[[:space:]]*(#|$)' "$signers" || true)" 34 [[ -n "$key" ]] || die "no public-release key is pinned in $signers (PLACEHOLDER until the key ceremony)" 35 [[ "$(printf '%s\n' "$key" | grep -c .)" -eq 1 ]] || die "$signers must pin exactly one key" 36 internal="$ROOT/docs/release/internal_test_signers" 37 if [[ -f "$internal" ]]; then 38 ik="$(grep -vE '^[[:space:]]*(#|$)' "$internal" | awk '{ print $3 }')" 39 [[ -z "$ik" || "$key" != *"$ik"* ]] || die "$signers pins the internal test key, which is not a release key" 40 fi 41 for f in "$d"/DRY-RUN-* "$d"/dry-run-signers; do 42 [[ ! -e "$f" ]] || die "$(basename "$f") is a dry-run asset; a dry run is never published" 43 done 44 # Signature and checksums first, so nothing unverified is unpacked. 45 bash "$ROOT/scripts/verify-release-assets.sh" "$d" "$signers" || die "signature or checksums do not verify (see above)" 46 for a in "$d"/sovereign-*.tar.gz; do 47 [[ -e "$a" ]] || continue 48 m="$(tar -xzOf "$a" ./release.toml 2>/dev/null || true)" 49 [[ -n "$m" ]] || die "$(basename "$a") has no release.toml" 50 ! grep -qx 'dry-run = true' <<<"$m" || die "$(basename "$a") is labelled dry-run in its release.toml" 51 ! grep -qx 'candidate = "NOT-RELEASABLE"' <<<"$m" || die "$(basename "$a") is a NOT-RELEASABLE package" 52 done 53 echo "publish gate: PASSED: signed offline by the pinned release key, every asset matches, no dry-run asset"