Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix(release): activate before mutable customer promotion

rcourtmanb0759d20d7c0
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
index 9d4f0e13cb..98ffd8f827 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -1304,7 +1304,8 @@ jobs:
- prepare
- create_release
- release_readiness
- if: ${{ always() && needs.prepare.result == 'success' && needs.create_release.result == 'success' && needs.release_readiness.result == 'success' && needs.prepare.outputs.is_prerelease != 'true' && startsWith(needs.prepare.outputs.version, '6.') }}
+ - activate_release
+ if: ${{ always() && needs.prepare.result == 'success' && needs.create_release.result == 'success' && needs.release_readiness.result == 'success' && needs.activate_release.result == 'success' && needs.prepare.outputs.is_prerelease != 'true' && startsWith(needs.prepare.outputs.version, '6.') }}
permissions:
contents: read
uses: ./.github/workflows/update-demo-server.yml
@@ -1313,7 +1314,6 @@ jobs:
tag: ${{ needs.prepare.outputs.tag }}
target: stable
verify_only: false
- release_id: ${{ needs.create_release.outputs.release_id }}
# Publish the Helm chart for this release. publish-helm-chart.yml also
# listens for `release: published` events directly, but the create_release
@@ -1339,16 +1339,17 @@ jobs:
chart_version: ${{ needs.prepare.outputs.version }}
app_version: ${{ needs.prepare.outputs.version }}
- # Stage and prove the customer-facing Helm Pages repository explicitly.
- # The legacy workflow_run chain was asynchronous and could leave the public
- # index behind an already-visible GitHub release.
+ # Publish and prove the mutable Helm Pages index only after the GitHub
+ # release has survived public activation verification. The legacy
+ # workflow_run chain remains forbidden because it bypasses this ordering.
publish_helm_pages:
needs:
- prepare
- publish_docker
- validate_release_assets
- publish_helm_chart
- if: ${{ always() && needs.prepare.result == 'success' && needs.publish_docker.result == 'success' && needs.validate_release_assets.result == 'success' && needs.publish_helm_chart.result == 'success' && needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true' }}
+ - activate_release
+ if: ${{ always() && needs.prepare.result == 'success' && needs.publish_docker.result == 'success' && needs.validate_release_assets.result == 'success' && needs.publish_helm_chart.result == 'success' && needs.activate_release.result == 'success' && needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true' }}
permissions:
contents: write
uses: ./.github/workflows/helm-pages.yml
@@ -1356,9 +1357,11 @@ jobs:
with:
chart_version: ${{ needs.prepare.outputs.version }}
- # One immutable-readiness gate joins every exact-version path before any
- # mutable customer pointer moves. v6 additionally requires the staged Pro
- # image and signed packet; older release lines have no private Pro job.
+ # One immutable-readiness gate joins every exact-version path before the
+ # GitHub release crosses its public activation boundary. v6 additionally
+ # requires the staged Pro image and signed packet; older release lines have
+ # no private Pro job. Mutable indexes, aliases, brokers, and live environments
+ # are deliberately excluded from this pre-activation join.
release_readiness:
needs:
- prepare
@@ -1367,9 +1370,8 @@ jobs:
- validate_release_assets
- install_sh_smoke
- publish_helm_chart
- - publish_helm_pages
- stage_private_pro_runtime
- if: ${{ always() && needs.prepare.result == 'success' && needs.create_release.result == 'success' && needs.publish_docker.result == 'success' && needs.validate_release_assets.result == 'success' && needs.install_sh_smoke.result == 'success' && needs.publish_helm_chart.result == 'success' && needs.publish_helm_pages.result == 'success' && ( !startsWith(needs.prepare.outputs.version, '6.') || needs.stage_private_pro_runtime.result == 'success' ) && needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true' }}
+ if: ${{ always() && needs.prepare.result == 'success' && needs.create_release.result == 'success' && needs.publish_docker.result == 'success' && needs.validate_release_assets.result == 'success' && needs.install_sh_smoke.result == 'success' && needs.publish_helm_chart.result == 'success' && ( !startsWith(needs.prepare.outputs.version, '6.') || needs.stage_private_pro_runtime.result == 'success' ) && needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true' }}
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
@@ -1377,14 +1379,16 @@ jobs:
run: echo "All exact-version release paths are ready for customer activation."
# Mutable image aliases move only after the exact-version images and staged
- # release assets have passed validation. promote-floating-tags.yml has no
- # implicit workflow_run trigger, so this explicit call is the sole owner of
+ # release assets have passed validation and the GitHub release has survived
+ # public activation verification. promote-floating-tags.yml has no implicit
+ # workflow_run trigger, so this explicit call is the sole owner of
# rc/latest/major/minor pointers for both runtime images.
promote_floating_tags:
needs:
- prepare
- release_readiness
- if: ${{ always() && needs.prepare.result == 'success' && needs.release_readiness.result == 'success' }}
+ - activate_release
+ if: ${{ always() && needs.prepare.result == 'success' && needs.release_readiness.result == 'success' && needs.activate_release.result == 'success' }}
permissions:
contents: read
packages: write
@@ -1424,52 +1428,36 @@ jobs:
wait_for_workflow() {
local repo="$1"
- local workflow="$2"
- local branch="$3"
- local started_at="$4"
- local label="$5"
- local timeout_seconds="$6"
+ local run_id="$2"
+ local label="$3"
+ local timeout_seconds="$4"
local deadline=$((SECONDS + timeout_seconds))
- local run_id=""
- while (( SECONDS < deadline )); do
- if [[ -z "${run_id}" ]]; then
- run_id="$(
- gh run list \
- --repo "${repo}" \
- --workflow "${workflow}" \
- --event workflow_dispatch \
- --branch "${branch}" \
- --limit 50 \
- --json databaseId,createdAt \
- --jq "map(select(.createdAt >= \"${started_at}\")) | sort_by(.createdAt) | reverse | .[0].databaseId // \"\""
- )"
- if [[ -n "${run_id}" ]]; then
- echo "Watching ${label} run ${run_id} in ${repo}."
- else
- echo "Waiting for ${label} workflow run to appear..."
- fi
- fi
+ if [[ ! "${run_id}" =~ ^[0-9]+$ ]]; then
+ echo "::error::Dispatch for ${label} did not return an exact workflow run ID."
+ return 1
+ fi
+
+ echo "Watching exact ${label} run ${run_id} in ${repo}."
- if [[ -n "${run_id}" ]]; then
- run_state="$(
- gh run view "${run_id}" \
- --repo "${repo}" \
- --json status,conclusion,url \
- --jq '[.status, (.conclusion // ""), .url] | @tsv'
- )"
- status="$(awk -F '\t' '{print $1}' <<<"${run_state}")"
- conclusion="$(awk -F '\t' '{print $2}' <<<"${run_state}")"
- url="$(awk -F '\t' '{print $3}' <<<"${run_state}")"
- echo "${label}: status=${status} conclusion=${conclusion:-pending} ${url}"
- if [[ "${status}" == "completed" ]]; then
- if [[ "${conclusion}" == "success" ]]; then
- echo "[OK] ${label} completed successfully: ${url}"
- return 0
- fi
- echo "::error::${label} failed with conclusion=${conclusion}: ${url}"
- return 1
+ while (( SECONDS < deadline )); do
+ run_state="$(
+ gh run view "${run_id}" \
+ --repo "${repo}" \
+ --json status,conclusion,url \
+ --jq '[.status, (.conclusion // ""), .url] | @tsv'
+ )"
+ status="$(awk -F '\t' '{print $1}' <<<"${run_state}")"
+ conclusion="$(awk -F '\t' '{print $2}' <<<"${run_state}")"
+ url="$(awk -F '\t' '{print $3}' <<<"${run_state}")"
+ echo "${label}: status=${status} conclusion=${conclusion:-pending} ${url}"
+ if [[ "${status}" == "completed" ]]; then
+ if [[ "${conclusion}" == "success" ]]; then
+ echo "[OK] ${label} completed successfully: ${url}"
+ return 0
fi
+ echo "::error::${label} failed with conclusion=${conclusion}: ${url}"
+ return 1
fi
sleep 30
@@ -1501,31 +1489,49 @@ jobs:
fi
r2_prefix="${TAG}-pro-${run_created_date}-${GITHUB_RUN_ID}"
echo "r2_prefix=${r2_prefix}" >> "$GITHUB_OUTPUT"
- build_started_at="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
echo "Dispatching private Pro build for ${TAG} with R2 prefix ${r2_prefix}."
- gh workflow run build-pro-release.yml \
- --repo rcourtman/pulse-enterprise \
- --ref main \
- -f pulse_ref="${TAG}" \
- -f version="${VERSION}" \
- -f upload_actions_artifact=false \
- -f upload_to_r2=true \
- -f publish_docker_image=true \
- -f docker_image=license.pulserelay.pro/pulse-pro \
- -f r2_prefix="${r2_prefix}" \
- -f reuse_existing_packet=true \
- -f allow_stable_ga_publish="${allow_ga_publish}"
- wait_for_workflow rcourtman/pulse-enterprise "Build Pro Release" main "${build_started_at}" "private Pro build" 7200
+ build_dispatch="$(
+ jq -n \
+ --arg pulse_ref "${TAG}" \
+ --arg version "${VERSION}" \
+ --arg r2_prefix "${r2_prefix}" \
+ --arg allow_stable_ga_publish "${allow_ga_publish}" \
+ '{
+ ref: "main",
+ return_run_details: true,
+ inputs: {
+ pulse_ref: $pulse_ref,
+ version: $version,
+ upload_actions_artifact: "false",
+ upload_to_r2: "true",
+ publish_docker_image: "true",
+ docker_image: "license.pulserelay.pro/pulse-pro",
+ r2_prefix: $r2_prefix,
+ reuse_existing_packet: "true",
+ allow_stable_ga_publish: $allow_stable_ga_publish
+ }
+ }' | \
+ gh api \
+ --method POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2026-03-10" \
+ repos/rcourtman/pulse-enterprise/actions/workflows/build-pro-release.yml/dispatches \
+ --input -
+ )"
+ build_run_id="$(jq -r '.workflow_run_id // empty' <<<"${build_dispatch}")"
+ wait_for_workflow rcourtman/pulse-enterprise "${build_run_id}" "private Pro build" 7200
# The paid-runtime broker is a mutable customer pointer, so promote it only
- # after every exact-version public artifact and staged install path is ready.
- # A rerun reuses the run-stable R2 prefix produced by the staging job.
+ # after every exact-version public artifact and staged install path is ready
+ # and the GitHub release has survived public activation verification. A
+ # rerun reuses the run-stable R2 prefix produced by the staging job.
promote_private_pro_runtime:
needs:
- prepare
- release_readiness
- stage_private_pro_runtime
- if: ${{ always() && needs.prepare.result == 'success' && needs.release_readiness.result == 'success' && needs.stage_private_pro_runtime.result == 'success' && startsWith(needs.prepare.outputs.version, '6.') }}
+ - activate_release
+ if: ${{ always() && needs.prepare.result == 'success' && needs.release_readiness.result == 'success' && needs.stage_private_pro_runtime.result == 'success' && needs.activate_release.result == 'success' && startsWith(needs.prepare.outputs.version, '6.') }}
runs-on: ubuntu-24.04
timeout-minutes: 65
steps:
@@ -1550,52 +1556,36 @@ jobs:
wait_for_workflow() {
local repo="$1"
- local workflow="$2"
- local branch="$3"
- local started_at="$4"
- local label="$5"
- local timeout_seconds="$6"
+ local run_id="$2"
+ local label="$3"
+ local timeout_seconds="$4"
local deadline=$((SECONDS + timeout_seconds))
- local run_id=""
- while (( SECONDS < deadline )); do
- if [[ -z "${run_id}" ]]; then
- run_id="$(
- gh run list \
- --repo "${repo}" \
- --workflow "${workflow}" \
- --event workflow_dispatch \
- --branch "${branch}" \
- --limit 50 \
- --json databaseId,createdAt \
- --jq "map(select(.createdAt >= \"${started_at}\")) | sort_by(.createdAt) | reverse | .[0].databaseId // \"\""
- )"
- if [[ -n "${run_id}" ]]; then
- echo "Watching ${label} run ${run_id} in ${repo}."
- else
- echo "Waiting for ${label} workflow run to appear..."
- fi
- fi
+ if [[ ! "${run_id}" =~ ^[0-9]+$ ]]; then
+ echo "::error::Dispatch for ${label} did not return an exact workflow run ID."
+ return 1
+ fi
+
+ echo "Watching exact ${label} run ${run_id} in ${repo}."
- if [[ -n "${run_id}" ]]; then
- run_state="$(
- gh run view "${run_id}" \
- --repo "${repo}" \
- --json status,conclusion,url \
- --jq '[.status, (.conclusion // ""), .url] | @tsv'
- )"
- status="$(awk -F '\t' '{print $1}' <<<"${run_state}")"
- conclusion="$(awk -F '\t' '{print $2}' <<<"${run_state}")"
- url="$(awk -F '\t' '{print $3}' <<<"${run_state}")"
- echo "${label}: status=${status} conclusion=${conclusion:-pending} ${url}"
- if [[ "${status}" == "completed" ]]; then
- if [[ "${conclusion}" == "success" ]]; then
- echo "[OK] ${label} completed successfully: ${url}"
- return 0
- fi
- echo "::error::${label} failed with conclusion=${conclusion}: ${url}"
- return 1
+ while (( SECONDS < deadline )); do
+ run_state="$(
+ gh run view "${run_id}" \
+ --repo "${repo}" \
+ --json status,conclusion,url \
+ --jq '[.status, (.conclusion // ""), .url] | @tsv'
+ )"
+ status="$(awk -F '\t' '{print $1}' <<<"${run_state}")"
+ conclusion="$(awk -F '\t' '{print $2}' <<<"${run_state}")"
+ url="$(awk -F '\t' '{print $3}' <<<"${run_state}")"
+ echo "${label}: status=${status} conclusion=${conclusion:-pending} ${url}"
+ if [[ "${status}" == "completed" ]]; then
+ if [[ "${conclusion}" == "success" ]]; then
+ echo "[OK] ${label} completed successfully: ${url}"
+ return 0
fi
+ echo "::error::${label} failed with conclusion=${conclusion}: ${url}"
+ return 1
fi
sleep 30
@@ -1609,29 +1599,41 @@ jobs:
if [[ "${IS_PRERELEASE}" != "true" ]]; then
allow_ga_publish=true
fi
- promote_started_at="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
echo "Dispatching live paid-runtime promotion for ${TAG} with R2 prefix ${R2_PREFIX}."
- gh workflow run promote-paid-runtime-release.yml \
- --repo rcourtman/pulse-pro \
- --ref main \
- -f version="${VERSION}" \
- -f r2_prefix="${R2_PREFIX}" \
- -f allow_ga_prefix="${allow_ga_publish}"
- wait_for_workflow rcourtman/pulse-pro "Promote Paid Runtime Release" main "${promote_started_at}" "private Pro live promotion" 3600
-
- # Customer activation is one final publication barrier. All exact-version
- # artifacts, mutable image aliases, and the live paid-runtime manifest are
- # ready before the GitHub release becomes visible. If public asset reads fail
- # immediately after activation, quarantine the release back to draft.
+ promote_dispatch="$(
+ jq -n \
+ --arg version "${VERSION}" \
+ --arg r2_prefix "${R2_PREFIX}" \
+ --arg allow_ga_prefix "${allow_ga_publish}" \
+ '{
+ ref: "main",
+ return_run_details: true,
+ inputs: {
+ version: $version,
+ r2_prefix: $r2_prefix,
+ allow_ga_prefix: $allow_ga_prefix
+ }
+ }' | \
+ gh api \
+ --method POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2026-03-10" \
+ repos/rcourtman/pulse-pro/actions/workflows/promote-paid-runtime-release.yml/dispatches \
+ --input -
+ )"
+ promote_run_id="$(jq -r '.workflow_run_id // empty' <<<"${promote_dispatch}")"
+ wait_for_workflow rcourtman/pulse-pro "${promote_run_id}" "private Pro live promotion" 3600
+
+ # Customer activation is the publication barrier between exact-version
+ # staging and every mutable customer pointer or live environment. If public
+ # asset reads fail immediately after activation, quarantine the release back
+ # to draft before those downstream mutations become eligible to run.
activate_release:
needs:
- prepare
- create_release
- release_readiness
- - update_stable_demo
- - promote_floating_tags
- - promote_private_pro_runtime
- if: ${{ always() && needs.prepare.result == 'success' && needs.create_release.result == 'success' && needs.release_readiness.result == 'success' && needs.promote_floating_tags.result == 'success' && ( !startsWith(needs.prepare.outputs.version, '6.') || needs.promote_private_pro_runtime.result == 'success' ) && ( !startsWith(needs.prepare.outputs.version, '6.') || needs.prepare.outputs.is_prerelease == 'true' || needs.update_stable_demo.result == 'success' ) }}
+ if: ${{ always() && needs.prepare.result == 'success' && needs.create_release.result == 'success' && needs.release_readiness.result == 'success' }}
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
@@ -1705,7 +1707,7 @@ jobs:
trap - ERR
rm -f "$release_json" "$publish_payload" "$quarantine_payload"
- echo "[OK] Activated ${TAG} after every customer-facing release path was ready."
+ echo "[OK] Activated and publicly verified ${TAG}; mutable customer promotion may begin."
release_verdict:
name: Definitive Release Verdict
@@ -1768,7 +1770,7 @@ jobs:
require_result "exact-version Docker staging" "$DOCKER_RESULT" success
require_result "staged install.sh smoke" "$INSTALL_RESULT" success
require_result "Helm staging" "$HELM_RESULT" success
- require_result "public Helm repository staging" "$HELM_PAGES_RESULT" success
+ require_result "public Helm repository promotion" "$HELM_PAGES_RESULT" success
require_result "immutable release readiness" "$READINESS_RESULT" success
require_result "floating-tag promotion" "$FLOATING_RESULT" success
require_result "release activation" "$ACTIVATION_RESULT" success
diff --git a/.github/workflows/helm-pages.yml b/.github/workflows/helm-pages.yml
index 18e79f7611..c7a3fbc713 100644
--- a/.github/workflows/helm-pages.yml
+++ b/.github/workflows/helm-pages.yml
@@ -2,8 +2,9 @@ name: Release Helm Chart to GitHub Pages
run-name: Release Helm Chart ${{ inputs.chart_version }}
# Called explicitly from create-release.yml after the exact Docker image is
-# pullable, or dispatched manually for a governed backfill. The release
-# pipeline awaits this workflow before customer activation.
+# pullable and the GitHub release is activated, or dispatched manually for a
+# governed published-release backfill. This workflow mutates the public Pages
+# index and must never advertise a draft or quarantined release.
on:
workflow_call:
inputs:
@@ -54,6 +55,22 @@ jobs:
--purpose "Helm pages release" \
--github-output "$GITHUB_OUTPUT"
+ - name: Require activated GitHub release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ RELEASE_TAG: ${{ steps.version.outputs.release_tag }}
+ run: |
+ set -euo pipefail
+ release_state="$(gh release view "${RELEASE_TAG}" --json isDraft,publishedAt,tagName \
+ --jq '[.tagName, (.isDraft | tostring), (.publishedAt // "")] | @tsv')"
+ actual_tag="$(awk -F '\t' '{print $1}' <<<"${release_state}")"
+ is_draft="$(awk -F '\t' '{print $2}' <<<"${release_state}")"
+ published_at="$(awk -F '\t' '{print $3}' <<<"${release_state}")"
+ if [ "${actual_tag}" != "${RELEASE_TAG}" ] || [ "${is_draft}" != "false" ] || [ -z "${published_at}" ]; then
+ echo "::error::Helm Pages refuses to advertise inactive release ${RELEASE_TAG}."
+ exit 1
+ fi
+
- name: Check out validated release tag
env:
RELEASE_TAG: ${{ steps.version.outputs.release_tag }}
diff --git a/.github/workflows/promote-floating-tags.yml b/.github/workflows/promote-floating-tags.yml
index 080120f1ce..5978d78bcf 100644
--- a/.github/workflows/promote-floating-tags.yml
+++ b/.github/workflows/promote-floating-tags.yml
@@ -2,8 +2,9 @@ name: Promote Floating Tags
run-name: Promote Floating Tags ${{ inputs.tag }}
# Promotes floating tags for the Pulse server and control-plane images at the
-# release activation barrier. The exact-version images are staged first by
-# publish-docker.yml; this workflow is the sole owner of mutable aliases.
+# post-activation promotion barrier. The exact-version images are staged first
+# by publish-docker.yml; this workflow is the sole owner of mutable aliases and
+# refuses to point them at a draft or quarantined GitHub release.
#
# Triggers:
# - workflow_call: called explicitly from create-release.yml after the exact
@@ -82,6 +83,22 @@ jobs:
--tag "${TAG}" \
--purpose "floating-tag promotion"
+ - name: Require activated GitHub release
+ env:
+ GH_TOKEN: ${{ github.token }}
+ TAG: ${{ steps.extract.outputs.tag }}
+ run: |
+ set -euo pipefail
+ release_state="$(gh release view "${TAG}" --json isDraft,publishedAt,tagName \
+ --jq '[.tagName, (.isDraft | tostring), (.publishedAt // "")] | @tsv')"
+ actual_tag="$(awk -F '\t' '{print $1}' <<<"${release_state}")"
+ is_draft="$(awk -F '\t' '{print $2}' <<<"${release_state}")"
+ published_at="$(awk -F '\t' '{print $3}' <<<"${release_state}")"
+ if [ "${actual_tag}" != "${TAG}" ] || [ "${is_draft}" != "false" ] || [ -z "${published_at}" ]; then
+ echo "::error::Floating-tag promotion refuses inactive release ${TAG}."
+ exit 1
+ fi
+
- name: Log in to Docker Hub
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
diff --git a/.github/workflows/update-demo-server.yml b/.github/workflows/update-demo-server.yml
index 687cbbcbe0..f44c8c27e9 100644
--- a/.github/workflows/update-demo-server.yml
+++ b/.github/workflows/update-demo-server.yml
@@ -17,11 +17,6 @@ on:
required: false
default: false
type: boolean
- release_id:
- description: 'Optional staged GitHub release ID used before customer activation'
- required: false
- default: ''
- type: string
workflow_dispatch:
inputs:
tag:
@@ -41,11 +36,6 @@ on:
required: false
default: false
type: boolean
- release_id:
- description: 'Optional staged GitHub release ID'
- required: false
- default: ''
- type: string
permissions:
contents: read
@@ -203,44 +193,10 @@ jobs:
- name: Wait for release assets
if: inputs.verify_only != true
- env:
- GH_TOKEN: ${{ github.token }}
- RELEASE_ID: ${{ inputs.release_id }}
run: |
set -euo pipefail
TAG="${{ needs.resolve.outputs.tag }}"
- if [ -n "${RELEASE_ID:-}" ]; then
- release_state=$(gh api "repos/${{ github.repository }}/releases/${RELEASE_ID}" \
- --jq '[.tag_name, (.draft | tostring), (.published_at // "")] | @tsv')
- actual_tag=$(awk -F '\t' '{print $1}' <<<"$release_state")
- is_draft=$(awk -F '\t' '{print $2}' <<<"$release_state")
- published_at=$(awk -F '\t' '{print $3}' <<<"$release_state")
- if [ "$actual_tag" != "$TAG" ] || [ "$is_draft" != "true" ] || [ -n "$published_at" ]; then
- echo "::error::Release ${RELEASE_ID} is not the unpublished draft for ${TAG}."
- exit 1
- fi
-
- assets_json=$(mktemp)
- gh api --paginate "repos/${{ github.repository }}/releases/${RELEASE_ID}/assets?per_page=100" \
- | jq -s 'add' > "$assets_json"
- tarball="pulse-${TAG}-linux-amd64.tar.gz"
- for asset_name in "$tarball" "${tarball}.sshsig"; do
- asset_id=$(jq -r --arg name "$asset_name" \
- 'map(select(.name == $name)) | if length == 1 then .[0].id else empty end' \
- "$assets_json")
- if [ -z "$asset_id" ]; then
- echo "::error::Draft release ${RELEASE_ID} does not contain exactly one ${asset_name} asset."
- exit 1
- fi
- gh api -H 'Accept: application/octet-stream' \
- "repos/${{ github.repository }}/releases/assets/${asset_id}" > "/tmp/${asset_name}"
- done
- rm -f "$assets_json"
- echo "Staged release assets are available for the demo update."
- exit 0
- fi
-
- echo "Waiting for release assets to be available..."
+ echo "Waiting for activated release assets to be available..."
MAX_ATTEMPTS=30
ATTEMPT=0
@@ -472,24 +428,15 @@ jobs:
env:
DEMO_SERVER_HOST: ${{ secrets.DEMO_SERVER_HOST }}
DEMO_SERVER_USER: ${{ secrets.DEMO_SERVER_USER }}
- RELEASE_ID: ${{ inputs.release_id }}
run: |
set -euo pipefail
scp -i ~/.ssh/id_ed25519 /tmp/pulse-install.sh "$DEMO_SERVER_USER@$DEMO_SERVER_HOST:/tmp/pulse-install.sh"
- if [ -n "${RELEASE_ID:-}" ]; then
- TAG="${{ needs.resolve.outputs.tag }}"
- tarball="pulse-${TAG}-linux-amd64.tar.gz"
- scp -i ~/.ssh/id_ed25519 \
- "/tmp/${tarball}" "/tmp/${tarball}.sshsig" \
- "$DEMO_SERVER_USER@$DEMO_SERVER_HOST:/tmp/"
- fi
- name: Update demo server
if: inputs.verify_only != true && steps.current.outputs.skip_current != 'true'
env:
DEMO_SERVER_HOST: ${{ secrets.DEMO_SERVER_HOST }}
DEMO_SERVER_USER: ${{ secrets.DEMO_SERVER_USER }}
- RELEASE_ID: ${{ inputs.release_id }}
run: |
set -euo pipefail
TAG="${{ needs.resolve.outputs.tag }}"
@@ -498,28 +445,16 @@ jobs:
set -euo pipefail
TAG="$1"
SERVICE_NAME="$2"
- USE_STAGED_ARCHIVE="$3"
INSTALLER_ENV=()
if [ -n "$SERVICE_NAME" ]; then
INSTALLER_ENV+=("PULSE_SERVICE_NAME=$SERVICE_NAME")
fi
- if [ "$USE_STAGED_ARCHIVE" = "true" ]; then
- tarball="pulse-${TAG}-linux-amd64.tar.gz"
- sudo env "${INSTALLER_ENV[@]}" bash /tmp/pulse-install.sh \
- --archive "/tmp/${tarball}" --disable-auto-updates
- rm -f "/tmp/${tarball}" "/tmp/${tarball}.sshsig"
- else
- sudo env "${INSTALLER_ENV[@]}" bash /tmp/pulse-install.sh --version "$TAG"
- fi
+ sudo env "${INSTALLER_ENV[@]}" bash /tmp/pulse-install.sh --version "$TAG"
rm -f /tmp/pulse-install.sh
EOF
)
- use_staged_archive=false
- if [ -n "${RELEASE_ID:-}" ]; then
- use_staged_archive=true
- fi
ssh -i ~/.ssh/id_ed25519 "$DEMO_SERVER_USER@$DEMO_SERVER_HOST" \
- "bash -s -- $(printf '%q ' "$TAG" "$SERVICE_NAME" "$use_staged_archive")" <<<"$REMOTE_SCRIPT"
+ "bash -s -- $(printf '%q ' "$TAG" "$SERVICE_NAME")" <<<"$REMOTE_SCRIPT"
- name: Restore demo runtime configuration
if: inputs.verify_only != true
diff --git a/docs/release-control/v6/internal/RELEASE_PROMOTION_POLICY.md b/docs/release-control/v6/internal/RELEASE_PROMOTION_POLICY.md
index 5726aa4d53..3b02a80260 100644
--- a/docs/release-control/v6/internal/RELEASE_PROMOTION_POLICY.md
+++ b/docs/release-control/v6/internal/RELEASE_PROMOTION_POLICY.md
@@ -126,18 +126,24 @@ TLS-unverified receipts leave the claim at `implemented` or
4. A private Pro build from a moving branch is valid only as an internal proof
artifact. It is not valid customer guidance and must not update the live
paid-download manifest or private Docker customer tag.
-5. Customer-facing private Pro archive and Docker publication is part of the
- public v6 release pipeline. After `validate-release-assets.yml` succeeds for
- a non-draft v6 release, `create-release.yml` must dispatch
+5. Customer-facing private Pro archive and exact-version Docker staging is part
+ of the public v6 release pipeline. After the governed tag and unpublished
+ draft exist, `create-release.yml` must dispatch
`rcourtman/pulse-enterprise` `Build Pro Release` against the exact public
tag with `upload_to_r2=true`, `publish_docker_image=true`, and an R2 prefix
- derived by the release run, then wait for that workflow to succeed.
-6. The public v6 release pipeline must then dispatch `rcourtman/pulse-pro`
- `Promote Paid Runtime Release` with the same version and R2 prefix, and
- wait for the signed packet to promote the live paid-download broker. A failed
- private build or failed live promotion fails the public release workflow;
- private Pro RC/GA advancement must not depend on an operator noticing a
- checklist item after the public RC has shipped.
+ derived by the release run, then wait for that workflow to succeed. Every
+ cross-repository dispatch must request GitHub's returned workflow-run details
+ and poll that exact run ID. Selecting the newest run by workflow, branch, or
+ dispatch timestamp is forbidden because different release versions and manual
+ dispatches may run concurrently.
+6. The public v6 release pipeline must publish and publicly verify the GitHub
+ release before it dispatches `rcourtman/pulse-pro` `Promote Paid Runtime
+ Release` with the same version and R2 prefix. The live paid-download broker
+ is a mutable customer pointer and must never advance to a release that can
+ still be returned to draft quarantine by activation verification. A failed
+ private build or live promotion fails the public release workflow; private
+ Pro RC/GA advancement must not depend on an operator noticing a checklist
+ item after the public RC has shipped.
7. Customer-facing private Pro archive or Docker promotion must use the generated
paid-runtime proof packet from the Pro release workflow. The canonical command
is `scripts/promote_paid_runtime_release_packet.sh --release-dir <proof-packet-dir> --admin-token-file <explicit-token-file> --execute-live`
@@ -260,17 +266,24 @@ TLS-unverified receipts leave the claim at `implemented` or
machine-readable manifest that pins source SHA, version, filename, size, and
SHA-256 for every release asset. Publication downloads and verifies that
exact candidate; it must not rebuild release binaries or installers.
-3. Standard post-publication asset verification compares the candidate
+3. Standard staged asset verification compares the candidate
manifest with GitHub's server-side release-asset SHA-256 digests. It must
not re-download the multi-gigabyte release packet merely to recompute hashes
already proven before upload. Manual and release-edit repair validation may
retain the full-download fallback when no same-run candidate manifest exists.
-4. Docker publication, release-asset verification, and the private Pro build
- begin independently as soon as the release exists. Helm, floating tags,
- install smoke, stable demo deployment, and private paid-runtime promotion
- retain their required dependencies, and `Definitive Release Verdict` still
+4. Exact-version Docker publication, staged release-asset verification, exact
+ Helm OCI publication, staged install smoke, and the exact-version private
+ Pro build begin from the unpublished draft and converge at one immutable
+ readiness gate. `activate_release` is the next and only transition: it
+ publishes the GitHub release, verifies the public checksums, installer, and
+ canonical Linux archive URLs, and returns the release to draft quarantine
+ on verification failure.
+5. Mutable Docker aliases, the live paid-runtime broker, the public Helm Pages
+ index, and stable demo deployment depend directly on successful activation.
+ They may fan out in parallel only after the release can no longer be
+ quarantined by activation verification. `Definitive Release Verdict` still
fails unless every applicable terminal result passes.
-5. `Release Dry Run` remains the no-public-release rehearsal surface. It calls
+6. `Release Dry Run` remains the no-public-release rehearsal surface. It calls
the same candidate builder and no-mutation demo verification, but a separate
dry run is not required before a normal release because the single publish
workflow performs the exact-SHA preflight before crossing the publication
@@ -309,7 +322,10 @@ TLS-unverified receipts leave the claim at `implemented` or
public health/browser verification, install smoke, Helm publication,
floating-tag promotion, and private Pro promotion where applicable. The
terminal `Definitive Release Verdict` job is the one release result; an
- asynchronously dispatched demo workflow is not release completion.
+ asynchronously dispatched demo workflow is not release completion. Every
+ mutable pointer and live-environment job must depend on successful GitHub
+ release activation and public verification, never only on pre-activation
+ exact-version readiness.
## Rollout Rules
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 9eb31f91e4..362e9da399 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -444,9 +444,10 @@ upgrade, update, release, or artifact-selection behavior.
release checks run in parallel. `create-release.yml` may stage only that
candidate after `scripts/release_candidate_manifest.py` verifies its version, source
SHA, filenames, sizes, and SHA-256 values. The GitHub release must remain an
- unpublished draft until every exact-version customer artifact and mutable
- customer pointer required by the cut has passed its owned proof. Standard
- post-upload validation
+ unpublished draft until every exact-version customer artifact required by
+ the cut has passed its owned proof. It must then be published and publicly
+ verified before any mutable customer pointer or live environment advances.
+ Standard post-upload validation
must compare that manifest with GitHub's server-side asset digests instead
of downloading the complete release packet again. Historical repair and
release-edit validation may use the full-download fallback because those
@@ -908,21 +909,27 @@ upgrade, update, release, or artifact-selection behavior.
governed tag and unpublished draft exist, in parallel with public asset
validation. It must pass the exact public tag/version, set
`upload_to_r2=true` and `publish_docker_image=true`, and wait for the exact
- private image and signed R2 packet to succeed. Only after public release
+ private image and signed R2 packet to succeed. The dispatcher must request
+ workflow-run details from GitHub and poll the exact returned run ID; it must
+ never infer its child from the newest matching workflow/branch/timestamp,
+ because version-scoped release concurrency and manual dispatches can overlap.
+ Only after public release
asset validation, staged install smoke, exact public Docker publication,
- Helm publication, and floating-image promotion succeed may it call the
- private `rcourtman/pulse-pro` `Promote Paid Runtime Release` workflow with
- the same version and R2 prefix.
+ exact Helm OCI publication, and successful GitHub release activation and
+ public verification may it call the private `rcourtman/pulse-pro` `Promote
+ Paid Runtime Release` workflow with the same version and R2 prefix.
The promotion workflow downloads the signed proof packet and runs
`scripts/promote_paid_runtime_release_packet.sh --release-dir <proof-packet-dir> --execute-live`
from `repos/pulse-pro`. That command is the canonical live-broker promotion
path because it validates the signed proof packet, installs the exact
manifest on `pulse-license`, runs the customer-path live proof, and restores
the previous remote manifest if the gate fails. GA promotions also require
- `--allow-ga-prefix`. A failed private build or failed live promotion must
- leave the GitHub release unpublished and fail the public release workflow;
- future private Pro publication must not depend on an operator noticing a
- manual checklist step after the public RC has shipped.
+ `--allow-ga-prefix`. A failed private build leaves the GitHub release
+ unpublished; a failed live promotion leaves the already activated GitHub
+ release public and restores the previous broker manifest. Both failures
+ must fail the public release workflow; future private Pro publication must
+ not depend on an operator noticing a manual checklist step after the public
+ RC has shipped.
A promotion-only failure must be recoverable by rerunning the public
release run's failed jobs: the paid-runtime R2 prefix is derived from
run-stable values (the run's creation date and run id, never the
@@ -933,23 +940,24 @@ upgrade, update, release, or artifact-selection behavior.
A rebuilt packet from identical inputs is waste and lineage churn; a
non-empty prefix that fails packet validation must fail the private build
instead of being overwritten.
- GitHub release publication is the final customer notification boundary, not
- the trigger for downstream artifact work. `activate_release` must verify the
- draft's tag, target commit, prerelease state, and unpublished state, depend
- on all required public and private readiness jobs, and only then PATCH
+ GitHub release publication is the atomic barrier between exact-version
+ staging and mutable customer rollout, not a final notification after live
+ pointers have already moved. `activate_release` must verify the draft's tag,
+ target commit, prerelease state, and unpublished state, depend on all
+ required immutable public and private readiness jobs, and only then PATCH
`draft=false`. It must prove the public checksums, installer, and canonical
Linux archive URLs immediately after activation; a failed public read must
- attempt to return the release to draft quarantine and fail closed. Exact
- version artifacts may exist before this boundary so they can be tested, but
- no GitHub release may advertise a version whose private Pro image or broker
- manifest is still missing.
+ attempt to return the release to draft quarantine and fail closed before
+ any mutable pointer or live-environment job becomes eligible. Exact-version
+ artifacts may exist before this boundary so they can be tested.
One immutable-readiness join must cover the staged release packet, staged
- install smoke, exact public Docker images, both Helm distribution paths, and
- (for v6) the exact Pro image and signed packet. Only after that join succeeds
- may the Docker floating aliases and paid-runtime broker manifest advance;
- those independent mutable pointers should advance in parallel, and final
- GitHub publication must await both, minimizing the unavoidable cross-system
- activation interval without pretending the registries share a transaction.
+ install smoke, exact public Docker images, exact Helm OCI chart, and (for
+ v6) the exact Pro image and signed packet. After that join, activation and
+ public verification must succeed before the Docker floating aliases,
+ paid-runtime broker manifest, public Helm Pages index, or stable demo may
+ advance. Those independent post-activation mutations may run in parallel,
+ and the definitive verdict must await all of them without pretending the
+ external systems share a transaction.
A support-only private Pro prerelease image is a narrower exception for
customer verification of an already-fixed defect. It may dispatch the private
`Build Pro Release` workflow with `publish_docker_image=true`,
@@ -1056,8 +1064,9 @@ upgrade, update, release, or artifact-selection behavior.
awaited `workflow_call` from `create-release.yml`, not an asynchronous
`workflow_run` child of Docker publication. It must package from the exact
validated release tag without committing generated metadata back onto the
- governed source branch, then prove the public Pages repository can resolve
- and download that exact chart version before final release activation.
+ governed source branch. It must refuse a draft or quarantined GitHub release,
+ then prove the public Pages repository can resolve and download that exact
+ chart version as a post-activation promotion gate.
After pushing the OCI chart, `publish-helm-chart.yml` must prove the
pushed chart is readable from GHCR without registry credentials by logging
out of `ghcr.io` and running `helm show chart` against the versioned chart
@@ -1072,9 +1081,9 @@ upgrade, update, release, or artifact-selection behavior.
publisher must publish only immutable version tags; `promote-floating-tags`
is the sole owner of `rc`, `latest`, major, and major/minor aliases for both
`pulse` and `pulse-control-plane` on Docker Hub and GHCR. It must expose
- `workflow_call` inputs (`tag`, `prerelease`), and the create-release wiring
- must gate on `validate_release_assets` and exact Docker publication so every
- alias points at a pullable manifest before GitHub release activation.
+ `workflow_call` inputs (`tag`, `prerelease`), refuse a draft or quarantined
+ GitHub release, and depend on successful activation in the create-release
+ wiring so every alias points at an already-public, verified release.
Generated chart docs are part of the packaged release artifact, not a
disposable byproduct: when the stable candidate version changes, the checked
in `deploy/helm/pulse/README.md` output must be regenerated from the same
@@ -1787,11 +1796,12 @@ loop must not hide an ACL, peer-propagation, firewall, or sshd failure.
`create-release.yml` must call the update workflow as an awaited reusable job,
and its terminal `Definitive Release Verdict` must require stable demo runtime,
frontend, public health, and browser proof. During a stable release cut, the
-update workflow must accept the staged draft release ID, download the exact
-Linux archive and signature through the authenticated release-assets API, and
-install that archive without waiting for the public release URL. The stable
-demo update may run in parallel with the other mutable customer pointers after
-immutable readiness, and final GitHub publication must await its proof. An
+update workflow must wait for the activated public release assets and install
+the exact requested version through the normal signed release path. It must not
+accept an unpublished draft release ID or install draft assets into the live
+demo. The stable demo update may run in parallel with the other mutable
+customer pointers only after activation, and the definitive verdict must await
+its proof. An
asynchronous dispatch or manual SSH deployment is not release completion. A one-shot `ssh-keyscan`
against a private demo target is not sufficient release or deploy proof.
Those same workflows also own customer-visible browser truth for the public
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index 8184beb65e..0dff8a2d6f 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -379,7 +379,7 @@ func TestCreateReleaseUploadsPowerShellInstaller(t *testing.T) {
// customer activation sequence.
`needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true'`,
`activate_release:`,
- `needs.promote_private_pro_runtime.result == 'success'`,
+ `needs.activate_release.result == 'success'`,
`Publish the fully staged release`,
`'{draft: false, make_latest: $make_latest}'`,
`returning ${TAG} to draft quarantine`,
@@ -402,8 +402,8 @@ func TestCreateReleaseUploadsPowerShellInstaller(t *testing.T) {
t.Fatal("release_readiness must skip historical backfill and draft-only runs")
}
floatingJob := workflowJobBlock(t, workflow, "promote_floating_tags")
- if !strings.Contains(floatingJob, `needs.release_readiness.result == 'success'`) {
- t.Fatal("floating-tag promotion must run only after the immutable readiness barrier")
+ if !strings.Contains(floatingJob, `needs.activate_release.result == 'success'`) {
+ t.Fatal("floating-tag promotion must run only after successful public activation")
}
if !strings.Contains(workflow, `draft: true`) {
@@ -1243,6 +1243,9 @@ func TestDeploymentDefaultsPinVersionedImagesAndHelmDocsChecksum(t *testing.T) {
required := []string{
`workflow_call:`,
`chart_version:`,
+ `Require activated GitHub release`,
+ `gh release view "${RELEASE_TAG}" --json isDraft,publishedAt,tagName`,
+ `Helm Pages refuses to advertise inactive release ${RELEASE_TAG}.`,
`HELM_DOCS_VERSION="1.14.2"`,
`HELM_DOCS_ARCHIVE="helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz"`,
`HELM_DOCS_SHA256="a8cf72ada34fad93285ba2a452b38bdc5bd52cc9a571236244ec31022928d6cc"`,
@@ -1368,10 +1371,8 @@ func TestUpdateDemoWorkflowUsesGovernedNetworkPath(t *testing.T) {
`bash .github/scripts/check-demo-reachability.sh`,
`workflow_call:`,
`verify_only:`,
- `release_id:`,
- `repos/${{ github.repository }}/releases/${RELEASE_ID}/assets?per_page=100`,
- `Accept: application/octet-stream`,
- `--archive "/tmp/${tarball}" --disable-auto-updates`,
+ `Waiting for activated release assets to be available`,
+ `bash /tmp/pulse-install.sh --version "$TAG"`,
`Refuse mutation during verification-only checks`,
`uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0`,
`go run ./scripts/release_update_key.go public-key-ssh`,
@@ -1406,6 +1407,16 @@ func TestUpdateDemoWorkflowUsesGovernedNetworkPath(t *testing.T) {
t.Fatalf("update-demo-server workflow missing governed network path: %s", needle)
}
}
+ for _, forbidden := range []string{
+ `release_id:`,
+ `RELEASE_ID: ${{ inputs.release_id }}`,
+ `--archive "/tmp/${tarball}"`,
+ `unpublished draft`,
+ } {
+ if strings.Contains(workflow, forbidden) {
+ t.Fatalf("update-demo-server.yml must not deploy draft release assets; found %q", forbidden)
+ }
+ }
}
func TestDemoSshSetupHelperHandlesIpLiteralTargets(t *testing.T) {
@@ -1847,6 +1858,9 @@ func TestPromoteFloatingTagsReachableViaWorkflowCall(t *testing.T) {
`prerelease:`,
`type: boolean`,
`TAG="${INPUT_TAG}"`,
+ `Require activated GitHub release`,
+ `gh release view "${TAG}" --json isDraft,publishedAt,tagName`,
+ `Floating-tag promotion refuses inactive release ${TAG}.`,
`for image in pulse pulse-control-plane; do`,
`"rcourtman/${image}:rc"`,
`"ghcr.io/${OWNER}/${image}:latest"`,
@@ -1935,6 +1949,9 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
readinessJob := workflowJobBlock(t, createWorkflow, "release_readiness")
privatePromotionJob := workflowJobBlock(t, createWorkflow, "promote_private_pro_runtime")
activationJob := workflowJobBlock(t, createWorkflow, "activate_release")
+ floatingJob := workflowJobBlock(t, createWorkflow, "promote_floating_tags")
+ helmPagesJob := workflowJobBlock(t, createWorkflow, "publish_helm_pages")
+ demoJob := workflowJobBlock(t, createWorkflow, "update_stable_demo")
for _, needle := range []string{
`./scripts/build-release.sh "${{ inputs.version }}"`,
@@ -1985,31 +2002,56 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
"- validate_release_assets",
"- install_sh_smoke",
"- publish_helm_chart",
- "- publish_helm_pages",
"- stage_private_pro_runtime",
} {
if !strings.Contains(readinessJob, dependency) {
t.Fatalf("immutable release readiness missing dependency: %s", dependency)
}
}
- for _, dependency := range []string{"- release_readiness", "- stage_private_pro_runtime"} {
- if !strings.Contains(privatePromotionJob, dependency) {
- t.Fatalf("private Pro live promotion missing staging dependency: %s", dependency)
+ for _, forbiddenDependency := range []string{
+ "- publish_helm_pages",
+ "- promote_floating_tags",
+ "- promote_private_pro_runtime",
+ "- update_stable_demo",
+ } {
+ if strings.Contains(readinessJob, forbiddenDependency) {
+ t.Fatalf("immutable readiness must exclude mutable customer state: %s", forbiddenDependency)
}
}
- for _, dependency := range []string{
- "- release_readiness",
+ if !strings.Contains(activationJob, "- release_readiness") {
+ t.Fatal("release activation must depend on immutable release readiness")
+ }
+ for _, forbiddenDependency := range []string{
"- update_stable_demo",
"- promote_floating_tags",
"- promote_private_pro_runtime",
} {
- if !strings.Contains(activationJob, dependency) {
- t.Fatalf("release activation missing readiness dependency: %s", dependency)
+ if strings.Contains(activationJob, forbiddenDependency) {
+ t.Fatalf("release activation must precede mutable customer state: %s", forbiddenDependency)
}
}
if !strings.Contains(activationJob, `'{draft: false, make_latest: $make_latest}'`) {
t.Fatal("release activation must be the job that crosses the draft publication boundary")
}
+ for jobName, jobBlock := range map[string]string{
+ "floating-tag promotion": floatingJob,
+ "public Helm Pages promotion": helmPagesJob,
+ "private Pro live promotion": privatePromotionJob,
+ "stable demo deployment": demoJob,
+ } {
+ if !strings.Contains(jobBlock, "- activate_release") ||
+ !strings.Contains(jobBlock, `needs.activate_release.result == 'success'`) {
+ t.Fatalf("%s must depend on successful public activation", jobName)
+ }
+ }
+ for _, dependency := range []string{"- release_readiness", "- stage_private_pro_runtime", "- activate_release"} {
+ if !strings.Contains(privatePromotionJob, dependency) {
+ t.Fatalf("private Pro live promotion missing required dependency: %s", dependency)
+ }
+ }
+ if strings.Contains(demoJob, "release_id:") {
+ t.Fatal("stable demo must use activated public assets, not an unpublished release id")
+ }
for _, needle := range []string{
`inputs.candidate_manifest_artifact != ''`,
`scripts/release_candidate_manifest.py verify-release`,
@@ -2083,18 +2125,19 @@ func TestCreateReleasePublishesPrivateProRuntime(t *testing.T) {
`GH_TOKEN: ${{ secrets.WORKFLOW_PAT }}`,
`--json createdAt`,
`r2_prefix="${TAG}-pro-${run_created_date}-${GITHUB_RUN_ID}"`,
- `gh workflow run build-pro-release.yml`,
- `--repo rcourtman/pulse-enterprise`,
- `-f pulse_ref="${TAG}"`,
- `-f version="${VERSION}"`,
- `-f upload_actions_artifact=false`,
- `-f upload_to_r2=true`,
- `-f publish_docker_image=true`,
- `-f docker_image=license.pulserelay.pro/pulse-pro`,
- `-f r2_prefix="${r2_prefix}"`,
- `-f reuse_existing_packet=true`,
- `-f allow_stable_ga_publish="${allow_ga_publish}"`,
- `wait_for_workflow rcourtman/pulse-enterprise "Build Pro Release" main "${build_started_at}" "private Pro build"`,
+ `return_run_details: true`,
+ `pulse_ref: $pulse_ref`,
+ `version: $version`,
+ `upload_actions_artifact: "false"`,
+ `upload_to_r2: "true"`,
+ `publish_docker_image: "true"`,
+ `docker_image: "license.pulserelay.pro/pulse-pro"`,
+ `r2_prefix: $r2_prefix`,
+ `reuse_existing_packet: "true"`,
+ `allow_stable_ga_publish: $allow_stable_ga_publish`,
+ `repos/rcourtman/pulse-enterprise/actions/workflows/build-pro-release.yml/dispatches`,
+ `build_run_id="$(jq -r '.workflow_run_id // empty' <<<"${build_dispatch}")"`,
+ `wait_for_workflow rcourtman/pulse-enterprise "${build_run_id}" "private Pro build"`,
`echo "r2_prefix=${r2_prefix}" >> "$GITHUB_OUTPUT"`,
} {
if !strings.Contains(stageJob, needle) {
@@ -2104,11 +2147,12 @@ func TestCreateReleasePublishesPrivateProRuntime(t *testing.T) {
for _, needle := range []string{
`needs.stage_private_pro_runtime.result == 'success'`,
`R2_PREFIX: ${{ needs.stage_private_pro_runtime.outputs.r2_prefix }}`,
- `gh workflow run promote-paid-runtime-release.yml`,
- `--repo rcourtman/pulse-pro`,
- `-f r2_prefix="${R2_PREFIX}"`,
- `-f allow_ga_prefix="${allow_ga_publish}"`,
- `wait_for_workflow rcourtman/pulse-pro "Promote Paid Runtime Release" main "${promote_started_at}" "private Pro live promotion"`,
+ `return_run_details: true`,
+ `r2_prefix: $r2_prefix`,
+ `allow_ga_prefix: $allow_ga_prefix`,
+ `repos/rcourtman/pulse-pro/actions/workflows/promote-paid-runtime-release.yml/dispatches`,
+ `promote_run_id="$(jq -r '.workflow_run_id // empty' <<<"${promote_dispatch}")"`,
+ `wait_for_workflow rcourtman/pulse-pro "${promote_run_id}" "private Pro live promotion"`,
`echo "::error::${label} failed with conclusion=${conclusion}: ${url}"`,
} {
if !strings.Contains(promotionJob, needle) {
@@ -2118,6 +2162,24 @@ func TestCreateReleasePublishesPrivateProRuntime(t *testing.T) {
if strings.Contains(stageJob, "continue-on-error: true") || strings.Contains(promotionJob, "continue-on-error: true") {
t.Fatal("private Pro staging and promotion must fail the release pipeline on error")
}
+ for label, job := range map[string]string{
+ "private Pro staging": stageJob,
+ "private Pro promotion": promotionJob,
+ } {
+ if strings.Contains(job, "gh run list") || strings.Contains(job, "started_at") {
+ t.Fatalf("%s must not infer a downstream run from time-ordered workflow listings", label)
+ }
+ for _, needle := range []string{
+ `-H "X-GitHub-Api-Version: 2026-03-10"`,
+ `local run_id="$2"`,
+ `gh run view "${run_id}"`,
+ `did not return an exact workflow run ID`,
+ } {
+ if !strings.Contains(job, needle) {
+ t.Fatalf("%s missing exact downstream-run correlation contract: %s", label, needle)
+ }
+ }
+ }
}
func TestHelmAgentRuntimePointsAtRealImage(t *testing.T) {
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index f2b7de954c..93022da707 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -38,6 +38,16 @@ def normalize_ws(text: str) -> str:
return " ".join(text.split())
+def workflow_job_block(workflow: str, job: str) -> str:
+ match = re.search(
+ rf"(?ms)^ {re.escape(job)}:\n.*?(?=^ [A-Za-z0-9_]+:\n|\Z)",
+ workflow,
+ )
+ if match is None:
+ raise AssertionError(f"workflow missing job {job}")
+ return match.group(0)
+
+
_RC_DRAFT_PACKET_NAME_RE = re.compile(r"^RELEASE_NOTES_v6_RC(\d+)_DRAFT\.md$")
@@ -141,6 +151,94 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
+ "\n- ".join(STAGED_GOVERNANCE_INPUT_ERRORS)
)
+ def test_release_activation_precedes_every_mutable_customer_target(self) -> None:
+ workflow = read(".github/workflows/create-release.yml")
+ readiness = workflow_job_block(workflow, "release_readiness")
+ activation = workflow_job_block(workflow, "activate_release")
+
+ for dependency in (
+ "create_release",
+ "publish_docker",
+ "validate_release_assets",
+ "install_sh_smoke",
+ "publish_helm_chart",
+ "stage_private_pro_runtime",
+ ):
+ self.assertIn(f"- {dependency}", readiness)
+ for mutable_job in (
+ "publish_helm_pages",
+ "promote_floating_tags",
+ "promote_private_pro_runtime",
+ "update_stable_demo",
+ ):
+ with self.subTest(mutable_job=mutable_job):
+ self.assertNotIn(f"- {mutable_job}", readiness)
+ self.assertNotIn(f"- {mutable_job}", activation)
+ mutable = workflow_job_block(workflow, mutable_job)
+ self.assertIn("- activate_release", mutable)
+ self.assertIn("needs.activate_release.result == 'success'", mutable)
+
+ self.assertIn("- release_readiness", activation)
+ self.assertIn("returning ${TAG} to draft quarantine", activation)
+ self.assertIn("Activated and publicly verified ${TAG}", activation)
+
+ demo = workflow_job_block(workflow, "update_stable_demo")
+ self.assertNotIn("release_id:", demo)
+ demo_workflow = read(".github/workflows/update-demo-server.yml")
+ self.assertNotIn("release_id:", demo_workflow)
+ self.assertNotIn("unpublished draft", demo_workflow)
+
+ for workflow_path, refusal in (
+ (
+ ".github/workflows/helm-pages.yml",
+ "Helm Pages refuses to advertise inactive release",
+ ),
+ (
+ ".github/workflows/promote-floating-tags.yml",
+ "Floating-tag promotion refuses inactive release",
+ ),
+ ):
+ with self.subTest(workflow_path=workflow_path):
+ guarded_workflow = read(workflow_path)
+ self.assertIn("Require activated GitHub release", guarded_workflow)
+ self.assertIn("--json isDraft,publishedAt,tagName", guarded_workflow)
+ self.assertIn(refusal, guarded_workflow)
+
+ def test_private_dispatches_wait_for_the_exact_created_run(self) -> None:
+ workflow = read(".github/workflows/create-release.yml")
+ cases = (
+ (
+ "stage_private_pro_runtime",
+ "repos/rcourtman/pulse-enterprise/actions/workflows/build-pro-release.yml/dispatches",
+ "build_run_id",
+ ),
+ (
+ "promote_private_pro_runtime",
+ "repos/rcourtman/pulse-pro/actions/workflows/promote-paid-runtime-release.yml/dispatches",
+ "promote_run_id",
+ ),
+ )
+
+ for job_name, endpoint, run_id_variable in cases:
+ with self.subTest(job_name=job_name):
+ job = workflow_job_block(workflow, job_name)
+ self.assertIn("return_run_details: true", job)
+ self.assertIn(
+ '-H "X-GitHub-Api-Version: 2026-03-10"',
+ job,
+ )
+ self.assertIn(endpoint, job)
+ self.assertIn(
+ f'{run_id_variable}="$(jq -r \'.workflow_run_id // empty\'',
+ job,
+ )
+ self.assertIn(f'"${{{run_id_variable}}}"', job)
+ self.assertIn('local run_id="$2"', job)
+ self.assertIn('gh run view "${run_id}"', job)
+ self.assertIn("did not return an exact workflow run ID", job)
+ self.assertNotIn("gh run list", job)
+ self.assertNotIn("started_at", job)
+
def test_release_promotion_policy_requires_live_rc_and_v5_policy(self) -> None:
content = read("docs/release-control/v6/internal/RELEASE_PROMOTION_POLICY.md")
self.assertIn("Every candidate intended for broad customer use must ship to `rc`", content)