From 73e04afa97b0fbe47a06d09cad9bbb19b26babe2 Mon Sep 17 00:00:00 2001 From: skylartaylor Date: Tue, 24 Nov 2026 01:10:57 +0100 Subject: [PATCH] Let every release manager who can push start nightly runs by hand The producer's manual-actors and the policy's manual_actors are now the five members of the release-managers team (id 19837241) with push access: bflatastic, dylanmtaylor, echelon, FredApps and skylartaylor, sorted the same way in both. echelon-robot only has read access and is left out. There is still no automatic signer, no schedule, and the dispatcher stays off. The contract test requires that exact list in both places and refuses an actor outside it, a reordered list or a case change. --- .github/nightly-signing-policy.json | 4 +++ .github/workflows/nightly.yml | 2 +- docs/nightly-release-preparation.md | 20 +++++++----- packaging/nightly-release-tests.py | 47 ++++++++++++++++++++++++++--- 4 files changed, 60 insertions(+), 13 deletions(-) diff --git a/.github/nightly-signing-policy.json b/.github/nightly-signing-policy.json index 8ff936b105..8b15c40ba0 100644 --- a/.github/nightly-signing-policy.json +++ b/.github/nightly-signing-policy.json @@ -10,6 +10,10 @@ "signer_tooling_revision": "605d58766e8f536564da8fc81d3676ac86816dea", "release_branch": "release", "manual_actors": [ + "bflatastic", + "dylanmtaylor", + "echelon", + "FredApps", "skylartaylor" ], "max_age_seconds": 86400, diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index dc588fc2e9..cdeba1084a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,7 +26,7 @@ jobs: with: tooling-revision: 605d58766e8f536564da8fc81d3676ac86816dea app-name: photocraft - manual-actors: '["skylartaylor"]' + manual-actors: '["bflatastic","dylanmtaylor","echelon","FredApps","skylartaylor"]' craft-fonts-ref: cc9269cd8d8258785dac603fba3122e5d2556795 # One producer run builds every listed platform for one all-or-nothing release. The pin is the # craft-common-actions main commit that merged #339 (bounded lineage compares), on top of the diff --git a/docs/nightly-release-preparation.md b/docs/nightly-release-preparation.md index e90e14d374..37f9121c86 100644 --- a/docs/nightly-release-preparation.md +++ b/docs/nightly-release-preparation.md @@ -1,8 +1,8 @@ # Windows, Linux and macOS release-ref nightly: supervised manual go-live **Enabled for supervised manual runs, not yet qualified.** The producer (`nightly.yml`, main) and the -signer (`nightly-sign.yml`, release) keep only their exact context guards and run when the reviewed -manual actor dispatches them. `nightly-dispatch.yml` stays literally off and there is no schedule: +signer (`nightly-sign.yml`, release) keep only their exact context guards and run when one of the reviewed +manual actors dispatches them. `nightly-dispatch.yml` stays literally off and there is no schedule: it only forwards scheduled producers. The installed policy [`.github/nightly-signing-policy.json`](../.github/nightly-signing-policy.json) is real v3 except that `producer_workflow_id` is `null` until `nightly.yml` is registered on main. Read it then @@ -25,9 +25,15 @@ neither callee's inputs nor the policy fields. The earlier pins, `a4f6fd51` (#34 source availability, not provider, queue, native signing or crypto qualification. Existing stable workflows are unchanged. -**First runs.** The first runs are manual dispatches in this order: `nightly.yml` on main (only -`skylartaylor` passes the producer's plan step), then `nightly-sign.yml` on `release` with that -producer run ID and attempt. `nightly-dispatch.yml` only matters once a schedule is approved. +**First runs.** The first runs are manual dispatches in this order: `nightly.yml` on main (only a +listed manual actor passes the producer's plan step), then `nightly-sign.yml` on `release` with that +producer run ID and attempt, by a listed manual actor. `nightly-dispatch.yml` only matters once a +schedule is approved. + +**Manual actors.** `bflatastic`, `dylanmtaylor`, `echelon`, `FredApps` and `skylartaylor`, in the +producer's `manual-actors` and the policy's `manual_actors`. The list mirrors the release-managers +team (id 19837241), leaving out `echelon-robot`, which can only read photocraft; update it by PR +in both places when the team changes. **Admission timing.** The candidate check reads the newest CI run on the candidate commit and main's latest finished Sonar analysis, so when to dispatch matters: @@ -63,7 +69,7 @@ Read on 2026-11-23; re-read anything that may have moved before the policy is pr | `repository_id` | `1398080271` | `gh api repos/storytold/photocraft --jq .id` | | `producer_workflow_id` | `null` (pending) | Only exists once `nightly.yml` is registered on main | | `producer_tooling_revision`, `signer_tooling_revision`, `producer_workflow_ref` | `605d5876…` (craft-common-actions #339) | The callers' pin | -| `manual_actors` / `automatic_signer_actors` | `["skylartaylor"]` / `[]` | Go-live checklist; equals the producer caller's `manual-actors` | +| `manual_actors` / `automatic_signer_actors` | the five release managers / `[]` | release-managers team (id 19837241) members who can push (4 admin, FredApps write); equals the producer caller's `manual-actors` | | `max_age_seconds`, `max_artifact_bytes` | `86400`, `2147483648` | Go-live checklist (Linux tarball is about 126 MB) | | `platforms` | three rows | v0.23.1 stable identities, as in the example; the Windows publisher subject was confirmed by reading the stable v0.23.1 `photocraft.exe` Authenticode signature on Windows | | `candidate_policy.required_workflows` | CI (`ci.yml`, workflow `371199934`), 19 jobs | Workflow list API; jobs that succeeded on every recent main push run (the only always-run main workflow without path filters) | @@ -186,7 +192,7 @@ were audited by this source change; no secret values were read. ## Bounded integration and acceptance 1. The callers reference the same reviewed public commit in `uses` and `tooling-revision`. - The producer and signer are enabled only for the reviewed manual actor; the dispatcher stays + The producer and signer are enabled only for the reviewed manual actors; the dispatcher stays literally off until a schedule is separately approved. Future shared pin updates require review of the exact public immutable source and interface. Do not claim dormant source as a working pipeline. Do not temporarily call old same-run signing or use mutable `@main`/`@release` tooling. diff --git a/packaging/nightly-release-tests.py b/packaging/nightly-release-tests.py index d7d50fa826..aade5f1d82 100644 --- a/packaging/nightly-release-tests.py +++ b/packaging/nightly-release-tests.py @@ -544,15 +544,52 @@ class NightlyEnabledCallers(unittest.TestCase): self.assertEqual(indicator, ">-") self.assertEqual(" ".join(expression.split()), expected, "guards may only change with review") - def test_manual_actor_is_the_reviewed_login_in_caller_and_policy(self): + def test_manual_actors_are_the_release_managers_in_caller_and_policy(self): source = (ROOT / ".github/workflows/nightly.yml").read_text() - rows = re.findall(r"(?m)^ manual-actors: '(\[[^']*\])'$", source) - self.assertEqual(len(rows), 1) policy = json.loads(INSTALLED_POLICY.read_text()) - self.assertEqual(json.loads(rows[0]), ["skylartaylor"]) - self.assertEqual(policy["manual_actors"], json.loads(rows[0]), "caller and policy grant the same actor") + self.assertEqual(reviewed_manual_actors(source, policy), RELEASE_MANAGERS) self.assertEqual(policy["automatic_signer_actors"], [], "no automatic signer without a schedule") + def test_an_actor_outside_the_release_managers_is_refused(self): + source = (ROOT / ".github/workflows/nightly.yml").read_text() + policy = json.loads(INSTALLED_POLICY.read_text()) + caller = json.dumps(RELEASE_MANAGERS, separators=(",", ":")) + widened = sorted(RELEASE_MANAGERS + ["echelon-robot"], key=str.lower) + for change in ("caller", "policy", "both", "order", "case"): + mutated_source, mutated_policy = source, copy.deepcopy(policy) + if change in ("caller", "both"): + mutated_source = source.replace(caller, json.dumps(widened, separators=(",", ":"))) + if change in ("policy", "both"): + mutated_policy["manual_actors"] = widened + if change == "order": + mutated_policy["manual_actors"] = list(reversed(RELEASE_MANAGERS)) + if change == "case": + mutated_policy["manual_actors"] = [login.lower() for login in RELEASE_MANAGERS] + with self.subTest(change=change), self.assertRaises(ValueError): + reviewed_manual_actors(mutated_source, mutated_policy) + + +# Mirrors the storytold release-managers team (id 19837241) minus echelon-robot, which only has +# read access to photocraft. Update by PR, in the caller and the policy, when the team changes. +RELEASE_MANAGERS = ["bflatastic", "dylanmtaylor", "echelon", "FredApps", "skylartaylor"] + + +def reviewed_manual_actors(caller_source, policy): + """The one reviewed manual-actor list, identical in the producer caller and the policy.""" + rows = re.findall(r"(?m)^ manual-actors: '(\[[^']*\])'$", caller_source) + if len(rows) != 1: + raise ValueError("exactly one literal manual-actors list is required") + caller = json.loads(rows[0]) + if caller != policy["manual_actors"]: + raise ValueError("caller and policy must grant the same actors in the same order") + if caller != RELEASE_MANAGERS: + raise ValueError("manual actors must be exactly the reviewed release managers") + if caller != sorted(caller, key=str.lower) or len({login.lower() for login in caller}) != len(caller): + raise ValueError("manual actors must be distinct and sorted case-insensitively") + if set(caller) & {login for login in policy["automatic_signer_actors"]}: + raise ValueError("manual and automatic actors overlap") + return caller + INSTALLED_POLICY = ROOT / ".github/nightly-signing-policy.json"