victory-gpu: keep a pipeline library per translation, not one shared one (a translator edit destroyed a 926 MB / 7.5 min cache) #2704

Open
pes7 wants to merge 3 commits from upstream-pr/2706 into main
pes7 commented 2026-11-25 18:32:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-25T18:32:54Z.


victory-gpu: keep a pipeline library per translation, not one shared one

The library's pipelines are named after the shaders they are made from, so a
change to the translator (victory_shader::SOURCE_HASH) makes every name in
it useless - and the first run after one wrote the few pipelines it made
over the old library. Measured on the title:

warm:  host pipeline library loaded bytes=970507898 ms=57    (926 MB, 27 160 pipelines)
after a translator change, the next start-up says:
       host pipeline library loaded bytes=626800             (612 KB)

That 926 MB was a 7.5 minute warm-up (translate --cache --pipelines,
made=23057 on a cold library). It is not a truncated write - write_atomically
is already there - the new library is simply small and replaces the old one.
The cost lands on the loop that needs the cache most: bisecting between two
builds paid the warm-up for each of them, in turn, every time.

So each translation keeps its library in dir/<SOURCE_HASH>, and the two
newest are kept (KEPT): the one in use and the previous build's, which is
what a bisection needs. A run only ever writes its own directory.

Measured (retail title, two runs in a row, O:\tmp\victory-cache\pipelines):

run 1:  host pipeline library saved  bytes=3086   (no load: first use of this key)
        host pipeline library saved  bytes=7488
run 2:  host pipeline library loaded bytes=7488 ms=0
-> O:\tmp\victory-cache\pipelines\94ef170ae2f5e8da\host-pipelines.bin

Nothing else moves: use_pipeline_cache still takes the same directory, the
shader cache's key already worked this way, and the pipeline library of a
build that is not the current one is now left alone instead of being
overwritten.

cargo test --workspace --locked; both clippy configurations with -D
warnings; cargo xtask policy.

What it gives (to decide the merge): a translator edit no longer destroys the pipeline library: measured, a 926 MB cache (27 160 pipelines, a 7.5 minute warm-up) became 612 KB on the next start, and bisecting between two builds paid that warm-up for each of them in turn. Each translation keeps its own directory now, the two newest are kept, and pruning only takes this crate's own directories.

State: MERGEABLE, CI check green, rebased onto today's main (f3578e3).

Risk: none for a normal run: same directory argument, one level down; a stale cache is left alone instead of overwritten.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5496963254 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706). Originally posted by [pes7](https://github.com/pes7) on 2026-11-25T18:32:54Z. --- victory-gpu: keep a pipeline library per translation, not one shared one The library's pipelines are named after the shaders they are made from, so a change to the translator (victory_shader::SOURCE_HASH) makes every name in it useless - and the first run after one wrote the few pipelines it made over the old library. Measured on the title: warm: host pipeline library loaded bytes=970507898 ms=57 (926 MB, 27 160 pipelines) after a translator change, the next start-up says: host pipeline library loaded bytes=626800 (612 KB) That 926 MB was a 7.5 minute warm-up (`translate --cache --pipelines`, made=23057 on a cold library). It is not a truncated write - `write_atomically` is already there - the new library is simply small and replaces the old one. The cost lands on the loop that needs the cache most: bisecting between two builds paid the warm-up for each of them, in turn, every time. So each translation keeps its library in `dir/<SOURCE_HASH>`, and the two newest are kept (`KEPT`): the one in use and the previous build's, which is what a bisection needs. A run only ever writes its own directory. Measured (retail title, two runs in a row, `O:\tmp\victory-cache\pipelines`): run 1: host pipeline library saved bytes=3086 (no load: first use of this key) host pipeline library saved bytes=7488 run 2: host pipeline library loaded bytes=7488 ms=0 -> O:\tmp\victory-cache\pipelines\94ef170ae2f5e8da\host-pipelines.bin Nothing else moves: `use_pipeline_cache` still takes the same directory, the shader cache's key already worked this way, and the pipeline library of a build that is not the current one is now left alone instead of being overwritten. cargo test --workspace --locked; both clippy configurations with -D warnings; cargo xtask policy. --- **What it gives (to decide the merge):** a translator edit no longer destroys the pipeline library: measured, a 926 MB cache (27 160 pipelines, a 7.5 minute warm-up) became 612 KB on the next start, and bisecting between two builds paid that warm-up for each of them in turn. Each translation keeps its own directory now, the two newest are kept, and pruning only takes this crate's own directories. **State:** MERGEABLE, CI `check` green, rebased onto today's `main` (`f3578e3`). **Risk:** none for a normal run: same directory argument, one level down; a stale cache is left alone instead of overwritten.
DrDarkDK commented 2026-11-25 18:37:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T18:37:01Z.

Review: CHANGES_REQUESTED


keyed() can recursively delete an unrelated directory on startup. For example, if pipelines/backup/ is older than the previous translation’s cache directory, it enters others and gets passed to remove_dir_all. The filter currently accepts every directory except the current hash.

Could pruning be limited to verified translation-cache entries and remove only the cache files VIctory owns, followed by an empty-directory removal? A temp-directory regression with a newer previous cache and an older backup/ containing a sentinel file would pin this down.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:review:6062997670 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#pullrequestreview-6062997670). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T18:37:01Z. **Review:** CHANGES_REQUESTED --- `keyed()` can recursively delete an unrelated directory on startup. For example, if `pipelines/backup/` is older than the previous translation’s cache directory, it enters `others` and gets passed to `remove_dir_all`. The filter currently accepts every directory except the current hash. Could pruning be limited to verified translation-cache entries and remove only the cache files VIctory owns, followed by an empty-directory removal? A temp-directory regression with a newer previous cache and an older `backup/` containing a sentinel file would pin this down. *AI-assisted with Codex.*
kotekompotek commented 2026-11-25 19:06:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T18:54:51Z.


Right fix for a real data-loss path: pipeline names embed SOURCE_HASH-derived shader hashes, so a translator edit orphans the whole library - writing a tiny new one over it was the worst possible outcome for bisection. Keying by SOURCE_HASH and keeping the two newest is exactly what alternating-build workflows need, and write_atomically already covers the intra-build case.

One nit worth a second look: keyed() prunes every directory in the cache dir that is not the current hash, not just ones shaped like translations. If the dir is fully dedicated this is fine, but a stray subdirectory a user or another tool left there gets deleted on the next run. Filtering candidates by name shape would be cheap insurance.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171572886 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7171572886). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T18:54:51Z. --- Right fix for a real data-loss path: pipeline names embed SOURCE_HASH-derived shader hashes, so a translator edit orphans the whole library - writing a tiny new one over it was the worst possible outcome for bisection. Keying by SOURCE_HASH and keeping the two newest is exactly what alternating-build workflows need, and write_atomically already covers the intra-build case. One nit worth a second look: keyed() prunes every directory in the cache dir that is not the current hash, not just ones shaped like translations. If the dir is fully dedicated this is fine, but a stray subdirectory a user or another tool left there gets deleted on the next run. Filtering candidates by name shape would be cheap insurance.
DrDarkDK commented 2026-11-25 20:05:50 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T19:26:40Z.

