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

Open
nullexxx wants to merge 2 commits from upstream-pr/2670 into main
nullexxx commented 2026-11-25 17:48:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by nullexxx on 2026-11-25T17:48:40Z.


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.
<!-- greyfinch-sync:Marvisak/VIctory:issue:6610359072 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2670). Originally posted by [nullexxx](https://github.com/nullexxx) on 2026-11-25T17:48:40Z. --- 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.
DrDarkDK commented 2026-11-25 18:02:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T17:55:23Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170187837 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7170187837). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T17:55:23Z. --- 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.*
kotekompotek commented 2026-11-25 18:02:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:56:00Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170202898 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7170202898). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:56:00Z. --- 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.
XeNS1 commented 2026-11-25 19:06:14 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by XeNS1 on 2026-11-25T18:18:13Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170723336 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7170723336). Originally posted by [XeNS1](https://github.com/XeNS1) on 2026-11-25T18:18:13Z. --- 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.
fuzeofficlal commented 2026-11-25 20:06:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T19:09:37Z.


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.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7171899028 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7171899028). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T19:09:37Z. --- 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.
Marvisak commented 2026-11-25 23:06:04 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:16:24Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176154185 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2670#issuecomment-7176154185). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:16:24Z. --- <!-- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2670:upstream-pr/2670'
git switch 'upstream-pr/2670'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2670'
git switch 'upstream-pr/2670'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2670'
git switch 'upstream-pr/2670'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2670'
git switch 'main'
git merge --squash 'upstream-pr/2670'
git switch 'main'
git merge --ff-only 'upstream-pr/2670'
git switch 'main'
git merge 'upstream-pr/2670'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!2668
No description provided.