ci(release): the release's packaging is a program of its own, longshot-packager #2691

Merged
HumanBean merged 1 commit from HumanBean/Longshot:ci-release-packager into main 2026-11-27 21:54:45 +00:00
Owner

Summary

The Windows release build has to wait for the Linux one only because the Linux job's longshot-builder is also the tool that packages the release. This moves the packaging into a small program of its own, longshot-packager, that each release job builds for itself, so the two builds no longer depend on each other and any release runner can take either one. Players see nothing.

  • New crate builder/crates/longshot-packager (never shipped): tools, release ..., rust-key and the two game-free compiles, compile --third-party-objects | --dry-run. It has no UI, Slint or crash-report dependency.
  • Moved, not copied: release_cmd.rs, release_deltas.rs, release_objects.rs to the packager; the tools command line to build_driver::tools::cli; the one-stage command's places to build_driver::build::stage_places; windowed to release::swap; the play names to build_driver::play::NAMES.
  • longshot-builder drops dev release and dev rust-key (their one caller is MagicBeanAdmin/Release's longshot.yml). It keeps dev tools (mise, CI, tools-check.yml, Release's Longshot tools workflow, dev.py, the Test Farm's agent) and compile --third-party-objects (from-source runs it).
  • #2688's JSON output is kept for every moved command: its helpers moved from longshot-builder's output.rs and diagnostics.rs to build_core::report::console, which both programs use, so --output json on longshot-packager says events on stdout and nothing else. Those diagnostics' target is now longshot::console.
  • Windows' dry run was run by the Linux builder over the pack's tree; it is now run by the packager's compile --dry-run, the same code from the same commit. The Linux program that ships still runs its own.
  • scripts/longshot_builder.py packager builds it for the Linux system that runs it, with the release profile (quicker to compile than dist).

Read first: builder/crates/longshot-packager/src/main.rs and compile.rs, scripts/longshot_builder.py (cmd_packager), docs/dev/reference/releases.md ("The release workflow").

Merge order: merge this, then push the matching longshot.yml change to MagicBeanAdmin/Release straight away (prepared, not pushed). In between, the live workflow still calls dev release and a release of this commit or a later one fails. After the push, a commit from before this one can no longer be released by that workflow (it has no packager), so a stable is tagged on this commit or a later one.

main (7a2ad9e5) fails on its own, so CI here does too until it is fixed there; none of it is in this change: three needless_borrow clippy errors in build-driver/src/play.rs (rebuild_reason); build-driver's codes test (log_unavailable and play_notice missing from build-events.md); the guide screenshots' review of settings-graphics.png (gpu/vk/device_policy.h changed).

Testing

Tested: CachyOS Linux, NVIDIA RTX 3090, driver 620.70.06. Nothing was uploaded or published.

On d21cfc0b (this change on main 7a2ad9e5; the head, cd5140d6, differs from it by one line of releases.md):

  • cargo fmt --check; clippy with -D warnings -A clippy::needless_borrow over the workspace (Linux) and over the packager, builder, build-driver, build-core and release for x86_64-pc-windows-gnullvm; cargo test --workspace: 786 passed, 1 failed (codes, which fails the same way on main); the synthetic game end to end.
  • The Linux release job's packaging, the packager beside main's longshot-builder dev ... on the same inputs: the same Rust source key; main's builder took the packager's third-party set whole (identical sets); the pack, the attached program, RecompLauncher's zip, the deltas and the manifest byte for byte the same.
  • With --output json, tools check --require, tools install, rust-key, release last-objects, compile, release sources, attach, dry-run, files and recomplauncher each exit 0 with only events on stdout and nothing on stderr.
  • The packed program's own dry run (--clean; a release-profile build stood in for the shipped one).
  • tests/run_all.py --strict --changed: 29 passed, 2 failed: test_lifter.py (main's clippy errors and codes test) and test_renhdrum.py, only because that run's temporary folder's path began with the checkout's; it passes with another one. test_tools_check.py, scripts/check_third_party.py, pre-commit and actionlint pass.

Before the rebase over #2688, #2690 and #2694 (9c721d90):

  • In the game: dev.py pack over base 3072dda4, built by that head's longshot-builder, then dev.py rt; headless from the repository save kokiri-start into play in Kokiri Forest (59.9 fps), quit, exit code 0, stop: close work done in the log. Not run again since.
  • The Windows release job's packaging beside main's then: identical third-party sets, the dry run through the packager over the unpacked tree with the same dry run: lines as the builder's, the packed Windows program (release profile) started under Wine. Not run again since.

Not covered: the dist profile's link against the sysroot.

Still to test:

  • The release runners: the first nightly after both merges, both jobs green and published with every file; a job on bobo (8 GB) or the AMD lab runner fits its memory and the 60-minute limit from a cold cache (by hand).
  • mise run test, the whole run (by hand, or CI).
  • Windows: the nightly installed and built by the launcher (by hand).

Measurements

Nothing to measure: release packaging moves between programs, and the game and a player's build are unchanged.

Risks

  • A release between the two merges fails, and so does one of an older commit afterwards (above). The failed run is remembered, so retry it by hand.
  • Anyone's script calling longshot-builder dev release or dev rust-key now gets the usage; cargo run --release -p longshot-packager -- release ... replaces it.
  • Each release job compiles one more program, and its Rust cache holds it too.
  • A revert here goes with a revert in Release.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named). Not ticked: only the checks reading changed files ran; test_lifter.py fails on main's clippy errors and codes test.
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible. Not ticked: one line of third_party/renhdrum/PROVENANCE.md names the new command; nothing else there changed.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary The Windows release build has to wait for the Linux one only because the Linux job's `longshot-builder` is also the tool that packages the release. This moves the packaging into a small program of its own, `longshot-packager`, that each release job builds for itself, so the two builds no longer depend on each other and any release runner can take either one. Players see nothing. - **New crate `builder/crates/longshot-packager`** (never shipped): `tools`, `release ...`, `rust-key` and the two game-free compiles, `compile --third-party-objects | --dry-run`. It has no UI, Slint or crash-report dependency. - **Moved, not copied:** `release_cmd.rs`, `release_deltas.rs`, `release_objects.rs` to the packager; the `tools` command line to `build_driver::tools::cli`; the one-stage command's places to `build_driver::build::stage_places`; `windowed` to `release::swap`; the play names to `build_driver::play::NAMES`. - **`longshot-builder` drops `dev release` and `dev rust-key`** (their one caller is MagicBeanAdmin/Release's `longshot.yml`). It keeps `dev tools` (mise, CI, `tools-check.yml`, Release's Longshot tools workflow, `dev.py`, the Test Farm's agent) and `compile --third-party-objects` (`from-source` runs it). - **#2688's JSON output is kept for every moved command:** its helpers moved from `longshot-builder`'s `output.rs` and `diagnostics.rs` to `build_core::report::console`, which both programs use, so `--output json` on `longshot-packager` says events on stdout and nothing else. Those diagnostics' `target` is now `longshot::console`. - **Windows' dry run** was run by the Linux builder over the pack's tree; it is now run by the packager's `compile --dry-run`, the same code from the same commit. The Linux program that ships still runs its own. - `scripts/longshot_builder.py packager` builds it for the Linux system that runs it, with the release profile (quicker to compile than dist). Read first: `builder/crates/longshot-packager/src/main.rs` and `compile.rs`, `scripts/longshot_builder.py` (`cmd_packager`), `docs/dev/reference/releases.md` ("The release workflow"). **Merge order:** merge this, then push the matching `longshot.yml` change to MagicBeanAdmin/Release straight away (prepared, not pushed). In between, the live workflow still calls `dev release` and a release of this commit or a later one fails. After the push, a commit from before this one can no longer be released by that workflow (it has no packager), so a stable is tagged on this commit or a later one. `main` (`7a2ad9e5`) fails on its own, so CI here does too until it is fixed there; none of it is in this change: three `needless_borrow` clippy errors in `build-driver/src/play.rs` (`rebuild_reason`); `build-driver`'s `codes` test (`log_unavailable` and `play_notice` missing from `build-events.md`); the guide screenshots' review of `settings-graphics.png` (`gpu/vk/device_policy.h` changed). ## Testing **Tested:** CachyOS Linux, NVIDIA RTX 3090, driver 620.70.06. Nothing was uploaded or published. On `d21cfc0b` (this change on `main` `7a2ad9e5`; the head, `cd5140d6`, differs from it by one line of `releases.md`): - `cargo fmt --check`; clippy with `-D warnings -A clippy::needless_borrow` over the workspace (Linux) and over the packager, builder, `build-driver`, `build-core` and `release` for `x86_64-pc-windows-gnullvm`; `cargo test --workspace`: 786 passed, 1 failed (`codes`, which fails the same way on `main`); the synthetic game end to end. - The Linux release job's packaging, the packager beside `main`'s `longshot-builder dev ...` on the same inputs: the same Rust source key; `main`'s builder took the packager's third-party set whole (identical sets); the pack, the attached program, RecompLauncher's zip, the deltas and the manifest byte for byte the same. - With `--output json`, `tools check --require`, `tools install`, `rust-key`, `release last-objects`, `compile`, `release sources`, `attach`, `dry-run`, `files` and `recomplauncher` each exit 0 with only events on stdout and nothing on stderr. - The packed program's own dry run (`--clean`; a release-profile build stood in for the shipped one). - `tests/run_all.py --strict --changed`: 29 passed, 2 failed: `test_lifter.py` (`main`'s clippy errors and `codes` test) and `test_renhdrum.py`, only because that run's temporary folder's path began with the checkout's; it passes with another one. `test_tools_check.py`, `scripts/check_third_party.py`, pre-commit and actionlint pass. Before the rebase over #2688, #2690 and #2694 (`9c721d90`): - In the game: `dev.py pack` over base `3072dda4`, built by that head's `longshot-builder`, then `dev.py rt`; headless from the repository save `kokiri-start` into play in Kokiri Forest (59.9 fps), `quit`, exit code 0, `stop: close work done` in the log. Not run again since. - The Windows release job's packaging beside `main`'s then: identical third-party sets, the dry run through the packager over the unpacked tree with the same `dry run:` lines as the builder's, the packed Windows program (release profile) started under Wine. Not run again since. Not covered: the dist profile's link against the sysroot. **Still to test:** - The release runners: the first nightly after both merges, both jobs green and published with every file; a job on bobo (8 GB) or the AMD lab runner fits its memory and the 60-minute limit from a cold cache (by hand). - `mise run test`, the whole run (by hand, or CI). - Windows: the nightly installed and built by the launcher (by hand). ## Measurements Nothing to measure: release packaging moves between programs, and the game and a player's build are unchanged. ## Risks - A release between the two merges fails, and so does one of an older commit afterwards (above). The failed run is remembered, so retry it by hand. - Anyone's script calling `longshot-builder dev release` or `dev rust-key` now gets the usage; `cargo run --release -p longshot-packager -- release ...` replaces it. - Each release job compiles one more program, and its Rust cache holds it too. - A revert here goes with a revert in Release. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). *Not ticked: only the checks reading changed files ran; `test_lifter.py` fails on `main`'s clippy errors and `codes` test.* - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [ ] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. *Not ticked: one line of `third_party/renhdrum/PROVENANCE.md` names the new command; nothing else there changed.* ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci(release): the release's packaging is a program of its own, longshot-packager
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 1m25s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m58s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m37s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m32s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
9c721d90e7
The Windows release build waited for the Linux one only because that job's longshot-builder was its packaging tool. longshot-packager holds the release and tool commands over the same libraries, so each build job builds its own; longshot-builder drops dev release and dev rust-key and keeps dev tools.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Author
Owner

Tested in game: CachyOS Linux, RTX 3090, driver 620.70.06: a pack over base 3072dda4 built by this branch's longshot-builder (9c721d90), run headless from the repository save kokiri-start into play in Kokiri Forest (59.9 fps), quit with exit code 0 after the close work finished.

Tested in game: CachyOS Linux, RTX 3090, driver 620.70.06: a pack over base 3072dda4 built by this branch's longshot-builder (9c721d90), run headless from the repository save kokiri-start into play in Kokiri Forest (59.9 fps), quit with exit code 0 after the close work finished.
Member

Possibly related, for context:

  • PR #2690 WIP: ci: the CI images and build tool uploads move to MagicBeanAdmin/Release — Overlapping workflow/docs coordination; its description explicitly notes settling shared tests and docs with this PR.
  • PR #2557 ci: one CI image per job kind and fewer jobs, and a release builds the builder once per platform — Merged release-workflow change introduced the builder reuse and Windows-after-Linux dependency this splits apart.
Possibly related, for context: - PR #2690 WIP: ci: the CI images and build tool uploads move to MagicBeanAdmin/Release — Overlapping workflow/docs coordination; its description explicitly notes settling shared tests and docs with this PR. - PR #2557 ci: one CI image per job kind and fewer jobs, and a release builds the builder once per platform — Merged release-workflow change introduced the builder reuse and Windows-after-Linux dependency this splits apart.
HumanBean force-pushed ci-release-packager from 9c721d90e7
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Failing after 14s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 1m25s
PR description / Title and description (pull_request_target) Successful in 7s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 4m58s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m37s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m32s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 3m33s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to d21cfc0b61
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
PR description / Title and description (pull_request_target) Successful in 11s
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Failing after 18s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-11-27 21:38:40 +00:00
Compare
HumanBean force-pushed ci-release-packager from d21cfc0b61
Some checks failed
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
PR description / Title and description (pull_request_target) Successful in 11s
CI / What the change needs (pull_request) Successful in 13s
CI / Third-party parts and guide screenshots (pull_request) Failing after 18s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to cd5140d646
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 11s
CI / Third-party parts and guide screenshots (pull_request) Failing after 18s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 29s
PR description / Title and description (pull_request_target) Failing after 6s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m48s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m34s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 1m28s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 2m9s
CI / Website build and checks (pull_request) Successful in 2m46s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 19m23s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 29m14s
2026-11-27 21:38:59 +00:00
Compare
HumanBean changed title from WIP: ci(release): the release's packaging is a program of its own, longshot-packager to ci(release): the release's packaging is a program of its own, longshot-packager 2026-11-27 21:54:25 +00:00
HumanBean deleted branch ci-release-packager 2026-11-27 21:54:46 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2691
No description provided.