Review: APPROVED


No description provided.

<!-- greyfinch-sync:Marvisak/VIctory:review:6063696124 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#pullrequestreview-6063696124). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T19:26:40Z. **Review:** APPROVED --- _No description provided._
welisonzika14-jpg commented 2026-11-25 20:06:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by welisonzika14-jpg on 2026-11-25T19:18:15Z.


For @DrDarkDK's point about keyed(): here is a regression test for it and a small patch, in case @pes7 wants them. Tested on head f337d94, Windows 11, rustc 1.98.1.

Test pruning_leaves_folders_that_are_not_translation_caches (in crates/victory-gpu/src/pipeline/library.rs): in a temp dir it makes backup/ (older) with a sentinel file, then a newer previous cache 00000000deadbeef/ with a library file, and calls keyed(). It checks that the sentinel and the previous cache both still exist.

  • On the PR head (f337d94): FAILED, "an unrelated folder was deleted".
  • With the patch: passes. All 10 tests in pipeline::library pass (cargo test -p victory-gpu --lib --locked pipeline::library), and cargo clippy -p victory-gpu --all-targets --locked -- -D warnings is clean.

Patch: only folders named like SOURCE_HASH (16 lowercase hex digits) are pruning candidates. For those, only the three files this module writes are removed, then remove_dir (which fails if the folder is not empty). A second test checks the oldest real translation is still pruned.

