CI: no workflow builds the release profile, so every PR is validated only in the configuration nobody runs #2264

Open
opened 2026-11-26 05:24:59 +00:00 by github-bot · 2 comments
Owner

@⁠itsonewi on GitHub · 2026-11-25 11:48 UTC · original

Summary

All three workflows on 1a0bbe3 build only the debug profile:

  • .github/workflows/ci.yml runs ./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched, and scripts/test.ps1 runs cargo build --workspace and cargo test --workspace -- --test-threads=4, both debug.
  • .github/workflows/pr-check.yml reads a description and a file list; it compiles nothing.
  • .github/workflows/stale.yml is the stale bot.

No --release anywhere in the three files or in scripts/test.ps1. Meanwhile the release build is the one everything else is measured in:

  • scripts/smoke.ps1 defaults to target\release\xcl.exe and tells the contributor to cargo build --release -p xcl, so every xcl-smoke block in a PR description - the numbers the merge gate compares - comes from a build CI has never made;
  • [profile.release] debug = 2 in the root Cargo.toml exists so release-only crashes can be resolved, which says release is the build people diagnose;
  • crates/xcl/build.rs adds the /HIGHENTROPYVA:NO and --disable-high-entropy-va link arguments for the binary (#631), and the PE-header test is the only thing that sees them.

What that leaves unseen:

  • code under #[cfg(not(debug_assertions))], and debug_assert!-guarded invariants, is never compiled by CI; a type error there is caught by the first contributor who runs cargo build --release for a smoke block, not by the PR;
  • overflow behaviour and optimisation-level-only failures are debug-tested only, while the cache identity, the translated output and every regression number come from release;
  • the release link step itself - the GNU ld path in particular, which is where #631's directive had to be added twice - runs only on contributor machines;
  • and #2214's --locked enforcement, once it lands in scripts/test.ps1, still would not cover the release build.

Suggested fix

One step in ci.yml after Build and test, building the binaries only (not the tests), so the cost stays a few minutes:

      - name: Build the release binary
        run: cargo build --release -p xcl --bins

The existing actions/cache@v4 step already carries target, so the release artifacts are cached with the debug ones. If the 45-minute job timeout is a concern, this can be its own job so it does not extend the test job.

Not #2214 or #2232

  • #2214 is the toolchain pin and --locked in CI and scripts/test.ps1; it says nothing about the profile.
  • #2232 is pr_check.py not noticing that a PR's smoke block came from a different build profile than main's - a check-side hole. This is the CI side: the profile is never built at all.

Not tested

  • Nothing run: 1a0bbe3 was read through the API. The "no --release" claim is a read of the three workflow files and scripts/test.ps1; the release-only paths listed are the usual Rust ones, not a failure I reproduced.

AI use

  • Claude (Opus 5.5) read the three workflows, scripts/test.ps1, scripts/smoke.ps1 and the root Cargo.toml on 1a0bbe3, and wrote this report; the human account checked the files before opening it.
**@⁠itsonewi** on GitHub · 2026-11-25 11:48 UTC · [original](https://github.com/xcl-dev/xcl/issues/2264) ### Summary All three workflows on `1a0bbe3` build only the debug profile: - `.github/workflows/ci.yml` runs `./scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched`, and `scripts/test.ps1` runs `cargo build --workspace` and `cargo test --workspace -- --test-threads=4`, both debug. - `.github/workflows/pr-check.yml` reads a description and a file list; it compiles nothing. - `.github/workflows/stale.yml` is the stale bot. No `--release` anywhere in the three files or in `scripts/test.ps1`. Meanwhile the release build is the one everything else is measured in: - `scripts/smoke.ps1` defaults to `target\release\xcl.exe` and tells the contributor to `cargo build --release -p xcl`, so every `xcl-smoke` block in a PR description - the numbers the merge gate compares - comes from a build CI has never made; - `[profile.release] debug = 2` in the root `Cargo.toml` exists so release-only crashes can be resolved, which says release is the build people diagnose; - `crates/xcl/build.rs` adds the `/HIGHENTROPYVA:NO` and `--disable-high-entropy-va` link arguments for the binary (#631), and the PE-header test is the only thing that sees them. What that leaves unseen: - code under `#[cfg(not(debug_assertions))]`, and `debug_assert!`-guarded invariants, is never compiled by CI; a type error there is caught by the first contributor who runs `cargo build --release` for a smoke block, not by the PR; - overflow behaviour and optimisation-level-only failures are debug-tested only, while the cache identity, the translated output and every regression number come from release; - the release link step itself - the GNU `ld` path in particular, which is where #631's directive had to be added twice - runs only on contributor machines; - and #2214's `--locked` enforcement, once it lands in `scripts/test.ps1`, still would not cover the release build. ### Suggested fix One step in `ci.yml` after `Build and test`, building the binaries only (not the tests), so the cost stays a few minutes: ```yaml - name: Build the release binary run: cargo build --release -p xcl --bins ``` The existing `actions/cache@v4` step already carries `target`, so the release artifacts are cached with the debug ones. If the 45-minute job timeout is a concern, this can be its own job so it does not extend the test job. ### Not #2214 or #2232 - #2214 is the toolchain pin and `--locked` in CI and `scripts/test.ps1`; it says nothing about the profile. - #2232 is `pr_check.py` not noticing that a PR's smoke block came from a different build profile than main's - a check-side hole. This is the CI side: the profile is never built at all. ### Not tested - Nothing run: `1a0bbe3` was read through the API. The "no `--release`" claim is a read of the three workflow files and `scripts/test.ps1`; the release-only paths listed are the usual Rust ones, not a failure I reproduced. **AI use** - Claude (Opus 5.5) read the three workflows, `scripts/test.ps1`, `scripts/smoke.ps1` and the root `Cargo.toml` on `1a0bbe3`, and wrote this report; the human account checked the files before opening it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:24:59 +00:00
Author
Owner

@⁠Creaa on GitHub · 2026-11-25 11:58 UTC · original

I'm taking this. I'll add a release build of the xcl binary to the existing Windows CI job and verify the command locally on MSVC.

**@⁠Creaa** on GitHub · 2026-11-25 11:58 UTC · [original](https://github.com/xcl-dev/xcl/issues/2264#issuecomment-7161749425) I'm taking this. I'll add a release build of the xcl binary to the existing Windows CI job and verify the command locally on MSVC.
Author
Owner

@⁠itsonewi on GitHub · 2026-11-25 12:00 UTC · original

Thanks @⁠Creaa. Two notes from reading the workflow while writing this, in case they save a round trip:

  • cargo build --release -p xcl --bins is enough - the tests are not needed for this and it keeps the step near a couple of minutes; the existing actions/cache@v4 step already caches target, so the debug and release artefacts share a key and a cache hit survives across PRs.
  • CI is MSVC (windows-2025, rustup default stable MSVC), so the step covers /HIGHENTROPYVA:NO but not the -Wl,--disable-high-entropy-va branch of build.rs that #631 had to add for the GNU toolchain. Worth one line under Not tested rather than adding a second toolchain to the job.
**@⁠itsonewi** on GitHub · 2026-11-25 12:00 UTC · [original](https://github.com/xcl-dev/xcl/issues/2264#issuecomment-7161793833) Thanks @⁠Creaa. Two notes from reading the workflow while writing this, in case they save a round trip: - `cargo build --release -p xcl --bins` is enough - the tests are not needed for this and it keeps the step near a couple of minutes; the existing `actions/cache@v4` step already caches `target`, so the debug and release artefacts share a key and a cache hit survives across PRs. - CI is MSVC (`windows-2025`, `rustup default stable` MSVC), so the step covers `/HIGHENTROPYVA:NO` but not the `-Wl,--disable-high-entropy-va` branch of `build.rs` that #631 had to add for the GNU toolchain. Worth one line under **Not tested** rather than adding a second toolchain to the job.
This discussion has been locked. Commenting is limited to contributors.
No description provided.