Nightly: trusted reviewers pick the pull requests with /nightly

Ludovic's decision (2026-10-27, from kacpherek's proposal under #2779): the
Nightly is where contributors test pull requests before the gate.
kacpherek, rdbtCVS and levzzz5154 (.github/nightly-reviewers.txt) and
Ludovic pick them with `/nightly 2640 2642`, `add`, `remove`, `clear`,
`status` or `dry-run` in any issue or pull request.

- nightly-command.yml (issue_comment, main's copy): checks who asked, saves
  the set on nightly-state, starts `nightly build`, answers "🤖 Nightly: …".
  It never checks out or merges a pull request.
- nightly-build.yml: `pick` builds main + the set (newest heads and merged or
  closed ones dropped at the scheduled run), pushes it as
  nightly/build-<date>-<n>, records it in builds.jsonl; build, sign and
  publish are unchanged; `answer` tells the thread how it ended.
- Notes say a Nightly can include pull requests not reviewed yet, picked by
  trusted reviewers, and list each with its author and who picked it.
- docs/release-flow.md: who can pick, how, how Ludovic removes or pauses them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-27 16:11:14 +01:00
parent 0ff1df58a2
commit 79eddec09c
5 changed files with 313 additions and 28 deletions
+56 -11
View File
@@ -263,8 +263,9 @@ silent (no ping and Discord's @silent flag). Launcher releases post without a pi
### One channel
Since 2026-10-23 there is one release channel, and it is every launcher's default. Since 2026-10-27 (Ludovic's
decision, revising 2026-10-23's) players may also turn on [Nightly](#nightly-channel), an opt-in pre-release built
from reviewed pull requests; nothing about releases changes for anyone who doesn't. Every game release is published
decision, revising 2026-10-23's) players may also turn on [Nightly](#nightly-channel), an opt-in pre-release of main
plus pull requests the trusted reviewers picked, not all reviewed yet; nothing about releases changes for anyone who
doesn't. Every game release is published
as the release, never a pre-release, and marked GitHub's *latest*: the launcher, `horizon-server update` and `install.sh` take it at once. Because nothing
promotes it later, the checks that used to gate a promotion run in the release itself, and the publish job
(`tools/release_train.py gate`) publishes nothing unless both pass:
@@ -411,22 +412,66 @@ launcher and the website read: both then look the newest launcher tags up one by
## Nightly channel
`.github/workflows/nightly-build.yml` publishes an opt-in build once a night (20:17 UTC), for players who want
reviewed fixes before they are released (#2681). It builds the newest `union/<agent>-<name>` branch on origin (main
plus the pull requests the contribution gate proved together in one wave) when that union is newer than main's head
and holds something main lacks, otherwise main (`tools/ci/nightly.py pick`). A night with nothing new publishes
nothing. Only proven unions are pushed to origin, so nothing unreviewed ships.
`.github/workflows/nightly-build.yml` publishes an opt-in build once a night (20:17 UTC) and when a trusted
reviewer asks, for players who want fixes before they are released (#2681). It builds main plus the pull requests the
trusted reviewers picked, merged in their order. With none picked, it builds the newest `union/<agent>-<name>` branch
on origin (main plus the pull requests the contribution gate proved together in one wave) when that union is newer
than main's head and holds something main lacks, otherwise main (`tools/ci/nightly.py pick`). A night with nothing
new publishes nothing. A Nightly can include pull requests not reviewed yet: that is what it is for, playing them
before the gate.
- **Jobs.** `pick` chooses the commit and writes the notes (the open pull requests it holds beyond main). `build` is
### Trusted reviewers pick the pull requests
The Nightly is where contributors test pull requests before the gate. The trusted reviewers listed in
`.github/nightly-reviewers.txt` (kacpherek, rdbtCVS and levzzz5154 since 2026-10-27) and Ludovic pick them with a
comment on any issue or pull request (`.github/workflows/nightly-command.yml`, `tools/ci/nightly_set.py`):
```text
/nightly 2640 2642 the set becomes these pull requests, merged onto main in this order; builds now
/nightly add 2650 adds one, or takes its newest head again; builds now
/nightly remove 2640 drops one; builds now
/nightly clear empties the set: back to the proven union or main; builds now
/nightly status what the set holds
/nightly dry-run 2640 builds main + these and signs with a throwaway key; publishes nothing, the set stays
```
- **The answer.** The workflow answers in the thread with one comment starting `🤖 Nightly:`: the set, the build's
run, and later the published Nightly (or why it failed).
- **The set** is `set.json` on the `nightly-state` branch: who asked, when, and each pull request at the head it had
then. A head is taken again only when someone asks again or at the scheduled run, never silently in between. The
scheduled run takes every pull request's newest head and drops the merged and closed ones; the notes say so.
`builds.jsonl` there records each build's set (for `nightly_stats.py`).
- **Assembly.** `pick` (main's code) fetches each head and merges them onto main with `git merge-tree
--write-tree`: git objects only, no working tree, so no file, hook or filter of theirs reaches the runner. The
result is pushed as `nightly/build-<date>-<n>` and `build` compiles that, without secrets, as for a release.
Equal inputs give the same commit, so an unchanged set and main publish nothing new. On a conflict the build
stops and answers which two pull requests conflict and where; a reviewer can then open an integration pull
request from their fork that combines them, and pick that one instead.
- **Refused.** A pull request that changes a path CODEOWNERS gives to Ludovic (`.github/`, `tools/ci/`, the
signing and update code, `launcher/src/backend.rs`, `launcher/links.json`…), more than 30 in a set, and more than
6 builds a day (the scheduled one always runs).
- **No repository role.** Reviewers need no permission on the repository: the list file and the workflow are the
whole of it.
- **Ludovic stays in charge.**
- Ludovic's `/nightly clear` or `/nightly remove` always applies. A pull request he removed can only come back
when he adds it.
- A one-line pull request removing a login from `.github/nightly-reviewers.txt` revokes it as soon as it merges
(the file is his under CODEOWNERS).
- A line `paused` in that file stops every reviewer's `/nightly`; his own still work.
- Main, the gate and releases don't change: picks reach only players who turned Nightly on.
- **Jobs.** `pick` chooses or assembles the commit and writes the notes (each pull request in it with its title,
author and who picked it, or for a union the open pull requests it holds beyond main). `build` is
`game-build.yml`, the same builds and smoke test as a release, with the version `nightly-<date>` and
`HORIZON_NIGHTLY="<date> <short sha>"` built in, macOS signed ad hoc. `sign` signs SHA256SUMS for the channel
(the message says `horizon release nightly`, so a nightly's signature never passes for a release's). `publish`
checks the signature and the smoke test (not `release-blocker`: a nightly is how blockers get tested), renames the
previous `nightly` pre-release to `nightly-<its date>`, publishes the new one as the `nightly` pre-release (never
GitHub's latest), and deletes the `nightly-<date>` pre-releases and tags older than 7 days, nothing else.
- **The signing key never meets the union's code.** Every workflow file and script runs from main's copy (a schedule
runs the default branch; `uses: ./…` takes the caller's commit), never the union's `.github/`. `build` compiles the
union with a read-only token that isn't kept in the checkout and no secrets; the runner's Developer ID keychain
- **The signing key never meets the pull requests' code.** Every workflow file and script runs from main's copy (a
schedule and `issue_comment` run the default branch; `uses: ./…` takes the caller's commit), never a pull
request's `.github/`, and a pull request that changes `.github/` or `tools/ci/` is refused. `build` compiles the
merge with a read-only token that isn't kept in the checkout and no secrets; the runner's Developer ID keychain
stays locked. `sign` is the only job with the key, and checks out only main's `tools/ci/sign_release.sh`, which
hashes the archives with the runner's `sha256sum` and signs with its OpenSSL: it never runs what `build` made.
`publish` runs main's `horizon-release-sign`, never the archives.