Diff
diff --git a/crates/victory-gpu/src/pipeline/library.rs b/crates/victory-gpu/src/pipeline/library.rs
index fd3add4..eabc1ec 100644
--- a/crates/victory-gpu/src/pipeline/library.rs
+++ b/crates/victory-gpu/src/pipeline/library.rs
@@ -68,7 +68,7 @@ fn keyed(dir: &Path) -> PathBuf {
     let mut others: Vec<(std::time::SystemTime, PathBuf)> = entries
         .flatten()
         .map(|entry| entry.path())
-        .filter(|other| *other != path && other.is_dir())
+        .filter(|other| *other != path && other.is_dir() && is_translation_dir(other))
         .filter_map(|other| {
             let at = other.metadata().ok()?.modified().ok()?;
             Some((at, other))
@@ -77,12 +77,25 @@ fn keyed(dir: &Path) -> PathBuf {
     others.sort_by_key(|(at, _)| std::cmp::Reverse(*at));
     for (_, older) in others.into_iter().skip(KEPT - 1) {
         // A library and a list or two: gone with the translation that made
-        // them. Nothing this run reads is ever one of them.
-        let _ = std::fs::remove_dir_all(&older);
+        // them. Nothing this run reads is ever one of them. Only the files
+        // this module writes go; a folder holding anything else stays.
+        for file in [LIBRARY_FILE, EARLY_FILE, PREBUILT_FILE] {
+            let _ = std::fs::remove_file(older.join(file));
+        }
+        let _ = std::fs::remove_dir(&older);
     }
     path
 }
 
+/// Whether `dir` is named like a `SOURCE_HASH` (16 lowercase hex digits).
+fn is_translation_dir(dir: &Path) -> bool {
+    dir.file_name().and_then(|n| n.to_str()).is_some_and(|n| {
+        n.len() == victory_shader::SOURCE_HASH.len()
+            && n.bytes()
+                .all(|b| b.is_ascii_digit() || (b'a'..=b'f').contains(&b))
+    })
+}
+
 /// Host pipelines created, loaded from the library, and title pipelines
 /// started at creation, since the start.
 pub(crate) static MADE: AtomicU64 = AtomicU64::new(0);
@@ -496,6 +509,44 @@ mod tests {
         assert_ne!(a, name("graphics", b"root", &[b"vsp", b"s"], "state"));
     }
 
+    /// Pruning touches only translation caches: a folder of another name
+    /// stays, whatever its age, and the previous translation is kept.
+    #[test]
+    fn pruning_leaves_folders_that_are_not_translation_caches() {
+        let dir = tempfile::tempdir().unwrap();
+        let backup = dir.path().join("backup");
+        std::fs::create_dir(&backup).unwrap();
+        std::fs::write(backup.join("sentinel.txt"), b"keep").unwrap();
+        std::thread::sleep(std::time::Duration::from_millis(50));
+        let previous = dir.path().join("00000000deadbeef");
+        std::fs::create_dir(&previous).unwrap();
+        std::fs::write(previous.join(LIBRARY_FILE), b"old").unwrap();
+
+        let path = keyed(dir.path());
+
+        assert_eq!(path, dir.path().join(victory_shader::SOURCE_HASH));
+        assert!(backup.join("sentinel.txt").exists(), "an unrelated folder was deleted");
+        assert!(previous.join(LIBRARY_FILE).exists(), "the previous translation is kept");
+    }
+
+    /// The oldest translation beyond `KEPT` still goes, with its files.
+    #[test]
+    fn pruning_still_removes_the_oldest_translation() {
+        let dir = tempfile::tempdir().unwrap();
+        let oldest = dir.path().join("00000000000000aa");
+        std::fs::create_dir(&oldest).unwrap();
+        std::fs::write(oldest.join(LIBRARY_FILE), b"old").unwrap();
+        std::thread::sleep(std::time::Duration::from_millis(50));
+        let previous = dir.path().join("00000000000000bb");
+        std::fs::create_dir(&previous).unwrap();
+        std::fs::write(previous.join(LIBRARY_FILE), b"prev").unwrap();
+
+        keyed(dir.path());
+
+        assert!(!oldest.exists());
+        assert!(previous.join(LIBRARY_FILE).exists());
+    }
+
     /// This run's keys stay in the list; earlier runs' fill it up to the cap.
     #[test]
     fn the_early_list_keeps_this_run_first() {

Written with AI help (Claude/Kiro); the numbers are from runs on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172111231 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7172111231). Originally posted by [welisonzika14-jpg](https://github.com/welisonzika14-jpg) on 2026-11-25T19:18:15Z. --- For @DrDarkDK's point about `keyed()`: here is a regression test for it and a small patch, in case @pes7 wants them. Tested on head `f337d94`, Windows 11, rustc 1.98.1. **Test** `pruning_leaves_folders_that_are_not_translation_caches` (in `crates/victory-gpu/src/pipeline/library.rs`): in a temp dir it makes `backup/` (older) with a sentinel file, then a newer previous cache `00000000deadbeef/` with a library file, and calls `keyed()`. It checks that the sentinel and the previous cache both still exist. - On the PR head (f337d94): FAILED, "an unrelated folder was deleted". - With the patch: passes. All 10 tests in `pipeline::library` pass (`cargo test -p victory-gpu --lib --locked pipeline::library`), and `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` is clean. **Patch**: only folders named like `SOURCE_HASH` (16 lowercase hex digits) are pruning candidates. For those, only the three files this module writes are removed, then `remove_dir` (which fails if the folder is not empty). A second test checks the oldest real translation is still pruned. <details><summary>Diff</summary> ```diff diff --git a/crates/victory-gpu/src/pipeline/library.rs b/crates/victory-gpu/src/pipeline/library.rs index fd3add4..eabc1ec 100644 --- a/crates/victory-gpu/src/pipeline/library.rs +++ b/crates/victory-gpu/src/pipeline/library.rs @@ -68,7 +68,7 @@ fn keyed(dir: &Path) -> PathBuf { let mut others: Vec<(std::time::SystemTime, PathBuf)> = entries .flatten() .map(|entry| entry.path()) - .filter(|other| *other != path && other.is_dir()) + .filter(|other| *other != path && other.is_dir() && is_translation_dir(other)) .filter_map(|other| { let at = other.metadata().ok()?.modified().ok()?; Some((at, other)) @@ -77,12 +77,25 @@ fn keyed(dir: &Path) -> PathBuf { others.sort_by_key(|(at, _)| std::cmp::Reverse(*at)); for (_, older) in others.into_iter().skip(KEPT - 1) { // A library and a list or two: gone with the translation that made - // them. Nothing this run reads is ever one of them. - let _ = std::fs::remove_dir_all(&older); + // them. Nothing this run reads is ever one of them. Only the files + // this module writes go; a folder holding anything else stays. + for file in [LIBRARY_FILE, EARLY_FILE, PREBUILT_FILE] { + let _ = std::fs::remove_file(older.join(file)); + } + let _ = std::fs::remove_dir(&older); } path } +/// Whether `dir` is named like a `SOURCE_HASH` (16 lowercase hex digits). +fn is_translation_dir(dir: &Path) -> bool { + dir.file_name().and_then(|n| n.to_str()).is_some_and(|n| { + n.len() == victory_shader::SOURCE_HASH.len() + && n.bytes() + .all(|b| b.is_ascii_digit() || (b'a'..=b'f').contains(&b)) + }) +} + /// Host pipelines created, loaded from the library, and title pipelines /// started at creation, since the start. pub(crate) static MADE: AtomicU64 = AtomicU64::new(0); @@ -496,6 +509,44 @@ mod tests { assert_ne!(a, name("graphics", b"root", &[b"vsp", b"s"], "state")); } + /// Pruning touches only translation caches: a folder of another name + /// stays, whatever its age, and the previous translation is kept. + #[test] + fn pruning_leaves_folders_that_are_not_translation_caches() { + let dir = tempfile::tempdir().unwrap(); + let backup = dir.path().join("backup"); + std::fs::create_dir(&backup).unwrap(); + std::fs::write(backup.join("sentinel.txt"), b"keep").unwrap(); + std::thread::sleep(std::time::Duration::from_millis(50)); + let previous = dir.path().join("00000000deadbeef"); + std::fs::create_dir(&previous).unwrap(); + std::fs::write(previous.join(LIBRARY_FILE), b"old").unwrap(); + + let path = keyed(dir.path()); + + assert_eq!(path, dir.path().join(victory_shader::SOURCE_HASH)); + assert!(backup.join("sentinel.txt").exists(), "an unrelated folder was deleted"); + assert!(previous.join(LIBRARY_FILE).exists(), "the previous translation is kept"); + } + + /// The oldest translation beyond `KEPT` still goes, with its files. + #[test] + fn pruning_still_removes_the_oldest_translation() { + let dir = tempfile::tempdir().unwrap(); + let oldest = dir.path().join("00000000000000aa"); + std::fs::create_dir(&oldest).unwrap(); + std::fs::write(oldest.join(LIBRARY_FILE), b"old").unwrap(); + std::thread::sleep(std::time::Duration::from_millis(50)); + let previous = dir.path().join("00000000000000bb"); + std::fs::create_dir(&previous).unwrap(); + std::fs::write(previous.join(LIBRARY_FILE), b"prev").unwrap(); + + keyed(dir.path()); + + assert!(!oldest.exists()); + assert!(previous.join(LIBRARY_FILE).exists()); + } + /// This run's keys stay in the list; earlier runs' fill it up to the cap. #[test] fn the_early_list_keeps_this_run_first() { ``` </details> Written with AI help (Claude/Kiro); the numbers are from runs on my machine.
fuzeofficlal commented 2026-11-25 20:06:17 +00:00 (Migrated from github.com)

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


Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and code review of f337d94 (on 13f91ca):

Verification (rustc 1.98.1 MSVC)

  • cargo xtask policy: 184 files ok.
  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings: 0 warnings.
  • RTX 5090: cargo test --locked -p victory-gpu --lib pipeline::library::tests: 8 passed, 0 failed.
  • WARP (VICTORY_D3D12_WARP=1): cargo test --locked -p victory-gpu --features diagnostics --lib -- --test-threads=1: 198 passed, 0 failed, 1 ignored.

Review Notes

  • Keying pipeline library subdirectories by victory_shader::SOURCE_HASH with KEPT = 2 cleanly prevents a translator edit from overwriting a warm cache, while preserving atomic .tmp -> rename writes and corrupt-library recovery.
  • Minor non-blocking edge cases worth keeping in mind:
    • library.rs:71 prunes any non-current directory (*other != path && other.is_dir()) without validating that the directory name is a 16-hex-char SOURCE_HASH, so unrelated subdirectories placed under pipelines/ could be deleted.
    • Because save() returns early when added == 0 && !prebuilt_changed && !USED_CHANGED, directory mtime does not refresh on warm cache hits (so an A -> B -> A (all hits) -> C sequence can prune A instead of B).
<!-- greyfinch-sync:Marvisak/VIctory:comment:7172451897 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7172451897). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-25T19:33:03Z. --- Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and code review of `f337d94` (on `13f91ca`): ### Verification (`rustc 1.98.1` MSVC) - `cargo xtask policy`: **184 files ok**. - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings`: **0 warnings**. - **RTX 5090:** `cargo test --locked -p victory-gpu --lib pipeline::library::tests`: **8 passed, 0 failed**. - **WARP (`VICTORY_D3D12_WARP=1`):** `cargo test --locked -p victory-gpu --features diagnostics --lib -- --test-threads=1`: **198 passed, 0 failed, 1 ignored**. ### Review Notes - Keying pipeline library subdirectories by `victory_shader::SOURCE_HASH` with `KEPT = 2` cleanly prevents a translator edit from overwriting a warm cache, while preserving atomic `.tmp -> rename` writes and corrupt-library recovery. - Minor non-blocking edge cases worth keeping in mind: - `library.rs:71` prunes any non-current directory (`*other != path && other.is_dir()`) without validating that the directory name is a 16-hex-char `SOURCE_HASH`, so unrelated subdirectories placed under `pipelines/` could be deleted. - Because `save()` returns early when `added == 0 && !prebuilt_changed && !USED_CHANGED`, directory `mtime` does not refresh on warm cache hits (so an `A -> B -> A (all hits) -> C` sequence can prune `A` instead of `B`).
pes7 commented 2026-11-25 20:06:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-25T19:34:11Z.


Right, and fixed in f34d0b5 - thank you.

keyed() now prunes only directories this crate wrote: a name that is 16 lowercase hex digits (a SOURCE_HASH) and holding host-pipelines.bin. A pipelines/backup/ - or any other directory, however old - is never touched, so remove_dir_all can only ever see one of our own library directories.

Your suggestion to remove only the cache files and then the empty directory is the narrower version of the same rule; I kept remove_dir_all for our own directories because the leftovers of a translation are exactly three files this crate wrote (host-pipelines.bin, early-pipelines.txt, prebuilt-pipelines.txt) and a partially written one has no value.

The regression test you described is in: pipeline::library::keyed_tests::pruning_leaves_foreign_directories_alone builds a cache directory with an old translation directory, an older backup/ with a sentinel, and the current translation, then asserts the sentinel is still there after keyed(). (cargo test -p victory-gpu --locked library: 9 passed.)

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172477778 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7172477778). Originally posted by [pes7](https://github.com/pes7) on 2026-11-25T19:34:11Z. --- Right, and fixed in f34d0b5 - thank you. `keyed()` now prunes only directories this crate wrote: a name that is 16 lowercase hex digits (a `SOURCE_HASH`) **and** holding `host-pipelines.bin`. A `pipelines/backup/` - or any other directory, however old - is never touched, so `remove_dir_all` can only ever see one of our own library directories. Your suggestion to remove only the cache files and then the empty directory is the narrower version of the same rule; I kept `remove_dir_all` for our own directories because the leftovers of a translation are exactly three files this crate wrote (`host-pipelines.bin`, `early-pipelines.txt`, `prebuilt-pipelines.txt`) and a partially written one has no value. The regression test you described is in: `pipeline::library::keyed_tests::pruning_leaves_foreign_directories_alone` builds a cache directory with an old translation directory, an older `backup/` with a sentinel, and the current translation, then asserts the sentinel is still there after `keyed()`. (`cargo test -p victory-gpu --locked library`: 9 passed.)
oni-swr commented 2026-11-25 20:06:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-25T19:41:12Z.


Independent WARP/CPU verification

Head: 8981a0cf9955405e03a5bdb25eeaa727f023c20f
Base: origin/main 13f91caee25f2fdf2c062be5f7a27f058e51cbca
Status: open, non-draft; clean merge tree; no oni-swr comment on this head.

Environment: Windows x64, WARP selected (VICTORY_WARP=1, VICTORY_D3D12_WARP=1), dxil.dll 1.8.2502.11 from Windows SDK 10.0.26100.0; rustc 1.98.1.

Commands (each with CARGO_TARGET_DIR=D:\victory-warp-2690-target and the WARP variables above):

  • Baseline and PR: cargo test --locked -p victory-gpu
  • Baseline and PR diagnostics: cargo test --locked -p victory-gpu --features diagnostics
  • PR targeted: cargo test --locked -p victory-gpu pruning_leaves_foreign_directories_alone
  • PR lint: cargo clippy --locked -p victory-gpu --all-targets -- -D warnings

Results: default baseline 195 passed, 1 ignored; current PR 196 passed, 1 ignored. Diagnostics baseline 197 passed, 1 failed, 1 ignored; current PR 199 passed, 1 ignored. The baseline-only failure was memory::tests::a_submission_that_missed_leaves_the_copies_at_once; it passed in the PR run. Clippy passed.

Negative control: removed the is_translation filter and reran the new targeted test; it still passed (1/1). The test creates backup after the valid old directory and does not set modification times, so the foreign directory may be retained merely as the newest one. This is a test-strength nit: set deterministic mtimes so backup would be pruned without the filter. No production failure found.

Not tested: physical GPU, retail title, release build. AI-assisted: Codex (gpt-6-luna).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7172633328 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7172633328). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-25T19:41:12Z. --- Independent WARP/CPU verification Head: `8981a0cf9955405e03a5bdb25eeaa727f023c20f` Base: `origin/main` `13f91caee25f2fdf2c062be5f7a27f058e51cbca` Status: open, non-draft; clean merge tree; no `oni-swr` comment on this head. Environment: Windows x64, WARP selected (`VICTORY_WARP=1`, `VICTORY_D3D12_WARP=1`), `dxil.dll` 1.8.2502.11 from Windows SDK 10.0.26100.0; rustc 1.98.1. Commands (each with `CARGO_TARGET_DIR=D:\victory-warp-2690-target` and the WARP variables above): - Baseline and PR: `cargo test --locked -p victory-gpu` - Baseline and PR diagnostics: `cargo test --locked -p victory-gpu --features diagnostics` - PR targeted: `cargo test --locked -p victory-gpu pruning_leaves_foreign_directories_alone` - PR lint: `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` Results: default baseline 195 passed, 1 ignored; current PR 196 passed, 1 ignored. Diagnostics baseline 197 passed, 1 failed, 1 ignored; current PR 199 passed, 1 ignored. The baseline-only failure was `memory::tests::a_submission_that_missed_leaves_the_copies_at_once`; it passed in the PR run. Clippy passed. Negative control: removed the `is_translation` filter and reran the new targeted test; it still passed (1/1). The test creates `backup` after the valid old directory and does not set modification times, so the foreign directory may be retained merely as the newest one. This is a test-strength nit: set deterministic mtimes so `backup` would be pruned without the filter. No production failure found. Not tested: physical GPU, retail title, release build. AI-assisted: Codex (gpt-6-luna).
Marvisak commented 2026-11-25 23:06:03 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Merge candidate (recommending a look, not an approval). Thanks for the rebase. use_pipeline_cache in crates/victory-gpu/src/pipeline/library.rs now points the library at dir/<SOURCE_HASH>, so a translator change no longer overwrites the previous build's library; keyed() keeps the current and the newest other translation and only prunes directories that are named like a 16-hex SOURCE_HASH and hold host-pipelines.bin. I checked against main: save() already does create_dir_all(dir), all readers go through DIR, and the only caller (d3d12x.rs) is unchanged. It merges cleanly and CI check is passing.

Minor, not blocking: pruning_leaves_foreign_directories_alone creates backup/ after the old translation directory, so it would also pass without the is_translation filter (as noted in the thread); giving backup/ the oldest mtime would make the test pin the filter. A library left at the old top-level pipelines/host-pipelines.bin is simply no longer read (one warm-up after upgrading).


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176143893 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7176143893). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:15:55Z. --- <!-- victory-triage v1 head=da38ab49ce06fa556605e2dd183eb448ae49cc9c verdict=merge-candidate at=2026-11-26T02:15:30Z --> Automated triage for the maintainers. **Merge candidate** (recommending a look, not an approval). Thanks for the rebase. `use_pipeline_cache` in `crates/victory-gpu/src/pipeline/library.rs` now points the library at `dir/<SOURCE_HASH>`, so a translator change no longer overwrites the previous build's library; `keyed()` keeps the current and the newest other translation and only prunes directories that are named like a 16-hex `SOURCE_HASH` and hold `host-pipelines.bin`. I checked against `main`: `save()` already does `create_dir_all(dir)`, all readers go through `DIR`, and the only caller (`d3d12x.rs`) is unchanged. It merges cleanly and CI `check` is passing. Minor, not blocking: `pruning_leaves_foreign_directories_alone` creates `backup/` after the old translation directory, so it would also pass without the `is_translation` filter (as noted in the thread); giving `backup/` the oldest mtime would make the test pin the filter. A library left at the old top-level `pipelines/host-pipelines.bin` is simply no longer read (one warm-up after upgrading). --- _Generated by [Claude Code](https://claude.ai/code)_
pes7 commented 2026-11-25 23:06:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-25T22:27:09Z.


Rebased onto today's main (f3578e3) and reduced to the part that is still missing there. main gained, meanwhile, tag() (the translator hash holds for the pre-built list) and write_atomically, so the branch is now just the directory part, applied on top of both:

  • use_pipeline_cache sets the library directory to dir/<SOURCE_HASH>,
  • keyed() keeps the two newest translation directories (KEPT) and prunes the rest,
  • pruning takes a directory only when its name is 16 lowercase hex digits and it holds host-pipelines.bin, so a backup/ in the cache directory is not ours to delete (with the test that pins that down),
  • the crates' other library tests and write_atomically are untouched.

Checked: cargo test --release -p victory-gpu 229 pass, clippy clean, both victory configurations build.

The measurements in the original description still stand (926 MB -> 612 KB after a translator edit; pipelines/94ef170ae2f5e8da/host-pipelines.bin, loaded bytes=7488 ms=0 on the next run).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176379089 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7176379089). Originally posted by [pes7](https://github.com/pes7) on 2026-11-25T22:27:09Z. --- Rebased onto today's `main` (`f3578e3`) and reduced to the part that is still missing there. `main` gained, meanwhile, `tag()` (the translator hash holds for the pre-built list) and `write_atomically`, so the branch is now just the directory part, applied on top of both: - `use_pipeline_cache` sets the library directory to `dir/<SOURCE_HASH>`, - `keyed()` keeps the two newest translation directories (`KEPT`) and prunes the rest, - pruning takes a directory only when its name is 16 lowercase hex digits **and** it holds `host-pipelines.bin`, so a `backup/` in the cache directory is not ours to delete (with the test that pins that down), - the crates' other library tests and `write_atomically` are untouched. Checked: `cargo test --release -p victory-gpu` 229 pass, clippy clean, both `victory` configurations build. The measurements in the original description still stand (926 MB -> 612 KB after a translator edit; `pipelines/94ef170ae2f5e8da/host-pipelines.bin`, loaded `bytes=7488 ms=0` on the next run).
pes7 commented 2026-11-26 16:05:01 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-26T15:06:20Z.


Where this PR meets #1653 (perf/pipeline-library-shards), which also rewrites pipeline/library.rs. Both were MERGEABLE/green on their own, and git merged them without a textual conflict — but the result did not compile, because is_translation looked for host-pipelines.bin, which the split removes (LIBRARY_FILE is gone). Left as it was, that is a merge that looks clean and breaks the build.

Fixed here (b621621fd): a directory counts as a library when it holds the file or its first shard.

fn library_in(dir: &Path) -> bool {
    dir.join(LIBRARY_FILE).is_file() || dir.join("host-pipelines.00.bin").is_file()
}

The names are written out rather than taken from shard_file so this branch compiles on main today, where the split does not exist yet; the pruning test writes the file by name for the same reason.

Verified both ways:

tree result
this branch alone (on main) builds; pipeline::library 9 passed, clippy -D warnings clean
this branch merged into #1653 builds after a 6-line resolution (shard_file(0) instead of the literal, since the split owns the name); pipeline:: 24 passed, both the shard tests and pruning_leaves_foreign_directories_alone among them

The resolved combination is pushed as perf/library-per-translation-on-shards (e60d4cbb3), so if #1653 lands first the update here is that one commit rather than a re-derivation.

Either order works; the only requirement is that whoever merges second takes that resolution. No other open PR by us touches these files — the rest were checked pairwise against each other and merge clean (see #2936's comment).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7195788172 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7195788172). Originally posted by [pes7](https://github.com/pes7) on 2026-11-26T15:06:20Z. --- Where this PR meets #1653 (`perf/pipeline-library-shards`), which also rewrites `pipeline/library.rs`. Both were `MERGEABLE`/green on their own, and git merged them **without a textual conflict** — but the result did not compile, because `is_translation` looked for `host-pipelines.bin`, which the split removes (`LIBRARY_FILE` is gone). Left as it was, that is a merge that looks clean and breaks the build. Fixed here (`b621621fd`): a directory counts as a library when it holds the file **or** its first shard. ```rust fn library_in(dir: &Path) -> bool { dir.join(LIBRARY_FILE).is_file() || dir.join("host-pipelines.00.bin").is_file() } ``` The names are written out rather than taken from `shard_file` so this branch compiles on `main` today, where the split does not exist yet; the pruning test writes the file by name for the same reason. **Verified both ways:** | tree | result | |---|---| | this branch alone (on `main`) | builds; `pipeline::library` 9 passed, clippy `-D warnings` clean | | this branch merged into #1653 | builds after a 6-line resolution (`shard_file(0)` instead of the literal, since the split owns the name); `pipeline::` **24 passed**, both the shard tests and `pruning_leaves_foreign_directories_alone` among them | The resolved combination is pushed as `perf/library-per-translation-on-shards` (`e60d4cbb3`), so if #1653 lands first the update here is that one commit rather than a re-derivation. Either order works; the only requirement is that whoever merges second takes that resolution. No other open PR by us touches these files — the rest were checked pairwise against each other and merge clean (see #2936's comment).
andrewpozdnakov7-jpg commented 2026-11-26 16:05:09 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T15:50:05Z.


@pes7 I found one retention case on the published combination e60d4cbb3. #1653 writes the shards with changes, so a small cache can contain host-pipelines.15.bin and no shard 00. The combination's classifier returns false for that directory, and the retention pass consequently leaves it out of the two-version policy.

The same synthetic fixture fails on e60d4cbb3 for shard 15 and passes with the follow-up. It checks the legacy file, shard 00 and shard 15, plus a shard outside the valid range and an unrelated directory. Recognition now uses the combined tree's own SHARDS and shard_file. All 28 pipeline tests passed, including the existing pruning test, plus strict GPU Clippy and policy. Optional commit on the combined branch

Please retain Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if you fold it in. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7196813929 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7196813929). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T15:50:05Z. --- @pes7 I found one retention case on the published combination `e60d4cbb3`. #1653 writes the shards with changes, so a small cache can contain `host-pipelines.15.bin` and no shard 00. The combination's classifier returns false for that directory, and the retention pass consequently leaves it out of the two-version policy. The same synthetic fixture fails on `e60d4cbb3` for shard 15 and passes with the follow-up. It checks the legacy file, shard 00 and shard 15, plus a shard outside the valid range and an unrelated directory. Recognition now uses the combined tree's own `SHARDS` and `shard_file`. All 28 pipeline tests passed, including the existing pruning test, plus strict GPU Clippy and policy. [Optional commit on the combined branch](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/3529af0cca91582e6a999b0b48a93a5d143bc3ae) Please retain `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if you fold it in. AI-assisted with Codex.
Dukestar69 commented 2026-11-26 20:17:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T20:17:58Z.

Review: APPROVED


LGTM — verified on Windows against origin/main (63bcca4).

  • Keying pipeline libraries per translator version and pruning old keyed directories (while leaving foreign directories untouched) prevents translator edits from wiping out a warm pipeline cache.
  • cargo test -p victory-gpu --lib pipeline::library:: -- --test-threads=1: 12 passed, 0 failed (including keyed_tests::pruning_leaves_foreign_directories_alone).
  • cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6080050273 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#pullrequestreview-6080050273). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T20:17:58Z. **Review:** APPROVED --- LGTM — verified on Windows against `origin/main` (`63bcca4`). - Keying pipeline libraries per translator version and pruning old keyed directories (while leaving foreign directories untouched) prevents translator edits from wiping out a warm pipeline cache. - `cargo test -p victory-gpu --lib pipeline::library:: -- --test-threads=1`: 12 passed, 0 failed (including `keyed_tests::pruning_leaves_foreign_directories_alone`). - `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
fuzeofficlal commented 2026-11-27 00:05:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T00:05:55Z.

Review: APPROVED


LGTM — clean scoping and great motivation. Isolating each victory_shader::SOURCE_HASH into dir/<SOURCE_HASH> while restricting pruning strictly to 16-char lowercase hex directories containing host-pipelines.bin or host-pipelines.00.bin avoids clobbering warm caches across translator edits/bisects and leaves foreign directories untouched.

Verified locally with cargo xtask policy, cargo clippy --locked -p victory-gpu --all-targets -- -D warnings (default and --all-features), and cargo test --locked -p victory-gpu --lib pipeline::library:: (12/12 passed both with and without --features diagnostics).

A few small non-blocking suggestions if you update the PR:

  • Test coverage (library.rs:907-941): pruning_leaves_foreign_directories_alone currently seeds only one eligible non-current translation directory ("00112233aabbccdd"), so others.into_iter().skip(KEPT - 1) yields zero items and never exercises remove_dir_all. Seeding a second/third translation directory (with distinct mtimes, plus a host-pipelines.00.bin shard fixture) would verify both pruning order and shard detection directly.
  • Formatting: rustfmt --edition 2024 --check flags line 935 (wrap) and line 942 (extra trailing blank line) in keyed_tests.
  • Concurrent builds note: if 3+ distinct builds ever run simultaneously against the same cache root, skip(KEPT - 1) could remove an active older build's directory by mtime (fine for the typical single-run / 2-build bisect workflow).
<!-- greyfinch-sync:Marvisak/VIctory:review:6081847663 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#pullrequestreview-6081847663). Originally posted by [fuzeofficlal](https://github.com/fuzeofficlal) on 2026-11-27T00:05:55Z. **Review:** APPROVED --- LGTM — clean scoping and great motivation. Isolating each `victory_shader::SOURCE_HASH` into `dir/<SOURCE_HASH>` while restricting pruning strictly to 16-char lowercase hex directories containing `host-pipelines.bin` or `host-pipelines.00.bin` avoids clobbering warm caches across translator edits/bisects and leaves foreign directories untouched. Verified locally with `cargo xtask policy`, `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`), and `cargo test --locked -p victory-gpu --lib pipeline::library::` (12/12 passed both with and without `--features diagnostics`). A few small non-blocking suggestions if you update the PR: - **Test coverage (`library.rs:907-941`)**: `pruning_leaves_foreign_directories_alone` currently seeds only one eligible non-current translation directory (`"00112233aabbccdd"`), so `others.into_iter().skip(KEPT - 1)` yields zero items and never exercises `remove_dir_all`. Seeding a second/third translation directory (with distinct mtimes, plus a `host-pipelines.00.bin` shard fixture) would verify both pruning order and shard detection directly. - **Formatting**: `rustfmt --edition 2024 --check` flags line 935 (wrap) and line 942 (extra trailing blank line) in `keyed_tests`. - **Concurrent builds note**: if 3+ distinct builds ever run simultaneously against the same cache root, `skip(KEPT - 1)` could remove an active older build's directory by mtime (fine for the typical single-run / 2-build bisect workflow).
pes7 commented 2026-11-27 12:47:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-27T12:47:57Z.


@andrewpozdnakov7-jpg thanks, you're right: #1653 writes only the shards that changed, so a directory holding only host-pipelines.15.bin was not recognised and fell out of the two-version retention.

Pushed 6be5b71 (Co-authored-by you): library_in now accepts the one-file library or any of the sixteen shard names (host-pipelines.00.bin .. host-pipelines.15.bin). The names stay written out rather than using SHARDS/shard_file, because those don't exist on main without #1653, so this PR still builds and behaves the same whichever lands first. New test any_shard_makes_a_library_directory covers the legacy file, shard 00, shard 15, shard 16 (rejected), an unrelated file and an empty directory.

Local, Windows 11: cargo clippy -p victory-gpu --all-targets -- -D warnings clean, also with --all-features; cargo test -p victory-gpu pipeline:: 23 passed / 0 failed; xtask policy tests pass; merges cleanly onto main 63bcca4. No title run for this push (cache-directory classification only).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7218686279 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7218686279). Originally posted by [pes7](https://github.com/pes7) on 2026-11-27T12:47:57Z. --- @andrewpozdnakov7-jpg thanks, you're right: #1653 writes only the shards that changed, so a directory holding only `host-pipelines.15.bin` was not recognised and fell out of the two-version retention. Pushed `6be5b71` (`Co-authored-by` you): `library_in` now accepts the one-file library or any of the sixteen shard names (`host-pipelines.00.bin` .. `host-pipelines.15.bin`). The names stay written out rather than using `SHARDS`/`shard_file`, because those don't exist on `main` without #1653, so this PR still builds and behaves the same whichever lands first. New test `any_shard_makes_a_library_directory` covers the legacy file, shard 00, shard 15, shard 16 (rejected), an unrelated file and an empty directory. Local, Windows 11: `cargo clippy -p victory-gpu --all-targets -- -D warnings` clean, also with `--all-features`; `cargo test -p victory-gpu pipeline::` 23 passed / 0 failed; `xtask` policy tests pass; merges cleanly onto `main` `63bcca4`. No title run for this push (cache-directory classification only).
andrewpozdnakov7-jpg commented 2026-11-28 06:33:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T06:33:17Z.


I combined #2706 at 6be5b71 with #3685 at 35625d7 in 31e52f1. Both original heads are retained. The combined branch includes current main through #3685, and its diff from that head is confined to the pipeline library.

The lookup still chooses this translator's directory first. It hashes the accepted library only if that directory supplies a prebuilt list. The six synthetic cases produced the same prebuilt keys as before, and a warm library with no list performed zero hashes. Both translation-directory tests and three library tests passed on Windows, including the concurrent WARP loads. Strict GPU Clippy and the asset policy passed.

pes7 or a maintainer can use the tested combination if both PRs land.

Please retain the Git authors on cherry-pick or rebase, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding this resolution into another commit.

AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235369226 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7235369226). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T06:33:17Z. --- I combined #2706 at `6be5b71` with #3685 at `35625d7` in [31e52f1](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/31e52f12a5b04d15b3a42878f7d21fa7a13c460b). Both original heads are retained. The combined branch includes current main through #3685, and its diff from that head is confined to the pipeline library. The lookup still chooses this translator's directory first. It hashes the accepted library only if that directory supplies a prebuilt list. The six synthetic cases produced the same prebuilt keys as before, and a warm library with no list performed zero hashes. Both translation-directory tests and three library tests passed on Windows, including the concurrent WARP loads. Strict GPU Clippy and the asset policy passed. pes7 or a maintainer can use the tested combination if both PRs land. Please retain the Git authors on cherry-pick or rebase, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding this resolution into another commit. AI-assisted with OpenAI Codex.
neonbyte1 commented 2026-11-29 08:07:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-29T08:07:25Z.


