Warm-up: the quarantine follows the fingerprint, so an update tries those pipelines again #779

Merged
kibagami-nc merged 1 commit from upstream-pr/779 into main 2026-11-29 08:16:58 +00:00
kibagami-nc commented 2026-11-28 05:43:50 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T05:43:50Z.


Port of TaynanGT's TaynanGT/Vice-Tay#316, its quarantine part. That PR adapts BlueCatsz's Belobug#294. Its other part, unreadable recipes, is #40 here, still open, so it is left to that PR.

What happens

When a pipeline ends a victory warm process (a crash, or more than 180 s), it goes into warm-bad.txt for good. warm-done.txt is kept per fingerprint: the translator and driver (known::fingerprint), this program's path and the card. After an update of any of those, everything is made again, except the quarantined pipelines:

  • they are never tried again;
  • --again leaves them out too;
  • the preload's library step (into_library) leaves them out as well.

So a pipeline that crashed an older driver, or hit a translator bug that has since been fixed, is compiled at its first use in the game on every later build.

The change

  • Write: a pipeline that ends a process is written as <key> fp=<fingerprint> <why>. The key stays in column one, as the older readers of the journal expect.
  • Read: bad_keys reads the journal against the current fingerprint:
    • a line under another fingerprint no longer counts, and the pipeline is tried again;
    • a line without one, from earlier builds, stays out as before;
    • a <fingerprint> <key> line, as some builds of the other forks write it, is read too.
  • --again, or VICTORY_WARM_BAD=0: tries every quarantined pipeline again, as Vice-Tay does.
  • into_library: reads the quarantine the same way, so a pipeline that run tried again and made is not left out of the library by its old line. Vice-Tay's base has no such step, so this part is new here.
  • Fingerprint: its computation moved into fingerprint(), shared by both. It is unchanged.

Tests

  • New warm::tests::the_quarantine_follows_the_fingerprint_and_keeps_older_lines:
    • a line under the current fingerprint stays out;
    • a line under another fingerprint is tried again;
    • a line without a fingerprint stays out under any fingerprint;
    • a <fingerprint> <key> line is read;
    • comments, blank lines and a non-hex fp= are handled;
    • the fingerprint is compared without case.
  • With the old parsing (the first word of each line) put back, the test fails: it keeps the stale entry, counts the fingerprint and # as keys, and misses the key of the <fingerprint> <key> line.
  • cargo test -p victory --locked: 27 passed.
  • Clippy, default and --all-features: nothing in the changed files. Main's own lints are fixed in #665.

Not run with the game here.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5537168343 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/779). Originally posted by [kibagami-nc](https://github.com/kibagami-nc) on 2026-11-28T05:43:50Z. --- Port of TaynanGT's TaynanGT/Vice-Tay#316, its quarantine part. That PR adapts BlueCatsz's Belobug#294. Its other part, unreadable recipes, is #40 here, still open, so it is left to that PR. ## What happens When a pipeline ends a `victory warm` process (a crash, or more than 180 s), it goes into `warm-bad.txt` for good. `warm-done.txt` is kept per fingerprint: the translator and driver (`known::fingerprint`), this program's path and the card. After an update of any of those, everything is made again, except the quarantined pipelines: - they are never tried again; - `--again` leaves them out too; - the preload's library step (`into_library`) leaves them out as well. So a pipeline that crashed an older driver, or hit a translator bug that has since been fixed, is compiled at its first use in the game on every later build. ## The change - **Write:** a pipeline that ends a process is written as `<key> fp=<fingerprint> <why>`. The key stays in column one, as the older readers of the journal expect. - **Read:** `bad_keys` reads the journal against the current fingerprint: - a line under another fingerprint no longer counts, and the pipeline is tried again; - a line without one, from earlier builds, stays out as before; - a `<fingerprint> <key>` line, as some builds of the other forks write it, is read too. - **`--again`, or `VICTORY_WARM_BAD=0`:** tries every quarantined pipeline again, as Vice-Tay does. - **`into_library`:** reads the quarantine the same way, so a pipeline that `run` tried again and made is not left out of the library by its old line. Vice-Tay's base has no such step, so this part is new here. - **Fingerprint:** its computation moved into `fingerprint()`, shared by both. It is unchanged. ## Tests - New `warm::tests::the_quarantine_follows_the_fingerprint_and_keeps_older_lines`: - a line under the current fingerprint stays out; - a line under another fingerprint is tried again; - a line without a fingerprint stays out under any fingerprint; - a `<fingerprint> <key>` line is read; - comments, blank lines and a non-hex `fp=` are handled; - the fingerprint is compared without case. - With the old parsing (the first word of each line) put back, the test fails: it keeps the stale entry, counts the fingerprint and `#` as keys, and misses the key of the `<fingerprint> <key>` line. - `cargo test -p victory --locked`: 27 passed. - Clippy, default and `--all-features`: nothing in the changed files. Main's own lints are fixed in #665. Not run with the game here.
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
trustno1-coder/VIctory-NVIDIA!779
No description provided.