Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/scripts/test_desktop_release_flow_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# omi-test-quality: source-inspection -- static contract: GitHub workflow authority is YAML-only.
from __future__ import annotations

import re
import unittest
from pathlib import Path

Expand Down Expand Up @@ -44,6 +45,31 @@ def test_has_one_automatic_candidate_to_beta_authority(self) -> None:
self.assertNotIn("workflow_dispatch:", beta)
self.assertEqual(beta.count("/v2/desktop/beta/promote-qualified"), 1)

def test_beta_qualification_workflow_uses_supported_exact_cli(self) -> None:
qualification = workflow("desktop_qualify_beta.yml")
qualification_script = (ROOT / "desktop/macos/scripts/qualify-desktop-beta.sh").read_text(
encoding="utf-8"
)
qualify_step_name = " - name: Qualify exact candidate on hermetic stack"
qualify_step = qualification.split(qualify_step_name, 1)[1]
qualify_step = qualify_step.split("\n - name:", 1)[0]
invoked_options = tuple(
re.findall(r"^\s+(--[a-z0-9-]+)(?:\s+[^\\]+)? \\$", qualify_step, re.MULTILINE)
)
supported_options = set(re.findall(r"^ (--[a-z0-9-]+)\)$", qualification_script, re.MULTILINE))

self.assertEqual(
invoked_options,
(
"--automatic",
"--github-actions-artifact",
"--signed-smoke-result",
"--candidate-gate-result",
),
)
self.assertTrue(set(invoked_options).issubset(supported_options))
self.assertNotIn("--no-promote", qualify_step)

def test_stable_is_manual_and_uses_one_explicit_confirmation(self) -> None:
stable = workflow("desktop_promote_prod.yml")
self.assertIn("workflow_dispatch:", stable)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/desktop_qualify_beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ jobs:
set -euo pipefail
desktop/macos/scripts/qualify-desktop-beta.sh \
--automatic \
--no-promote \
--github-actions-artifact \
--signed-smoke-result /tmp/desktop-beta-qualification/desktop-smoke-result.json \
--candidate-gate-result /tmp/desktop-beta-qualification/candidate-gate.json \
Comment on lines 104 to 106

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recheck latest candidate before promotion

With the unsupported --no-promote removed, this invocation can now reach --github-actions-artifact mode, where qualify-desktop-beta.sh exits before its automatic-mode final git fetch/LATEST_TAG recheck. Since the workflow only computes LATEST_TAG before the long T2/fault qualification run and the backend admission path only checks freshness/trusted evidence, a newer v*-macos candidate published while this job is running can still leave this older tag qualified and promoted to Beta. Please repeat the newest-tag gate after the qualification step, before creating evidence or invoking desktop_promote_beta.yml.

Useful? React with 👍 / 👎.

Expand Down
Loading