A measured report on the limit of two, from a tree that carries this PR's folders (RTX 5090, Linux/Wine 11.22, vkd3d-proton of GE-Proton11-14).

The folder per translation works as described. The limit bit as soon as three or more builds took turns on one cache folder: a candidate, main and a branch in one A-B-A-B window, with a second tester's builds in between.

  • Of 95 game runs in 16 hours (at least 18 builds), 20 started with an empty library and early list (host pipeline library saved bytes=248..632 early=0; at the end host pipelines all made made≈1,900 loaded≈170 started_early=0). 15 of the 20 were builds that had already run that night; 3 were true first runs, 2 I can't tell.
  • A cold run is not only slow at the start. While about 1,900 pipelines are made the scene already runs: 1,000-5,000 draws and dispatches a frame are dropped for three to four minutes, and the picture stays different for the rest of the run. Frame 1700 is brighter (median luminance 51 against 33 in the 74 warm runs), and in 4 of the 20 cold runs the player character's head was missing with the hair displaced, in frames 1700 and 2048 alike. 0 of the 74 warm runs show that (p ≈ 0.002, Fisher). So what is dropped in those minutes includes work the title does once.
  • For comparing builds that means: a picture or a fault count from a run whose library was pruned says nothing about the build. Frame time at the end of the run did not differ in a consistent way (six pairs of the same build, -9.9 to +2.7 ms).

