Merge remote-tracking branch 'origin/main' into refactor/horizon-items

This commit is contained in:
Ludovic Marie
2026-10-27 18:02:07 +01:00
143 changed files with 6986 additions and 754 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ The game logs into `HORIZON_HOME` and falls back to the player's own game folder
Harnesses can also run on the Mac mini, the desktop and playhorizon (`tools/parity_hosts.json` describes them; `desktop` and `playhorizon` use their CI runner's environment and vanilla data, and the desktop refuses work, or stops it, while someone uses it: docs/release-flow.md, "The desktop's runner"; its `default` list is empty, so pass `--hosts macmini,playhorizon` or set `PARITY_HOSTS`, after copying `shared-local/` to `~/code/horizon-parity/shared-local` on each host). The runner mirrors the worktree there with rsync (not `.git`, `.local`, `target` or ignored files) into `~/code/horizon-parity/remote/<host><path>`, whose `.local` links to the vanilla data in `~/code/horizon-parity/shared-local`, and starts `tools/parity.py --worker` over ssh. The worker builds the probes (about 80 s the first time) and runs what it is sent under the same tracer, admitting harnesses against its own free memory. One queue, longest first, feeds every machine, remote ones first: the Mac takes up to 14 harnesses, the desktop 8, playhorizon 3 (on CPUs 0-3: its CI runner has 4-7). Each pass comes back with the content hash of every file it depended on, so it is keyed on exactly what ran, and logs come back to `.local/parity-runner/logs/`; state, sharing and `gate.py` work as before. If a host can't be reached, or drops out, its harnesses run here.
Harnesses a host can't run are listed in the file: `local_only` (`save_roundtrip` runs the game on a virtual screen) and each host's `exclude`. The Mac excludes nothing: vanilla's `Math.sin`, `pow`, `log` and the like don't round the same on an Apple silicon Mac as on Linux (HotSpot uses fdlibm there, Intel's stubs on x86-64), and Rust's float functions round like neither (they call the platform libm), so code that mirrors a vanilla `Math` call uses `horizon_core::jmath`, which computes what HotSpot computes on the host architecture. The ThinkPad no longer runs harnesses (2026-10-26): playhorizon is the Linux host that is always on.
Harnesses a host can't run are listed in the file: `local_only` (`save_roundtrip` runs the game on a virtual screen) and each host's `exclude`. A host's `exclude` also holds when `parity.py` runs on that host itself, as its CI runner does: the harness is skipped there with its reason (playhorizon skips `remote_fireball` and `remote_fireworks`, which its CPU-starved CI slice fails even on bare main), unless named on the command line. The Mac mini's runner and the nightly audit still run them. The Mac excludes nothing: vanilla's `Math.sin`, `pow`, `log` and the like don't round the same on an Apple silicon Mac as on Linux (HotSpot uses fdlibm there, Intel's stubs on x86-64), and Rust's float functions round like neither (they call the platform libm), so code that mirrors a vanilla `Math` call uses `horizon_core::jmath`, which computes what HotSpot computes on the host architecture. The ThinkPad no longer runs harnesses (2026-10-26): playhorizon is the Linux host that is always on.
The file's `solo` list names harnesses that drive game windows (`remote_fireworks`, `server_player_sculk`, `world_reopen`, ...). On a machine where `parity.py` has 4 CPUs or fewer, such as playhorizon's CI runner, each of them runs alone, after the others: there frames are drawn on the CPU, and beside other harnesses a screenshot or a control request took more ticks than the check allows. `PARITY_SOLO=1` or `0` forces this on or off.
+61 -12
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,25 +412,73 @@ 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.
`publish` runs main's `horizon-release-sign`, never the archives. Nothing a nightly's build leaves reaches a
release either: `game-build.yml`'s `trusted` input is true only for `release.yml`. An untrusted build runs its
macOS jobs on the runner that runs pull requests' parity jobs (`horizon-game`), never the release runner
(`MAC_RUNNER`), and its Rust cache has its own key and is never saved. A trusted build doesn't use the machine's
shared sccache, which pull requests' jobs write (`HORIZON_NO_SCCACHE`, `tools/ci/runner-env.sh`).
- **Players.** Releases stay the default and the only channel any launcher follows unless its player turns Nightly
on. `release_train.py`, `horizon-server update`, `install.sh` and the launcher's release list skip the tags: none
of them is `vX.Y.Z`.