Build and test on Linux; a CI job keeps it so; VICTORY_LOG_FILE #2670

Open
github-bot wants to merge 2 commits from github-bot/gh-2670 into main AGit
Owner

@⁠nullexxx on GitHub · 2026-11-25 17:48 UTC · original
nullexxx:linux-build → main · +81 −17 · 11 files · 2 commits · open

Summary

Build and test on Linux. The platform-level crates build off Windows (rustdoc builds them there), but a few newer pieces did not:
    gpu: view_format reads host objects, so it is Windows-only. The eviction constants choose uses are plain numbers, kept on every platform.
    hle: the text-entry dialog and the D3D12.X allocator hookup are Windows-only. Off Windows the dialog counts as dismissed.
    shader: three tests check with dxil.dll's validator, on Windows only.
    app: translate and prebuild drive the host's D3D12. Off Windows the command says so.
    Tests that read their own executable as a PE image, or use Windows path rules (C:\.., X:\), run on Windows only.
A Linux CI job runs cargo test --workspace.
VICTORY_LOG_FILE=<path>. Writes the log to a file (appended) instead of stderr. Under Wine or Proton a program Steam starts has no terminal, and its stderr goes nowhere.

Testing

cargo test --workspace --locked on Linux: passes.
cargo clippy --workspace --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings: clean in both configurations.
**@⁠nullexxx** on GitHub · 2026-11-25 17:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/2670) `nullexxx:linux-build` → `main` · +81 −17 · 11 files · 2 commits · open Summary Build and test on Linux. The platform-level crates build off Windows (rustdoc builds them there), but a few newer pieces did not: gpu: view_format reads host objects, so it is Windows-only. The eviction constants choose uses are plain numbers, kept on every platform. hle: the text-entry dialog and the D3D12.X allocator hookup are Windows-only. Off Windows the dialog counts as dismissed. shader: three tests check with dxil.dll's validator, on Windows only. app: translate and prebuild drive the host's D3D12. Off Windows the command says so. Tests that read their own executable as a PE image, or use Windows path rules (C:\.., X:\), run on Windows only. A Linux CI job runs cargo test --workspace. VICTORY_LOG_FILE=<path>. Writes the log to a file (appended) instead of stderr. Under Wine or Proton a program Steam starts has no terminal, and its stderr goes nowhere. Testing cargo test --workspace --locked on Linux: passes. cargo clippy --workspace --all-targets [--all-features] --target x86_64-pc-windows-msvc -- -D warnings: clean in both configurations.
The platform-level crates build off Windows (upstream keeps rustdoc
building there); a few newer pieces did not:
- gpu: `view_format` reads host objects (Windows only); the eviction
  constants `choose` uses are plain numbers, kept on every platform.
- hle: the text-entry dialog and the D3D12.X allocator hookup are
  Windows-only; off Windows the dialog counts as dismissed.
- shader: three tests check with dxil.dll's validator on Windows only.
- app: `translate` and `prebuild` drive the host's D3D12; off Windows the
  command says so.
