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.

Parallelize inert release artifact staging

rcourtmane5389e213050
diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml
index 3631f79637..55a6872524 100644
--- a/.github/workflows/create-release.yml
+++ b/.github/workflows/create-release.yml
@@ -1081,9 +1081,7 @@ jobs:
needs:
- prepare
- build_release_candidate
- - qualify_release_containers
- - create_release
- if: ${{ always() && needs.prepare.result == 'success' && needs.build_release_candidate.result == 'success' && needs.qualify_release_containers.result == 'success' && needs.create_release.result == 'success' && needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true' }}
+ if: ${{ always() && needs.prepare.result == 'success' && needs.build_release_candidate.result == 'success' && needs.prepare.outputs.historical_asset_backfill_only != 'true' && github.event.inputs.draft_only != 'true' }}
permissions:
contents: read
packages: write
@@ -1094,7 +1092,7 @@ jobs:
with:
tag: ${{ needs.prepare.outputs.tag }}
container_artifact: ${{ needs.build_release_candidate.outputs.container_artifact_name }}
- source_sha: ${{ needs.create_release.outputs.target_commitish }}
+ source_sha: ${{ github.sha }}
validate_release_assets:
needs:
diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml
index 8f52dba638..68cace07f8 100644
--- a/.github/workflows/publish-docker.yml
+++ b/.github/workflows/publish-docker.yml
@@ -1,9 +1,10 @@
name: Publish Docker Images
run-name: Publish Docker Images ${{ inputs.tag }}
-# Called by create-release.yml after exact-candidate image qualification passes.
-# Assembles multi-arch images (amd64+arm64) from the verified candidate payload
-# and publishes them to Docker Hub and GHCR.
+# Called by create-release.yml as soon as the immutable candidate exists.
+# Exact-version images are inert staging surfaces, so assembly and publication
+# overlap container qualification and draft creation. The release-readiness
+# barrier still joins both paths before any customer-facing alias can move.
on:
workflow_call:
inputs:
@@ -65,20 +66,22 @@ jobs:
- name: Validate release line policy
env:
TAG: ${{ steps.version.outputs.tag }}
+ SOURCE_SHA: ${{ inputs.source_sha }}
run: |
set -euo pipefail
python3 scripts/release_control/validate_artifact_release_line.py \
--tag "${TAG}" \
+ --anticipated-source-sha "${SOURCE_SHA}" \
--purpose "Docker publish"
- - name: Check out validated release tag
+ - name: Verify exact source checkout
env:
- TAG: ${{ steps.version.outputs.tag }}
EXPECTED_SOURCE_SHA: ${{ inputs.source_sha }}
+ EXPECTED_VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
- git checkout --detach "refs/tags/${TAG}"
test "$(git rev-parse HEAD)" = "${EXPECTED_SOURCE_SHA}"
+ test "$(tr -d '\n\r[:space:]' < VERSION)" = "${EXPECTED_VERSION}"
- name: Download exact-candidate container payload
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
diff --git a/docs/release-control/v6/internal/records/release-acceleration-v6.3.0-rc.5-2026-08-21.md b/docs/release-control/v6/internal/records/release-acceleration-v6.3.0-rc.5-2026-08-21.md
index 1c8e4efc1d..7c2c53d3d3 100644
--- a/docs/release-control/v6/internal/records/release-acceleration-v6.3.0-rc.5-2026-08-21.md
+++ b/docs/release-control/v6/internal/records/release-acceleration-v6.3.0-rc.5-2026-08-21.md
@@ -111,3 +111,39 @@ dispatch-to-definitive-convergence objective remains open until a complete
release measures 15 minutes or less without weakening exact-SHA
qualification, signing, installer smoke, public/private integrity, or
convergence verification.
+
+## Remaining critical-path decomposition
+
+The definitive run proves that backend work is not the only path that must be
+shortened. Even with a zero-duration backend gate, the private staging child
+finished 16 minutes 52 seconds after source dispatch and public exact-version
+Docker publication finished 17 minutes 34 seconds after dispatch.
+
+The private child spent 148 seconds uploading and 214 seconds downloading an
+uncompressed 1.24 GB dual-repository compiled payload. That payload included
+the complete public frontend, MCP, server, and control-plane matrix even though
+Pro archive assembly consumes only the public Unified Agent matrix plus five
+Pro server binaries. Its hosted job then spent another 99 seconds deleting
+preinstalled SDKs and unrelated cached images despite starting with 12 GB free.
+The corrected handoff requests the canonical Pro-packaging profile, omits those
+unused public products, enables compressed artifact transfer, uses the current
+artifact client, and performs heavyweight disk cleanup only below an explicit
+8 GiB safety floor. Exact Pulse and pulse-enterprise SHA manifests remain the
+authority on both sides of the credential boundary.
+
+Public Docker publication took 5 minutes 1 second, but its prior dependency
+shape did not make it eligible until 12 minutes 33 seconds after dispatch. The
+corrected DAG makes exact-version Docker staging eligible as soon as the
+immutable candidate exists, which was 8 minutes 56 seconds after dispatch in
+the definitive run. Release-line validation accepts the anticipated tag only
+when it is bound to the exact 40-character source SHA on the governed release
+branch and rejects an existing tag at any other commit. Candidate container
+qualification, draft validation, Docker staging, and every other immutable
+gate still meet at `release_readiness`; only that join can open durable
+convergence and activation. On the observed rc.5 timings, the dependency change
+alone moves projected Docker completion to approximately 13 minutes 57 seconds.
+
+These projections do not close the objective. The release-acceleration claim
+remains open until the private payload reduction is measured, the production
+API decomposition produces a controlled PVE improvement, and a fresh exact-SHA
+release completes definitive customer convergence in 15 minutes or less.
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index ce3eba7bb7..60f192e1db 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -548,9 +548,14 @@ upgrade, update, release, or artifact-selection behavior.
useful test or compilation process has already completed.
Private Pro compilation must additionally bind the exact Pulse and
pulse-enterprise commits in a manifest-covered identity record. Its PVE job
- may compile the public payload and Pro server matrix, but the hosted private
- job must verify both SHAs before release signing, R2 upload, private-registry
- publication, or paid-runtime staging.
+ must compile only the public Unified Agent matrix actually embedded in Pro
+ archives plus the Pro server matrix; rebuilding the unused public frontend,
+ MCP, server, or control-plane payload is not part of this boundary. The
+ cross-repository handoff must remain manifest-bound, use compressed artifact
+ transfer, and let a hosted runner with sufficient free space skip destructive
+ image/toolchain cleanup. The hosted private job must verify both SHAs before
+ release signing, R2 upload, private-registry publication, or paid-runtime
+ staging.
Public and Pro server archives must use the shared canonical staging helper
and may assemble independent target archives concurrently with a bounded
worker count. The verified dual-SHA Pro path must stage its five archives
@@ -604,6 +609,16 @@ upgrade, update, release, or artifact-selection behavior.
paid-runtime broker unchanged. Public readiness must still verify the final
tag and every public artifact before convergence may activate that inert
private staging packet for customers.
+ The same rule applies to public exact-version Docker images. Once the
+ immutable candidate exists, their credentialed publication may overlap
+ container qualification and draft creation when release-line validation is
+ bound to the anticipated exact 40-character source SHA, verifies that SHA is
+ reachable from the governed release branch, and rejects an existing tag at
+ any other commit. Exact-version tags are inert staging surfaces; the
+ canonical `release_readiness` join must still require candidate container
+ qualification, draft release validation, exact Docker publication, installer
+ smoke, and every other immutable gate before activation or floating-alias
+ promotion.
The backend runner must compile the race-enabled `internal/api` test binary
once, enumerate every top-level test from that exact binary, and generate a
deterministic manifest proving a complete, disjoint partition. Each
@@ -2024,9 +2039,11 @@ possible to publish a provider MSP control-plane image that accepts
`ghcr.io/<owner>/pulse-control-plane` from that Dockerfile, with the same
version tags and prerelease/latest tag policy as the main Pulse runtime image.
The reusable Docker publisher must accept the exact container artifact name
-and source SHA from its owning release run, verify both against the checked-out
-tag and candidate manifest, and expose no standalone dispatch that could
-silently rebuild different bytes for an existing release tag.
+and source SHA from its owning release run, verify both against the exact
+checkout and candidate manifest, and expose no standalone dispatch that could
+silently rebuild different bytes for an existing release tag. Before draft-tag
+creation it may validate an anticipated tag only through that exact SHA; if the
+tag already exists, its peeled commit must match the anticipated SHA.
That same supply-chain boundary also owns the checked-in build roots
themselves. `Dockerfile` must pin its Node, Go, and Alpine bases by immutable
manifest-list digest so multi-arch release builds do not silently drift onto a
diff --git a/scripts/build-release-binaries.sh b/scripts/build-release-binaries.sh
index a40fb01b38..2cb260a9f7 100755
--- a/scripts/build-release-binaries.sh
+++ b/scripts/build-release-binaries.sh
@@ -14,10 +14,28 @@ source "${SCRIPT_DIR}/release_build_targets.sh"
VERSION="${1:-$(tr -d '\n\r[:space:]' < VERSION)}"
OUTPUT_ROOT="${2:-}"
+PROFILE="full"
+if [[ "${3:-}" == "--profile" ]]; then
+ PROFILE="${4:-}"
+ if [[ -z "${PROFILE}" || -n "${5:-}" ]]; then
+ echo "Usage: $0 <version> <output-directory> [--profile full|pro-packaging]" >&2
+ exit 2
+ fi
+elif [[ -n "${3:-}" ]]; then
+ echo "Usage: $0 <version> <output-directory> [--profile full|pro-packaging]" >&2
+ exit 2
+fi
if [[ -z "${OUTPUT_ROOT}" ]]; then
- echo "Usage: $0 <version> <output-directory>" >&2
+ echo "Usage: $0 <version> <output-directory> [--profile full|pro-packaging]" >&2
exit 2
fi
+case "${PROFILE}" in
+ full|pro-packaging) ;;
+ *)
+ echo "Error: unsupported release compilation profile: ${PROFILE}" >&2
+ exit 2
+ ;;
+esac
OUTPUT_ROOT="$(python3 -c 'import os, sys; print(os.path.abspath(sys.argv[1]))' "${OUTPUT_ROOT}")"
case "${OUTPUT_ROOT}" in
/|"${REPO_ROOT}"|"${REPO_ROOT}/scripts")
@@ -69,12 +87,17 @@ if [[ -e "${OUTPUT_ROOT}" ]] && find "${OUTPUT_ROOT}" -mindepth 1 -print -quit |
echo "Error: release compilation output must be absent or empty: ${OUTPUT_ROOT}" >&2
exit 2
fi
-mkdir -p "${BINARIES_DIR}" "${FRONTEND_DIR}" "${MANIFEST_DIR}"
-
-echo "Building exact-SHA frontend bundle..."
-npm --prefix frontend-modern ci
-npm --prefix frontend-modern run build
-cp -a frontend-modern/dist/. "${FRONTEND_DIR}/"
+mkdir -p "${BINARIES_DIR}" "${MANIFEST_DIR}"
+
+if [[ "${PROFILE}" == "full" ]]; then
+ mkdir -p "${FRONTEND_DIR}"
+ echo "Building exact-SHA frontend bundle..."
+ npm --prefix frontend-modern ci
+ npm --prefix frontend-modern run build
+ cp -a frontend-modern/dist/. "${FRONTEND_DIR}/"
+else
+ echo "Using Pro packaging profile: public Unified Agent binaries only."
+fi
export CGO_ENABLED=0
release_go_build_args=(-buildvcs=false -trimpath)
@@ -101,17 +124,23 @@ echo "Compiling release matrix with ${build_jobs} workers and GOMAXPROCS=${go_pr
declare -a task_components=()
declare -a task_targets=()
for target in "${PULSE_RELEASE_AGENT_TARGETS[@]}"; do
- task_components+=(agent mcp)
- task_targets+=("${target}" "${target}")
-done
-for target in "${PULSE_RELEASE_SERVER_TARGETS[@]}"; do
- task_components+=(server)
- task_targets+=("${target}")
-done
-for target in "${PULSE_RELEASE_CONTROL_PLANE_TARGETS[@]}"; do
- task_components+=(control-plane)
+ task_components+=(agent)
task_targets+=("${target}")
+ if [[ "${PROFILE}" == "full" ]]; then
+ task_components+=(mcp)
+ task_targets+=("${target}")
+ fi
done
+if [[ "${PROFILE}" == "full" ]]; then
+ for target in "${PULSE_RELEASE_SERVER_TARGETS[@]}"; do
+ task_components+=(server)
+ task_targets+=("${target}")
+ done
+ for target in "${PULSE_RELEASE_CONTROL_PLANE_TARGETS[@]}"; do
+ task_components+=(control-plane)
+ task_targets+=("${target}")
+ done
+fi
build_one() {
local component="$1"
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index a887c74d28..4ec7daec3f 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -1348,7 +1348,7 @@ func TestReleaseWorkflowsUseSecretSafeAttestedImageBuilds(t *testing.T) {
`./scripts/prepare-release-container-context.sh`,
`container_artifact_name`,
`container_artifact: ${{ needs.build_release_candidate.outputs.container_artifact_name }}`,
- `source_sha: ${{ needs.create_release.outputs.target_commitish }}`,
+ `source_sha: ${{ github.sha }}`,
`release-container-payload.json`,
`--target runtime_prebuilt`,
`--target agent_runtime_prebuilt`,
@@ -2349,6 +2349,20 @@ func TestReleasePipelinePromotesOneImmutableCandidate(t *testing.T) {
t.Fatalf("build-release-candidate.yml missing single-build contract: %s", needle)
}
}
+ publishDockerJob := workflowJobBlock(t, createWorkflow, "publish_docker")
+ for _, needle := range []string{
+ "- build_release_candidate",
+ `source_sha: ${{ github.sha }}`,
+ } {
+ if !strings.Contains(publishDockerJob, needle) {
+ t.Fatalf("inert exact-version Docker staging missing acceleration contract: %s", needle)
+ }
+ }
+ for _, forbiddenDependency := range []string{"- qualify_release_containers", "- create_release"} {
+ if strings.Contains(publishDockerJob, forbiddenDependency) {
+ t.Fatalf("inert exact-version Docker staging must overlap independent qualification: %s", forbiddenDependency)
+ }
+ }
for _, needle := range []string{
`Download immutable release candidate`,
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index cb205e4df1..65da3b709e 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -1713,7 +1713,10 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
demo_smoke = read("scripts/demo_public_browser_smoke.cjs")
runbook = read("docs/releases/V6_PRERELEASE_RUNBOOK.md")
self.assertIn("validate_artifact_release_line.py", publish)
- self.assertIn('git checkout --detach "refs/tags/${TAG}"', publish)
+ self.assertIn('--anticipated-source-sha "${SOURCE_SHA}"', publish)
+ self.assertIn('test "$(git rev-parse HEAD)" = "${EXPECTED_SOURCE_SHA}"', publish)
+ self.assertIn("if tag_exists_fn(normalized_tag):", artifact_validator)
+ self.assertIn("not anticipated source", artifact_validator)
self.assertIn("provenance: mode=max", publish)
self.assertIn("sbom: true", publish)
self.assertIn("uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4", publish)
diff --git a/scripts/release_control/validate_artifact_release_line.py b/scripts/release_control/validate_artifact_release_line.py
index 3269705943..ecc436010a 100644
--- a/scripts/release_control/validate_artifact_release_line.py
+++ b/scripts/release_control/validate_artifact_release_line.py
@@ -68,6 +68,7 @@ def validate_artifact_release_line(
*,
tag: str,
purpose: str,
+ anticipated_source_sha: str = "",
branch_for_version_fn: Callable[[str], str] = release_branch_for_version,
fetch_refs_fn: Callable[[str], None] = ensure_release_refs,
tag_exists_fn: Callable[[str], bool] = tag_exists,
@@ -84,12 +85,30 @@ def validate_artifact_release_line(
required_branch = branch_for_version_fn(version)
fetch_refs_fn(required_branch)
- if not tag_exists_fn(normalized_tag):
- raise ValueError(f"Tag {normalized_tag} does not exist in repository tags.")
-
- tag_sha = tag_commit_fn(normalized_tag)
branch_ref = f"origin/{required_branch}"
branch_sha = ref_commit_fn(branch_ref)
+ if anticipated_source_sha:
+ if len(anticipated_source_sha) != 40 or any(
+ character not in "0123456789abcdef" for character in anticipated_source_sha
+ ):
+ raise ValueError("anticipated source SHA must be an exact lowercase 40-character commit")
+ candidate_sha = ref_commit_fn(anticipated_source_sha)
+ if candidate_sha != anticipated_source_sha:
+ raise ValueError("anticipated source SHA did not resolve to the exact requested commit")
+ else:
+ candidate_sha = ""
+
+ if tag_exists_fn(normalized_tag):
+ tag_sha = tag_commit_fn(normalized_tag)
+ if candidate_sha and tag_sha != candidate_sha:
+ raise ValueError(
+ f"Tag {normalized_tag} resolves to {tag_sha}, not anticipated source {candidate_sha}."
+ )
+ elif candidate_sha:
+ tag_sha = candidate_sha
+ else:
+ raise ValueError(f"Tag {normalized_tag} does not exist in repository tags.")
+
if not ref_is_ancestor_fn(tag_sha, branch_sha):
raise ValueError(
f"Tag {normalized_tag} is not reachable from {branch_ref}. Refusing {purpose}."
@@ -139,6 +158,11 @@ def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("--tag", required=True)
parser.add_argument("--purpose", default="artifact publication")
+ parser.add_argument(
+ "--anticipated-source-sha",
+ default="",
+ help="Permit inert exact-version staging before tag creation, bound to this exact commit.",
+ )
parser.add_argument("--github-output", default="")
return parser.parse_args()
@@ -153,7 +177,11 @@ def write_github_output(path: str, values: dict[str, str]) -> None:
def main() -> int:
args = parse_args()
- result = validate_artifact_release_line(tag=args.tag, purpose=args.purpose)
+ result = validate_artifact_release_line(
+ tag=args.tag,
+ purpose=args.purpose,
+ anticipated_source_sha=args.anticipated_source_sha,
+ )
if result["lineage"] == "promoted_prerelease":
print(f"[OK] {result['tag']} descends from prerelease {result['lineage_tag']}")
diff --git a/scripts/release_control/validate_artifact_release_line_test.py b/scripts/release_control/validate_artifact_release_line_test.py
index 49ec3762d5..ef5858d12c 100644
--- a/scripts/release_control/validate_artifact_release_line_test.py
+++ b/scripts/release_control/validate_artifact_release_line_test.py
@@ -17,10 +17,12 @@ class ValidateArtifactReleaseLineTest(unittest.TestCase):
commits: dict[str, str],
ancestors: set[tuple[str, str]],
prerelease_tags: tuple[str, ...] = (),
+ anticipated_source_sha: str = "",
) -> dict[str, str]:
return validator.validate_artifact_release_line(
tag=tag,
purpose="test publish",
+ anticipated_source_sha=anticipated_source_sha,
branch_for_version_fn=lambda version: "pulse/v6-release",
fetch_refs_fn=lambda required_branch: None,
tag_exists_fn=lambda candidate: candidate in existing_tags,
@@ -100,6 +102,46 @@ class ValidateArtifactReleaseLineTest(unittest.TestCase):
ancestors={("ga", "patch")},
)
+ def test_anticipated_prerelease_staging_accepts_exact_branch_commit(self) -> None:
+ source_sha = "a" * 40
+ result = self.validate(
+ tag="v6.0.4-rc.3",
+ existing_tags=set(),
+ commits={
+ source_sha: source_sha,
+ "origin/pulse/v6-release": "branch",
+ },
+ ancestors={(source_sha, "branch")},
+ anticipated_source_sha=source_sha,
+ )
+
+ self.assertEqual(result["lineage"], "prerelease")
+
+ def test_anticipated_staging_rejects_existing_tag_at_another_commit(self) -> None:
+ source_sha = "b" * 40
+ with self.assertRaisesRegex(ValueError, "not anticipated source"):
+ self.validate(
+ tag="v6.0.4-rc.3",
+ existing_tags={"v6.0.4-rc.3"},
+ commits={
+ source_sha: source_sha,
+ "v6.0.4-rc.3": "other",
+ "origin/pulse/v6-release": "branch",
+ },
+ ancestors=set(),
+ anticipated_source_sha=source_sha,
+ )
+
+ def test_anticipated_staging_rejects_non_exact_sha(self) -> None:
+ with self.assertRaisesRegex(ValueError, "exact lowercase 40-character commit"):
+ self.validate(
+ tag="v6.0.4-rc.3",
+ existing_tags=set(),
+ commits={"origin/pulse/v6-release": "branch"},
+ ancestors=set(),
+ anticipated_source_sha="main",
+ )
+
if __name__ == "__main__":
unittest.main()