interplane.Get Omega
Read in your language

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

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 <asset-dir> <allowed_signers>
20# Passes only when ALL hold:
21# - <allowed_signers> pins a key (the PLACEHOLDER refuses) and that key is not the internal test key
22# - nothing in <asset-dir> 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.
27set -euo pipefail
28ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
29d="${1:?asset directory}"; signers="${2:?allowed_signers file}"
30die() { 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"
33key="$(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"
36internal="$ROOT/docs/release/internal_test_signers"
37if [[ -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"
40fi
41for 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"
43done
44# Signature and checksums first, so nothing unverified is unpacked.
45bash "$ROOT/scripts/verify-release-assets.sh" "$d" "$signers" || die "signature or checksums do not verify (see above)"
46for 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"
52done
53echo "publish gate: PASSED: signed offline by the pinned release key, every asset matches, no dry-run asset"