Fill in the producer workflow ID now that nightly.yml is on main

producer_workflow_id is 428462603, read from
gh api repos/storytold/photocraft/actions/workflows/nightly.yml (path
.github/workflows/nightly.yml, state active). The shared validator at the
callers' pin now accepts the policy as committed, and the contract test
requires a real numeric ID.
This commit is contained in:
skylartaylor committed 2026-11-24 01:41:44 +01:00
1 parent 7aa7a07369
commit c4f05da1ce
3 files changed
+14 -14

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
"schema": "craft-nightly-release-policy/v3",
"repository": "storytold/photocraft",
"repository_id": 1398080271,
"producer_workflow_id": null,
"producer_workflow_id": 428462603,
"producer_workflow_path": ".github/workflows/nightly.yml",
"producer_tooling_revision": "605d58766e8f536564da8fc81d3676ac86816dea",
"producer_workflow_ref": "storytold/craft-common-actions/.github/workflows/nightly-unsigned.yml@605d58766e8f536564da8fc81d3676ac86816dea",
+5 -7
View File
@@ -4,9 +4,8 @@
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
and commit it before the policy reaches `release`:
[`.github/nightly-signing-policy.json`](../.github/nightly-signing-policy.json) is the real v3
policy. Its `producer_workflow_id` is the registration of `nightly.yml` on main, read with:
```bash
gh api repos/storytold/photocraft/actions/workflows/nightly.yml --jq .id
@@ -67,7 +66,7 @@ Read on 2026-11-23; re-read anything that may have moved before the policy is pr
| Field | Value | Source |
|---|---|---|
| `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_workflow_id` | `428462603` | `gh api repos/storytold/photocraft/actions/workflows/nightly.yml` after `nightly.yml` reached main (path `.github/workflows/nightly.yml`, state `active`) |
| `producer_tooling_revision`, `signer_tooling_revision`, `producer_workflow_ref` | `605d5876…` (craft-common-actions #339) | The callers' pin |
| `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) |
@@ -120,9 +119,8 @@ those values in the same reviewed change that promotes the policy to `release`.
## Policy fields and their required authority
`.github/nightly-signing-policy.json` is installed with the values and sources listed above; its only
unresolved field is the pending `producer_workflow_id`, so the shared validator refuses it until that
ID is committed. The adjacent
`.github/nightly-signing-policy.json` is installed with the values and sources listed above, and the
shared validator accepts it. The adjacent
[`nightly-signing-policy.example.json`](nightly-signing-policy.example.json) stays intentionally
invalid (`null` unresolved values), not installable configuration. Its `platforms` rows do carry
the reviewed public values: each fixed `nightly-unsigned-<platform>` artifact kind and stable's
+8 -6
View File
@@ -611,12 +611,14 @@ class NightlyInstalledPolicy(unittest.TestCase):
self.assertEqual(self.policy["schema"], "craft-nightly-release-policy/v3")
self.assertEqual(self.policy["repository"], "storytold/photocraft")
self.assertEqual(self.policy["release_branch"], "release")
for key in ("repository_id",):
self.assertIs(type(self.policy[key]), int)
self.assertGreater(self.policy[key], 0)
# Read from the API once nightly.yml is registered on main; null until then, never invented.
workflow_id = self.policy["producer_workflow_id"]
self.assertTrue(workflow_id is None or (type(workflow_id) is int and workflow_id > 0))
# Both read from the GitHub API (the repository and nightly.yml's registration on main).
for key in ("repository_id", "producer_workflow_id"):
with self.subTest(key=key):
self.assertIs(type(self.policy[key]), int)
self.assertGreater(self.policy[key], 0)
self.assertNotEqual(self.policy["producer_workflow_id"],
self.policy["candidate_policy"]["required_workflows"][0]["workflow_id"],
"the producer is not its own quality workflow")
def test_paths_and_tooling_match_the_callers(self):
pin = caller_pin("nightly.yml")