- Tests that read their own executable as a PE image, or use Windows path
  rules (`C:\..`, `X:\`), run on Windows only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
(cherry picked from commit 24d4eb084ad4766a42246cd15a66dc97350d8dc9)
Under Wine or Proton a program Steam starts has no terminal, and its
stderr goes nowhere: none of the layer's log reached the user's Proton
log or a `2>` redirect. With `VICTORY_LOG_FILE=<path>` the log is
appended to that file instead (no colour codes); if it cannot be opened,
the log stays on stderr.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SEGb51RnUN5wf49ozEtinL
(cherry picked from commit 3e5d837114b3434a74fe34a0900575255ebf1964)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:11:40 +00:00
Author
Owner

@⁠DrDarkDK on GitHub · 2026-11-25 17:55 UTC · original

The Linux guard rejects every translate invocation, including victory translate <path> --list. The offline census can walk the inputs and emit DXIL without creating a D3D12 device. In that path, the Windows dependencies are the optional validator, pipeline checks, and VICTORY_PAIRS.

Could the Linux build keep the offline census available and reject only the options that need Windows? A Linux CLI test with a synthetic input would cover that path alongside the library tests.

Static review only.

AI-assisted with Codex.

**@⁠DrDarkDK** on GitHub · 2026-11-25 17:55 UTC · [original](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7170187837) The Linux guard rejects every `translate` invocation, including `victory translate <path> --list`. The offline census can walk the inputs and emit DXIL without creating a D3D12 device. In that path, the Windows dependencies are the optional validator, pipeline checks, and `VICTORY_PAIRS`. Could the Linux build keep the offline census available and reject only the options that need Windows? A Linux CLI test with a synthetic input would cover that path alongside the library tests. Static review only. *AI-assisted with Codex.*
Author
Owner

@⁠kotekompotek on GitHub · 2026-11-25 17:56 UTC · original

Reviewed: honest Linux coverage — workspace crates build/test, Windows-only commands cfg-gated with a clear bail! for translate. The CI job (ubuntu + rust-cache) is minimal and correct. CI green.

**@⁠kotekompotek** on GitHub · 2026-11-25 17:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7170202898) Reviewed: honest Linux coverage — workspace crates build/test, Windows-only commands cfg-gated with a clear `bail!` for translate. The CI job (ubuntu + rust-cache) is minimal and correct. CI green.
Author
Owner

@⁠XeNS1 on GitHub · 2026-11-25 18:18 UTC · original

Independent native Linux verification of head 09d847e66909ca28903f810d5e513df5115a94a2 (Rust 1.100.0, x86-64, two build jobs):

  • cargo test --workspace --locked --offline: 425 passed, 0 failed, 8 ignored. Cleared all VICTORY_* environment variables; no game files, external fixtures or GPU used.
  • A separate-process probe linked against this head's actual victory-core preserves a pre-existing log prefix and appends two synthetic messages exactly once, without ANSI escapes.
  • An unopenable log path produces the diagnostic and the event on stderr, as intended.

One reproducible asset-policy gap remains in the file-output part: logging::init opens VICTORY_LOG_FILE without ensure_outside_repo. In a disposable directory containing .victory-root, the normal guard rejects events.log, but the same path passed through VICTORY_LOG_FILE is created and receives the synthetic event.

The probe is only:

victory_core::logging::init("info");
tracing::info!("synthetic-policy-marker");

Run it with VICTORY_LOG_FILE pointing below that marker root; compare with victory_core::ensure_outside_repo on the same path. This matters because diagnostic events can include title-derived words (for example capture.rs's peek/tiny-target log output), and the asset policy requires runtime output to stay outside source trees. Please check the guard before OpenOptions and retain stderr fallback on refusal, with a marker-root regression.

Verification only; no competing implementation. AI-assisted: OpenAI Codex.

**@⁠XeNS1** on GitHub · 2026-11-25 18:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7170723336) Independent native Linux verification of head `09d847e66909ca28903f810d5e513df5115a94a2` (Rust 1.100.0, x86-64, two build jobs): - `cargo test --workspace --locked --offline`: **425 passed, 0 failed, 8 ignored**. Cleared all VICTORY_* environment variables; no game files, external fixtures or GPU used. - A separate-process probe linked against this head's actual `victory-core` preserves a pre-existing log prefix and appends two synthetic messages exactly once, without ANSI escapes. - An unopenable log path produces the diagnostic and the event on stderr, as intended. One reproducible asset-policy gap remains in the file-output part: `logging::init` opens VICTORY_LOG_FILE without `ensure_outside_repo`. In a disposable directory containing `.victory-root`, the normal guard rejects `events.log`, but the same path passed through VICTORY_LOG_FILE is created and receives the synthetic event. The probe is only: ```rust victory_core::logging::init("info"); tracing::info!("synthetic-policy-marker"); ``` Run it with VICTORY_LOG_FILE pointing below that marker root; compare with `victory_core::ensure_outside_repo` on the same path. This matters because diagnostic events can include title-derived words (for example capture.rs's peek/tiny-target log output), and [the asset policy](https://github.com/Marvisak/VIctory/blob/13f91caee25f2fdf2c062be5f7a27f058e51cbca/docs/asset-policy.md) requires runtime output to stay outside source trees. Please check the guard before OpenOptions and retain stderr fallback on refusal, with a marker-root regression. Verification only; no competing implementation. AI-assisted: OpenAI Codex.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 19:09 UTC · original

Independent Windows 11 verification and code review of 09d847e6 (on 13f91ca):

Verification (rustc 1.98.1 MSVC)

  • cargo clippy --workspace --all-targets --locked -- -D warnings and --all-features: 0 warnings.
  • cargo test --locked -p victory-core -p victory-pe -p victory-loader -p victory-hle -p victory: all passed (victory-core 13, victory-pe 36, victory-loader 34+4, victory-hle 146+2, victory 10+2).
  • cargo xtask policy: 184 files ok.

Review Notes

  • All #[cfg(windows)] gates leave Windows production and test paths unchanged, and the linux CI job runs independently in parallel without slowing down the Windows check job.
  • Policy guard missing on VICTORY_LOG_FILE (crates/victory-core/src/logging.rs:28-56): VICTORY_LOG_FILE currently opens the path directly without calling victory_core::ensure_outside_repo, so a relative path like VICTORY_LOG_FILE=events.log can write runtime/title-derived diagnostics inside the repository tree. Adding the ensure_outside_repo check (and ignoring an empty VICTORY_LOG_FILE="" instead of printing an open error before falling back to stderr) would close that cleanly.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 19:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7171899028) Independent Windows 11 verification and code review of `09d847e6` (on `13f91ca`): ### Verification (`rustc 1.98.1` MSVC) - `cargo clippy --workspace --all-targets --locked -- -D warnings` and `--all-features`: **0 warnings**. - `cargo test --locked -p victory-core -p victory-pe -p victory-loader -p victory-hle -p victory`: all passed (`victory-core` 13, `victory-pe` 36, `victory-loader` 34+4, `victory-hle` 146+2, `victory` 10+2). - `cargo xtask policy`: **184 files ok**. ### Review Notes - All `#[cfg(windows)]` gates leave Windows production and test paths unchanged, and the `linux` CI job runs independently in parallel without slowing down the Windows `check` job. - **Policy guard missing on `VICTORY_LOG_FILE` (`crates/victory-core/src/logging.rs:28-56`):** `VICTORY_LOG_FILE` currently opens the path directly without calling `victory_core::ensure_outside_repo`, so a relative path like `VICTORY_LOG_FILE=events.log` can write runtime/title-derived diagnostics inside the repository tree. Adding the `ensure_outside_repo` check (and ignoring an empty `VICTORY_LOG_FILE=""` instead of printing an open error before falling back to `stderr`) would close that cleanly.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:16 UTC · original

Automated triage for the maintainers.

This PR no longer merges cleanly into main (f3578e3): apps/victory/src/main.rs and crates/victory-hle/src/modules/xgameui.rs conflict with changes that landed on main. It will be reviewed once it is rebased.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 22:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7176154185) <!-- victory-triage v1 head=09d847e66909ca28903f810d5e513df5115a94a2 verdict=needs-rebase at=2026-11-25T22:15:11Z --> Automated triage for the maintainers. This PR no longer merges cleanly into `main` (f3578e3): `apps/victory/src/main.rs` and `crates/victory-hle/src/modules/xgameui.rs` conflict with changes that landed on `main`. It will be reviewed once it is rebased. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • apps/victory/src/main.rs
  • crates/victory-hle/src/modules/xgameui.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2670/head:github-bot/gh-2670'
git switch 'github-bot/gh-2670'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2670'
git switch 'github-bot/gh-2670'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2670'
git switch 'github-bot/gh-2670'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2670'
git switch 'main'
git merge --squash 'github-bot/gh-2670'
git switch 'main'
git merge --ff-only 'github-bot/gh-2670'
git switch 'main'
git merge 'github-bot/gh-2670'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
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
github/Marvisak--VIctory!2670
No description provided.