Pipeline warm-up treats an unreadable journal as an empty cache #74

Open
opened 2026-11-30 02:50:56 +00:00 by Yoshi-233 · 1 comment
Yoshi-233 commented 2026-11-30 02:50:56 +00:00 (Migrated from github.com)
Contributor

Imported from readmet3xt-lab/foxhound. Originally posted by Yoshi-233 on 2026-11-30T02:50:56Z.


On Foxhound fafa3ad, the warm-up command gets the list of pipeline keys from known::keys. Its reader calls std::fs::read(...).unwrap_or_default(), so a missing journal and an existing journal that cannot be read both produce zero keys. Someone investigating an unexpectedly empty warm-up gets no indication which path failed. Journal reader · Warm-up caller

Reproduction

In the existing tests module of crates/victory-gpu/src/pipeline/known.rs, this test reproduces the reader behavior with a temporary directory. It only touches files under that directory.

#[test]
fn unreadable_journal_looks_like_a_missing_journal() {
    let temp = tempfile::tempdir().unwrap();
    let dir = temp.path();
    let journal = dir.join(PIPELINES);
    assert!(keys(dir).is_empty());

    std::fs::create_dir(&journal).unwrap();
    assert!(std::fs::read(&journal).is_err());
    assert!(keys(dir).is_empty());
}

On a Windows build host, the in-tree test can be run with cargo test --locked -p victory-gpu --lib unreadable_journal_looks_like_a_missing_journal. My Linux reproduction used the reader and key parser extracted unchanged from this revision. The filesystem returned IsADirectory while keys returned []. As a positive control, a journal containing a complete record returned its expected key.

Expected behavior

A missing journal is a normal first run. If the path exists and cannot be read, warm-up should report that path and the underlying I/O error. An incomplete trailing record can still be handled separately. The equivalent NVIDIA discussion has a related fix, but Foxhound has its own warm-up call path. VIctory-NVIDIA #3588

<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:6687786976 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/issues/74). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-30T02:50:56Z. --- On Foxhound `fafa3ad`, the warm-up command gets the list of pipeline keys from `known::keys`. Its reader calls `std::fs::read(...).unwrap_or_default()`, so a missing journal and an existing journal that cannot be read both produce zero keys. Someone investigating an unexpectedly empty warm-up gets no indication which path failed. [Journal reader](https://github.com/readmet3xt-lab/foxhound/blob/fafa3adfdf2e6415c51b4b29ff24578c167e90af/crates/victory-gpu/src/pipeline/known.rs#L174) · [Warm-up caller](https://github.com/readmet3xt-lab/foxhound/blob/fafa3adfdf2e6415c51b4b29ff24578c167e90af/apps/victory/src/warm.rs#L39) **Reproduction** In the existing `tests` module of `crates/victory-gpu/src/pipeline/known.rs`, this test reproduces the reader behavior with a temporary directory. It only touches files under that directory. ```rust #[test] fn unreadable_journal_looks_like_a_missing_journal() { let temp = tempfile::tempdir().unwrap(); let dir = temp.path(); let journal = dir.join(PIPELINES); assert!(keys(dir).is_empty()); std::fs::create_dir(&journal).unwrap(); assert!(std::fs::read(&journal).is_err()); assert!(keys(dir).is_empty()); } ``` On a Windows build host, the in-tree test can be run with `cargo test --locked -p victory-gpu --lib unreadable_journal_looks_like_a_missing_journal`. My Linux reproduction used the reader and key parser extracted unchanged from this revision. The filesystem returned `IsADirectory` while `keys` returned `[]`. As a positive control, a journal containing a complete record returned its expected key. **Expected behavior** A missing journal is a normal first run. If the path exists and cannot be read, warm-up should report that path and the underlying I/O error. An incomplete trailing record can still be handled separately. The equivalent NVIDIA discussion has a related fix, but Foxhound has its own warm-up call path. [VIctory-NVIDIA #3588](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3588)
fromthemoonx commented 2026-12-04 14:57:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from readmet3xt-lab/foxhound. Originally posted by fromthemoonx on 2026-12-04T14:57:35Z.


I'd like to take this one. It is still there on main (5e44415b), and it can also lose the record: open_record cuts a torn end off at the place the walk got to, and a failed read counts as place 0. With a handle on the file that lets others write but not read, Seed::open left known-pipelines.bin at 0 bytes (55 before), and known-shaders.bin too (50 before).

Plan:

  • reading either file of the record gives an error with its path, except when the file is missing (a first run);
  • nothing is cut off or added to a record that could not be read; victory warm and title-profile pipelines stop and say why, a run warns and leaves the record alone;
  • tests for both files: missing, unreadable, torn.

#87 had the first part for the pipelines file; its author closed it. #589 touches Seed::open too, so I'll give it the same return type.

(Written with Claude Code, Claude Opus 5.5; the result above is from a test run on Windows 11.)

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7415118356 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/issues/74#issuecomment-7415118356). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-04T14:57:35Z. --- I'd like to take this one. It is still there on main (`5e44415b`), and it can also lose the record: `open_record` cuts a torn end off at the place the walk got to, and a failed read counts as place 0. With a handle on the file that lets others write but not read, `Seed::open` left `known-pipelines.bin` at 0 bytes (55 before), and `known-shaders.bin` too (50 before). Plan: - reading either file of the record gives an error with its path, except when the file is missing (a first run); - nothing is cut off or added to a record that could not be read; `victory warm` and `title-profile pipelines` stop and say why, a run warns and leaves the record alone; - tests for both files: missing, unreadable, torn. #87 had the first part for the pipelines file; its author closed it. #589 touches `Seed::open` too, so I'll give it the same return type. (Written with Claude Code, Claude Opus 5.5; the result above is from a test run on Windows 11.)
Sign in to join this conversation.
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
readmet3xt-lab/foxhound#74
No description provided.