What I do on that box now: copy each <SOURCE_HASH> folder aside after a run and put it back before that build's next run, and count a run only when made is far below loaded.

A suggestion, yours to weigh: the two newest fit a bisection between two builds, but not a merge candidate tested against main and its parts, nor two testers on one machine. Folders of game runs are small (320-460 KB here; your 926 MB is the pre-built one), so pruning by total size, or a count one can raise, would keep both cases. I have not written that; if a patch on your branch helps, say so.

AI-assisted (Claude); measured on my machine, no game data shared.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7252900704 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2706#issuecomment-7252900704). Originally posted by [neonbyte1](https://github.com/neonbyte1) on 2026-11-29T08:07:25Z. --- A measured report on the limit of two, from a tree that carries this PR's folders (RTX 5090, Linux/Wine 11.22, vkd3d-proton of GE-Proton11-14). The folder per translation works as described. The limit bit as soon as three or more builds took turns on one cache folder: a candidate, `main` and a branch in one A-B-A-B window, with a second tester's builds in between. - Of 95 game runs in 16 hours (at least 18 builds), **20 started with an empty library and early list** (`host pipeline library saved bytes=248..632 early=0`; at the end `host pipelines all made made≈1,900 loaded≈170 started_early=0`). **15 of the 20 were builds that had already run that night**; 3 were true first runs, 2 I can't tell. - A cold run is not only slow at the start. While about 1,900 pipelines are made the scene already runs: 1,000-5,000 draws and dispatches a frame are dropped for three to four minutes, and **the picture stays different for the rest of the run.** Frame 1700 is brighter (median luminance 51 against 33 in the 74 warm runs), and in 4 of the 20 cold runs the player character's head was missing with the hair displaced, in frames 1700 and 2048 alike. 0 of the 74 warm runs show that (p ≈ 0.002, Fisher). So what is dropped in those minutes includes work the title does once. - For comparing builds that means: a picture or a fault count from a run whose library was pruned says nothing about the build. Frame time at the end of the run did not differ in a consistent way (six pairs of the same build, -9.9 to +2.7 ms). What I do on that box now: copy each `<SOURCE_HASH>` folder aside after a run and put it back before that build's next run, and count a run only when `made` is far below `loaded`. A suggestion, yours to weigh: the two newest fit a bisection between two builds, but not a merge candidate tested against `main` and its parts, nor two testers on one machine. Folders of game runs are small (320-460 KB here; your 926 MB is the pre-built one), so pruning by total size, or a count one can raise, would keep both cases. I have not written that; if a patch on your branch helps, say so. _AI-assisted (Claude); measured on my machine, no game data shared._
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/2706:upstream-pr/2706'
git switch 'upstream-pr/2706'

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/2706'
git switch 'upstream-pr/2706'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2706'
git switch 'upstream-pr/2706'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2706'
git switch 'main'
git merge --squash 'upstream-pr/2706'
git switch 'main'
git merge --ff-only 'upstream-pr/2706'
git switch 'main'
git merge 'upstream-pr/2706'
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!2704
No description provided.